summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-92584: Remove the distutils package (#99061)Victor Stinner2022-11-03113-22834/+26
| | | | | | | | | | | | Remove the distutils package. It was deprecated in Python 3.10 by PEP 632 "Deprecate distutils module". For projects still using distutils and cannot be updated to something else, the setuptools project can be installed: it still provides distutils. * Remove Lib/distutils/ directory * Remove test_distutils * Remove references to distutils * Skip test_check_c_globals and test_peg_generator since they use distutils
* gh-98978: Fix Py_SetPythonHome(NULL) (#99066)Victor Stinner2022-11-032-0/+9
| | | | | | Fix use-after-free in Py_SetPythonHome(NULL), Py_SetProgramName(NULL) and _Py_SetProgramFullPath(NULL) function calls. Issue reported by Benedikt Reinartz.
* gh-94172: Remove keyfile, certfile and check_hostname parameters (#94173)Victor Stinner2022-11-0312-181/+55
| | | | | | | | | | | | Remove the keyfile, certfile and check_hostname parameters, deprecated since Python 3.6, in modules: ftplib, http.client, imaplib, poplib and smtplib. Use the context parameter (ssl_context in imaplib) instead. Parameters following the removed parameters become keyword-only parameters. ftplib: Remove the FTP_TLS.ssl_version class attribute: use the context parameter instead.
* gh-90716: Remove _pylong._DEBUG flag (#99063)Victor Stinner2022-11-031-9/+0
| | | | To debug the _pylong module, it's trivial to add this code again locally. There is not need to keep it in Python releases.
* gh-98884: [pathlib] remove `hasattr` check for `lru_cache` (#98885)Nikita Sobolev2022-11-031-3/+1
|
* gh-92584: Remove references to removed _bootsubprocess (#99062)Victor Stinner2022-11-032-8/+1
| | | | The _bootsubprocess module was removed in gh-93939 by commit 81dca70d704d0834d8c30580e648a973250b2973.
* gh-97909: PyMemberDef & PyGetSetDef members are not marked up (GH-98810)Johnny115022022-11-031-17/+19
|
* gh-98401: Invalid escape sequences emits SyntaxWarning (#99011)Victor Stinner2022-11-0311-29/+69
| | | | | | | | | | | | | | | | | | | | | | A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence), use raw strings for regular expression: re.compile(r"\d+\.\d+"). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. Octal escapes with value larger than 0o377 (ex: "\477"), deprecated in Python 3.11, now produce a SyntaxWarning, instead of DeprecationWarning. In a future Python version they will be eventually a SyntaxError. codecs.escape_decode() and codecs.unicode_escape_decode() are left unchanged: they still emit DeprecationWarning. * The parser only emits SyntaxWarning for Python 3.12 (feature version), and still emits DeprecationWarning on older Python versions. * Fix SyntaxWarning by using raw strings in Tools/c-analyzer/ and wasm_build.py.
* GH-98831: Remove redundant extract_cases.py script (GH-99065)Guido van Rossum2022-11-033-338/+0
| | | Debt I owe from PR GH-98830.
* gh-97616: test_list_resize_overflow() uses sys.maxsize (#99057)Victor Stinner2022-11-031-1/+1
|
* gh-83004: Clean up refleak in _io initialisation (#98840)Shantanu2022-11-032-3/+4
|
* gh-98948: Remove obsolete readelf dependency (#98949)serge-sans-paille2022-11-036-130/+1
| | | | | This got introduced in commit 5884449539510313c826d69835829c7957c7154a to determine if readline is already linked against curses or tinfo in the setup.py, which is no longer present.
* gh-94199: Remove ssl.wrap_socket() documentation (#99023)Victor Stinner2022-11-031-51/+16
| | | | | | | The function has been removed. In the ssl documentation, replace references to the ssl.wrap_socket() function with references to the ssl.SSLContext.wrap_socket() method. Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
* GH-96793: Implement PEP 479 in bytecode. (GH-99006)Mark Shannon2022-11-0314-96/+220
| | | | | * Handle converting StopIteration to RuntimeError in bytecode. * Add custom instruction for converting StopIteration into RuntimeError.
* gh-98740: Fix validation of conditional expressions in RE (GH-98764)Serhiy Storchaka2022-11-034-27/+40
| | | | | | | | | | | In very rare circumstances the JUMP opcode could be confused with the argument of the opcode in the "then" part which doesn't end with the JUMP opcode. This led to incorrect detection of the final JUMP opcode and incorrect calculation of the size of the subexpression. NOTE: Changed return value of functions _validate_inner() and _validate_charset() in Modules/_sre/sre.c. Now they return 0 on success, -1 on failure, and 1 if the last op is JUMP (which usually is a failure). Previously they returned 1 on success and 0 on failure.
* GH-98831: "Generate" the interpreter (#98830)Guido van Rossum2022-11-0313-3851/+8961
| | | | | | | | | | | The switch cases (really TARGET(opcode) macros) have been moved from ceval.c to generated_cases.c.h. That file is generated from instruction definitions in bytecodes.c (which impersonates a C file so the C code it contains can be edited without custom support in e.g. VS Code). The code generator lives in Tools/cases_generator (it has a README.md explaining how it works). The DSL used to describe the instructions is a work in progress, described in https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md. This is surely a work-in-progress. An easy next step could be auto-generating super-instructions. **IMPORTANT: Merge Conflicts** If you get a merge conflict for instruction implementations in ceval.c, your best bet is to port your changes to bytecodes.c. That file looks almost the same as the original cases, except instead of `TARGET(NAME)` it uses `inst(NAME)`, and the trailing `DISPATCH()` call is omitted (the code generator adds it automatically).
* gh-98999: Raise `ValueError` in `_pyio` on closed buffers (gh-99009)Nikita Sobolev2022-11-033-12/+33
|
* Docs: Add 'as, match statement' to the index (#99001)Hugo van Kemenade2022-11-031-0/+1
|
* gh-98512: Add more tests for `ValuesView` (#98515)Nikita Sobolev2022-11-032-0/+6
|
* argparse howto: Use f-string in preference to "...".format() (#98883)Skip Montanaro2022-11-031-2/+2
|
* gh-96997: Clarify the contract of PyMem_SetAllocator() (#98977)Pablo Galindo Salgado2022-11-021-0/+21
|
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_elementtree` module (GH-99012)Kumar Aditya2022-11-021-25/+59
|
* gh-98393: Update test_os for bytes-like types (#98487)Victor Stinner2022-11-021-34/+12
| | | Address Serhiy Storchaka's review.
* gh-97731: Specify the full path to the docs for `make docclean` (GH-98982)Brett Cannon2022-11-022-1/+3
| | | | Specify the full path to the docs for `make docclean` This is to have `make clean` not error out on cross-builds.
* gh-98415: Fix uuid.getnode() ifconfig implementation (#98423)Chaim Sanders2022-11-022-2/+8
| | | | | | | | | The uuid.getnode() function has multiple implementations, tested sequentially. The ifconfig implementation was incorrect and always failed: fix it. In practice, functions of libuuid library are preferred, if available: uuid_generate_time_safe(), uuid_create() or uuid_generate_time(). Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* gh-98790: When DLLs directory is missing on Windows, assume executable_dir ↵Steve Dower2022-11-024-20/+53
| | | | contains PYD files instead (GH-98936)
* gh-99016: Make build scripts compatible with Python 3.8 (GH-99017)Serhiy Storchaka2022-11-023-3/+4
|
* GH-98686: Quicken everything (GH-98687)Brandt Bucher2022-11-0221-239/+144
|
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_asyncio` module (#99010)Kumar Aditya2022-11-023-69/+166
|
* gh-98989: configure: add 3.11 to list of Pythons (#98988)Jelle Zijlstra2022-11-023-2/+3
| | | | | Closes #98989 Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_json` module (GH-98956)Kumar Aditya2022-11-023-29/+46
|
* gh-87092: remove unused SET_LOC/UNSET_LOC macros (GH-98914)Irit Katriel2022-11-021-73/+6
|
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_curses` module (GH-98957)Kumar Aditya2022-11-021-12/+6
|
* gh-87092: do not allocate PyFutureFeatures dynamically (GH-98913)Irit Katriel2022-11-024-32/+22
|
* gh-98903: Test suite fails with exit code 4 if no tests ran (#98904)Victor Stinner2022-11-023-26/+52
| | | | | | | The Python test suite now fails wit exit code 4 if no tests ran. It should help detecting typos in test names and test methods. * Add "EXITCODE_" constants to Lib/test/libregrtest/main.py. * Fix a typo: "NO TEST RUN" becomes "NO TESTS RAN"
* gh-96265: Formatting changes for faq/programming (#98242)Stanley2022-11-021-39/+48
| | | | | | | | | | | | | | | | | * Formatting changes for faq/programming * Add missing method formatting, use non-literal formatting * Fix sphinx warnings * Some extra formatting missed earlier * More formatting suggestions from review Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> * Add missing colon, avoid referening external module Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-92679: Clarify asyncio.loop.start_tls parameters (#92682)Oleg Iarygin2022-11-021-3/+8
|
* gh-92871: Postpone the removal of typing.{io,re} to 3.13 (#98958)Sebastian Rittau2022-11-021-3/+3
|
* [doc] Update cookbook example for socket-based logging in a production ↵Vinay Sajip2022-11-011-7/+65
| | | | | sett… (GH-98922) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-98925: Lower marshal recursion depth for WASI (GH-98938)Brett Cannon2022-11-014-0/+7
| | | | | For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack. As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe.
* gh-98689: Update Windows builds to zlib v1.2.13 (GH-98968)Zachary Ware2022-11-013-2/+4
|
* Doc: use "unnumbered" footnotes (#98954)Manuel Kaufmann2022-11-011-2/+2
| | | | | Use unnumbered footnote in this file to avoid reseting the footnotes numbering. Example: when building the tutorial into a PDF and using `latex_show_urls = "footnotes"`; this footnote become the number 8. However, without this change, the footnote shows the number 1.
* gh-98931: Improve error message when the user types 'import x from y' ↵Pablo Galindo Salgado2022-11-015-392/+503
| | | | instead of 'from y import x' (#98932)
* gh-98852: Fix subscription of type aliases (GH-98920)Serhiy Storchaka2022-11-014-0/+43
| | | | | Fix subscription of type aliases containing bare generic types or types like TypeVar: for example tuple[A, T][int] and tuple[TypeVar, T][int], where A is a generic type, and T is a type variable.
* GH-98766: Modest speed-up from ChainMap.__iter__ (GH-98946)Raymond Hettinger2022-11-011-2/+2
|
* gh-98658: Add __class_getitem__ to array.array (#98661)Jelle Zijlstra2022-11-014-2/+12
| | | Closes #98658
* Rename JUMP_TO_INSTRUCTION to GO_TO_INSTRUCTION (#98934)Guido van Rossum2022-11-011-14/+14
| | | | | | This reduces confusion between jumps at the bytecode level (e.g. JUMPTO(), JUMPBY(), and various JUMP_*() opcodes) and jumps in the C code (which are 'goto' statements).
* Fix wording in Functional Programming HOWTO (GH-98939)partev2022-11-011-1/+1
|
* Missing PS1 prompt in tutorial example (GH-98921)Manuel Kaufmann2022-11-011-2/+3
|
* GH-98897: fix memory leak if `math.dist` raises exception (GH-98898)Kumar Aditya2022-11-013-3/+9
|