summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43510: Implement PEP 597 opt-in EncodingWarning. (GH-19481)Inada Naoki2021-03-2932-18/+366
| | | | | | | | | | | See [PEP 597](https://www.python.org/dev/peps/pep-0597/). * Add `-X warn_default_encoding` and `PYTHONWARNDEFAULTENCODING`. * Add EncodingWarning * Add io.text_encoding() * open(), TextIOWrapper() emits EncodingWarning when encoding is omitted and warn_default_encoding is enabled. * _pyio.TextIOWrapper() uses UTF-8 as fallback default encoding used when failed to import locale module. (used during building Python) * bz2, configparser, gzip, lzma, pathlib, tempfile modules use io.text_encoding(). * What's new entry
* bpo-25643: Refactor the C tokenizer into smaller, logical units (GH-25050)Pablo Galindo2021-03-284-359/+353
|
* bpo-31907: [doc] clarify that str.format() does not support arbitrary ↵Irit Katriel2021-03-281-2/+2
| | | | expressions (#25053)
* bpo-43644: Add docs for importlib.resources.as_file. (#25048)Jason R. Coombs2021-03-281-0/+16
|
* bpo-43562: fix test_ssl to skip on unreachable network (GH-24937)Carl Meyer2021-03-271-0/+2
| | | This test checks result code of the connection directly, so it never raises an exception that can be suppressed by `support.transient_internet`. Directly support skipping the test in case of unreachable network.
* bpo-39231: correct tutorial annotations section (GH-25029)Irit Katriel2021-03-271-1/+1
|
* bpo-43466: Unsupported static build hack (GH-25002)Christian Heimes2021-03-271-13/+37
| | | | | | Add undocumented hack to statically link ssl and hashlib modules with OpenSSL. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-39616: clarify SSLContext.check_hostname effect (GH-18484)Ville Skyttä2021-03-271-1/+1
| | | | | It doesn't actually affect whether match_hostname() is called (it never is in this context any longer), but whether hostname verification occurs in the first place.
* bpo-40645: use C implementation of HMAC (GH-24920)Christian Heimes2021-03-276-124/+267
| | | | | | - [x] fix tests - [ ] add test scenarios for old/new code. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-43617: Check autoconf-archive package in configure.ac (GH-25016)Christian Heimes2021-03-276-216/+225
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-43636: Validate the version tag in _PyType_Lookup (GH-25032)Pablo Galindo2021-03-271-1/+3
|
* bpo-43354: xmlrpc: Fix type documentation for Fault.faultCode (GH-24707)Jürgen Gmach2021-03-262-1/+2
| | | | | | | The type of `faultCode` has to be an `int` instead of a `str`. cf http://xmlrpc.com/spec.md Pinging @pganssle
* bpo-42136: Deprecate module_repr() as found in importlib (GH-25022)Brett Cannon2021-03-2611-1476/+1543
|
* bpo-43620: Remove reference to os.sep from os.path.join() doc (#25025)Jared Sutton2021-03-261-5/+4
| | | - removed ambiguous reference to os.sep from os.path.join() doc
* Revert "bpo-40521: Remove freelist from collections.deque() (GH-21073)" ↵Raymond Hettinger2021-03-251-2/+21
| | | | | | | | (GH-24944) This reverts commit 32f2eda85957365d208f499b730d30b7eb419741. It can be re-applied if the subinterpreter PEP is approved. Otherwise, the commit degraded performance with no offsetting benefit.
* bpo-43416: Add Include/README.rst (GH-24884)Erlend Egeberg Aasland2021-03-251-0/+68
|
* "exists" -> "exist" in What's New 3.10 (GH-25019)blopblopy2021-03-251-1/+1
|
* Move big block of macros out of function to improve readability. (GH-25020)Mark Shannon2021-03-251-38/+40
|
* Doc: io: Remove "In-memory streams" section (GH-24927)Inada Naoki2021-03-251-10/+0
|
* AC: Update unsupported_special_methods (GH-24956)Dong-hee Na2021-03-251-3/+3
|
* bpo-43198: Revert 3dd2157 that removed freeslot tracking. (#25010)Raymond Hettinger2021-03-241-1/+15
|
* bpo-41064: Improve syntax error for invalid usage of '**' in f-strings ↵Pablo Galindo2021-03-244-1/+47
| | | | (GH-25006)
* Only check evalbreaker after calls and on backwards egdes. Makes sure that ↵Mark Shannon2021-03-242-46/+40
| | | | __exit__ or __aexit__ is called in with statments in case of interrupt. (GH-18334)
* Fix typo in fuzzer.c (GH-25013)Ikko Ashimine2021-03-241-2/+2
|
* bpo-42137: have ModuleType.__repr__ prefer __spec__ over module_repr() ↵Brett Cannon2021-03-247-153/+147
| | | | | (GH-24953) This is to work towards the removal of the use of module_repr() in Python 3.12 (documented as deprecated since 3.4).
* bpo-42914: add a pprint underscore_numbers option (GH-24864)sblondon2021-03-244-12/+48
| | | | | pprint() gains a new boolean underscore_numbers kwarg to emit integers with thousands separated by an underscore character for improved readability (for example 1_000_000 instead of 1000000).
* bpo-31861: Fix reference leak in builtin_anext_impl() (GH-25008)Pablo Galindo2021-03-241-1/+4
|
* bpo-43244: Remove the pyarena.h header (GH-25007)Victor Stinner2021-03-2420-187/+215
| | | | | | | | | | | | | | | | | | Remove the pyarena.h header file with functions: * PyArena_New() * PyArena_Free() * PyArena_Malloc() * PyArena_AddPyObject() These functions were undocumented, excluded from the limited C API, and were only used internally by the compiler. Add pycore_pyarena.h header. Rename functions: * PyArena_New() => _PyArena_New() * PyArena_Free() => _PyArena_Free() * PyArena_Malloc() => _PyArena_Malloc() * PyArena_AddPyObject() => _PyArena_AddPyObject()
* bpo-31861: Fix possible crash in PyAnextAwaitable_New (GH-25005)Pablo Galindo2021-03-241-1/+5
|
* bpo-43244: Remove parser_interface.h header file (GH-25001)Victor Stinner2021-03-2412-130/+70
| | | | | | | | | | | | | | | | | | | | | | | | | Remove parser functions using the "struct _mod" type, because the AST C API was removed: * PyParser_ASTFromFile() * PyParser_ASTFromFileObject() * PyParser_ASTFromFilename() * PyParser_ASTFromString() * PyParser_ASTFromStringObject() These functions were undocumented and excluded from the limited C API. Add pycore_parser.h internal header file. Rename functions: * PyParser_ASTFromFileObject() => _PyParser_ASTFromFile() * PyParser_ASTFromStringObject() => _PyParser_ASTFromString() These functions are no longer exported (replace PyAPI_FUNC() with extern). Remove also _PyPegen_run_parser_from_file() function. Update test_peg_generator to use _PyPegen_run_parser_from_file_pointer() instead.
* bpo-43452: Document the PyType_Lookup optimizations in the What's New for ↵Pablo Galindo2021-03-241-1/+4
| | | | 3.10 (GH-24949)
* bpo-31861: Complete the C-API docs for PyObject_GetAiter and PyAiter_Check ↵Pablo Galindo2021-03-235-0/+27
| | | | (GH-25004)
* bpo-43244: Add pycore_compile.h header file (GH-25000)Victor Stinner2021-03-2315-84/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the compiler functions using "struct _mod" type, because the public AST C API was removed: * PyAST_Compile() * PyAST_CompileEx() * PyAST_CompileObject() * PyFuture_FromAST() * PyFuture_FromASTObject() These functions were undocumented and excluded from the limited C API. Rename functions: * PyAST_CompileObject() => _PyAST_Compile() * PyFuture_FromASTObject() => _PyFuture_FromAST() Moreover, _PyFuture_FromAST() is no longer exported (replace PyAPI_FUNC() with extern). _PyAST_Compile() remains exported for test_peg_generator. Remove also compatibility functions: * PyAST_Compile() * PyAST_CompileEx() * PyFuture_FromAST()
* bpo-31861: Add aiter and anext to builtins (#23847)Joshua Bronson2021-03-2310-28/+373
| | | | | | Co-authored-by: jab <jab@users.noreply.github.com> Co-authored-by: Daniel Pope <mauve@mauveweb.co.uk> Co-authored-by: Justin Wang <justin39@gmail.com>
* bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)Victor Stinner2021-03-2329-933/+931
| | | | | | | | | | | | | | | | These functions were undocumented and excluded from the limited C API. Most names defined by these header files were not prefixed by "Py" and so could create names conflicts. For example, Python-ast.h defined a "Yield" macro which was conflict with the "Yield" name used by the Windows <winbase.h> header. Use the Python ast module instead. * Move Include/asdl.h to Include/internal/pycore_asdl.h. * Move Include/Python-ast.h to Include/internal/pycore_ast.h. * Remove ast.h header file. * pycore_symtable.h no longer includes Python-ast.h.
* bpo-41718: Update runpy startup time What's New (GH-24998)Victor Stinner2021-03-231-3/+4
|
* bpo-41718: runpy now imports pkgutil in functions (GH-24996)Victor Stinner2021-03-231-1/+2
| | | | | | Reduce the number of modules imported by "python3 -m module". The runpy module no longer imports at startup (in the module body), but only in functions using it: _get_code_from_file() and run_path().
* bpo-41718: subprocess imports grp and pwd on demand (GH-24987)Victor Stinner2021-03-232-24/+23
| | | | | The shutil and subprocess modules now only import the grp and pwd modules when they are needed, which is not the case by default in subprocess.
* Clarify attribute docs on types.ModuleType (GH-24974)Brett Cannon2021-03-231-2/+30
|
* bpo-41718: libregrtest avoids importing datetime (GH-24985)Victor Stinner2021-03-232-5/+6
| | | | * libregrtest reimplements datetime.timedelta.__str__() * support.testresult only imports datetime if USE_XML is true.
* bpo-41718: Disable support.testresult XML output by default (GH-24982)Victor Stinner2021-03-232-7/+22
| | | | | | | RegressionTestResult.USE_XML must now be set to True to get the JUnit XML output. Reduce the number of imports when --junit-xml=FILE option is not used: 153 => 144 (-9).
* bpo-41718: libregrtest runtest avoids import_helper (GH-24983)Victor Stinner2021-03-231-2/+4
| | | | Inline import_helper.unload() in libregrtest.runtest to avoid one import.
* bpo-41718: Reduce libregrtest runtest imports (GH-24980)Victor Stinner2021-03-223-97/+107
| | | | | | Move clear_caches() from libregrtest.refleak to libregrtest.utils to avoid importing libregrtest.refleak when it's not needed. clear_caches() now only calls re.purge() if 're' is in sys.modules.
* bpo-41718: regrtest saved_test_environment avoids imports (GH-24934)Victor Stinner2021-03-222-42/+69
| | | | | | | | | | | | | | | | | | | | | | | | | Reduce the number of modules imported by libregrtest. saved_test_environment no longer imports modules at startup, but try to get them from sys.modules. If an module is missing, skip the test. It also sets directly support.environment_altered. runtest() now now two saved_test_environment instances: one before importing the test module, one after importing it. Remove imports from test.libregrtest.save_env: * asyncio * logging * multiprocessing * shutil * sysconfig * urllib.request * warnings When a test method imports a module (ex: warnings) and the test has a side effect (ex: add a warnings filter), the side effect is not detected, because the module was not imported when Python enters the saved_test_environment context manager.
* bpo-43555: Report the column offset for invalid line continuation character ↵Pablo Galindo2021-03-224-6/+13
| | | | (GH-24939)
* bpo-43591: Fix error location in interactive mode for errors at the end of ↵Pablo Galindo2021-03-222-7/+17
| | | | | the line (GH-24973) Co-authored-by: Erlend Egeberg Aasland
* Revert "bpo-40521: Make dtoa bigint free list per-interpreter (GH-24821)" ↵Victor Stinner2021-03-223-39/+17
| | | | | (GH-24964) This reverts commit 5bd1059184b154d339f1bd53d23c98b5bcf14c8c.
* bpo-43575: Use PEP 590 vectorcall to speed up map() (GH-24955)Dong-hee Na2021-03-222-2/+45
|
* bpo-43551: Fix PyImport_Import() for subinterpreters (GH-24929)junyixie2021-03-221-16/+21
| | | Avoid static variables.
* bpo-35134: Add include/cpython/compile.h (GH-24922)Hai Shi2021-03-226-94/+100
| | | | Move C API excluded from the limited C API from Include/compile.h to a new Include/cpython/compile.h header file.