summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GH-108716: Turn off deep-freezing of code objects. (GH-108722)Mark Shannon2023-09-0815-86/+50
|
* Update `CODEOWNERS` for `Tools/wasm/` (#109119)Brett Cannon2023-09-081-0/+3
|
* gh-109022: [Enum] require `names=()` to create empty enum type (GH-109048)Ethan Furman2023-09-083-4/+14
| | | | | | | add guard so that ``Enum('bar')`` raises a TypeError instead of creating a new enum class called `bar`. To create the new but empty class, use: huh = Enum('bar', names=())
* Use unittest test runner for doctests in test_statistics (GH-108921)Serhiy Storchaka2023-09-071-8/+1
|
* Add version directives to ast docs (#108788)Shantanu2023-09-071-4/+42
|
* gh-68403: Fix test_coverage in test_trace (GH-108910)Serhiy Storchaka2023-09-071-3/+8
| | | Its behavior no longer affected by test running options such as -m.
* gh-75743: Restore test_timeout.testConnectTimeout() (#109087)Ee Durbin2023-09-071-16/+10
| | | | This un-skips this test now that pythontest.net implements appropriate firewall rules for it.
* gh-103186: Make test_generated_cases less noisy by default (GH-109100)Serhiy Storchaka2023-09-071-5/+14
| | | Print additional details only when tests are run with -vv.
* gh-109094: remove unnecessary updates of frame->prev_instr in ↵Irit Katriel2023-09-072-6/+11
| | | | instrumentation functions (#109076)
* gh-107924: re-order os.sendfile() flag documentation (#107926)Christoph Anton Mitterer2023-09-071-19/+20
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-108732: include comprehension locals in frame.f_locals (#109026)Carl Meyer2023-09-073-4/+19
| | | | Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-102823: Document return type of floor division on floats (#102824)Mark Dickinson2023-09-072-3/+7
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-88943: Improve syntax error for non-ASCII character that follows a ↵Serhiy Storchaka2023-09-073-1/+8
| | | | | numerical literal (GH-109081) It now points on the invalid non-ASCII character, not on the valid numerical literal.
* gh-107544: Add docs about `json.dumps(..., default=)` (#108259)Nikita Sobolev2023-09-071-1/+12
|
* gh-71770: Add more details on behavior of configparser's default_section ↵Stanley2023-09-071-2/+4
| | | | | | (#31562) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-108614: Add `RESUME_CHECK` instruction (GH-108630)Mark Shannon2023-09-0716-482/+519
|
* gh-103186: Suppress RuntimeWarning about unclosed async iterator in ↵Serhiy Storchaka2023-09-071-4/+28
| | | | test_sys_settrace (GH-109075)
* gh-103186: Remove debug print in test_sys_settrace (GH-109077)Serhiy Storchaka2023-09-071-1/+0
|
* GH-90915: Document that SystemExit doesn't trigger sys.excepthook (#31357)Colin Watson2023-09-071-1/+1
| | | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* socket documentation fix - rename triple to 3-tuple (#24722)Ori Hoch2023-09-071-2/+2
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* bpo-38157: Add example about per file output for mock_open. (#16090)Karthikeyan Singaravelan2023-09-071-0/+24
| | | | | | Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-103186: Suppress and assert expected RuntimeWarnings in test_sys_settrace ↵Ijtaba Hussain2023-09-072-32/+43
| | | | | | (GH-103244) Caused as a result of frame manipulation where locals are never assigned / initialised.
* test.pythoninfo logs freedesktop_os_release() (#109057)Victor Stinner2023-09-071-1/+21
|
* gh-108915: Removes extra backslashes in str.split docstring (#109044)Daniel Weiss2023-09-072-5/+5
|
* gh-108753: _Py_PrintSpecializationStats() uses Py_hexdigits (#109040)Victor Stinner2023-09-071-2/+2
|
* gh-109045: Remove remaining LIMITED_API_AVAILABLE checks in tests (#109046)Anders Kaseorg2023-09-074-18/+1
| | | | | | | | | Commit 13a00078b81776b23b0b6add69b848382240d1f2 (#108663) made all Python builds compatible with the Limited API, and removed the LIMITED_API_AVAILABLE flag. However, some tests were still checking for that flag, so they were now being incorrectly skipped. Remove these checks to let these tests run again. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* gh-107265: Remove all ENTER_EXECUTOR when execute _Py_Instrument (gh-108539)Dong-hee Na2023-09-074-32/+59
|
* gh-107211: No longer export internal _PyLong_FromUid() (#109037)Victor Stinner2023-09-071-11/+17
| | | | No longer export _PyLong_FromUid() and _Py_Sigset_Converter() internal C API function.
* gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016)Victor Stinner2023-09-067-0/+79
| | | | Skip test_asyncio, test_imaplib and test_socket tests if FreeBSD TCP blackhole is enabled (net.inet.tcp.blackhole=2).
* Docs: Fix typo in datetime.tzinfo docstring (#107257)Mikhail Samylov2023-09-061-1/+1
| | | | | Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-108202: Document ``calendar``'s command-line interface (#109020)Adam Turner2023-09-062-1/+144
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-104584: Restore frame->stacktop on optimizer error (GH-108953)Brandt Bucher2023-09-062-0/+3
|
* gh-108751: Add copy.replace() function (GH-108752)Serhiy Storchaka2023-09-0619-71/+314
| | | | | | | | | It creates a modified copy of an object by calling the object's __replace__() method. It is a generalization of dataclasses.replace(), named tuple's _replace() method and replace() methods in various classes, and supports all these stdlib classes.
* gh-107732: Mention dir support in importlib.resources docs (#107734)Shahriar Heidrich2023-09-062-5/+14
| | | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-90690: Mention removal of ``PRECALL`` in What's New (#103910)Anthony Shaw2023-09-061-0/+3
| | | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-106307: Fix PyMapping_GetOptionalItemString() (GH-108797)Serhiy Storchaka2023-09-062-0/+39
| | | | | | The resulting pointer was not set to NULL if the creation of a temporary string object was failed. The tests were also missed due to oversight.
* C API tests: use special markers to test that output parameters were set ↵Serhiy Storchaka2023-09-067-30/+60
| | | | (GH-109014)
* gh-108740: Fix "make regen-all" race condition (#108741)Victor Stinner2023-09-064-10/+38
| | | | | | | | | | | | | | | | | | Fix a race condition in "make regen-all". The deepfreeze.c source and files generated by Argument Clinic are now generated or updated before generating "global objects". Previously, some identifiers may miss depending on the order in which these files were generated. * "make regen-global-objects": Make sure that deepfreeze.c is generated and up to date, and always run "make clinic". * "make clinic" no longer runs generate_global_objects.py script. * "make regen-deepfreeze" now only updates deepfreeze.c (C file). It doesn't build deepfreeze.o (object) anymore. * Remove misleading messages in "make regen-global-objects" and "make clinic". They are now outdated, these commands are now safe to use. * Document generates files in Doc/using/configure.rst. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108753: Enhance pystats (#108754)Victor Stinner2023-09-0619-183/+402
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Statistics gathering is now off by default. Use the "-X pystats" command line option or set the new PYTHONSTATS environment variable to 1 to turn statistics gathering on at Python startup. Statistics are no longer dumped at exit if statistics gathering was off or statistics have been cleared. Changes: * Add PYTHONSTATS environment variable. * sys._stats_dump() now returns False if statistics are not dumped because they are all equal to zero. * Add PyConfig._pystats member. * Add tests on sys functions and on setting PyConfig._pystats to 1. * Add Include/cpython/pystats.h and Include/internal/pycore_pystats.h header files. * Rename '_py_stats' variable to '_Py_stats'. * Exclude Include/cpython/pystats.h from the Py_LIMITED_API. * Move pystats.h include from object.h to Python.h. * Add _Py_StatsOn() and _Py_StatsOff() functions. Remove '_py_stats_struct' variable from the API: make it static in specialize.c. * Document API in Include/pystats.h and Include/cpython/pystats.h. * Complete pystats documentation in Doc/using/configure.rst. * Don't write "all zeros" stats: if _stats_off() and _stats_clear() or _stats_dump() were called. * _PyEval_Fini() now always call _Py_PrintSpecializationStats() which does nothing if stats are all zeros. Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* gh-108851: Fix tomllib recursion tests (#108853)Victor Stinner2023-09-067-41/+177
| | | | | | | | | | | * Add get_recursion_available() and get_recursion_depth() functions to the test.support module. * Change infinite_recursion() default max_depth from 75 to 100. * Fix test_tomllib recursion tests for WASI buildbots: reduce the recursion limit and compute the maximum nested array/dict depending on the current available recursion limit. * test.pythoninfo logs sys.getrecursionlimit(). * Enhance test_sys tests on sys.getrecursionlimit() and sys.setrecursionlimit().
* gh-91960: Add FreeBSD build and test using Cirrus-CI (#91961)Ed Maste2023-09-062-0/+24
| | | | | | | Cirrus-CI is a hosted CI service that supports FreeBSD, Linux, macOS, and Windows. Add a .cirrus.yml configuration file to provide CI coverage on pull requests for FreeBSD 13.2. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-109002: Ensure only one wheel for each vendored package (#109003)Łukasz Langa2023-09-061-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Output with one wheel: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py Verifying checksum for /Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl. Expected digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be Actual digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be ::notice file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Successfully verified the checksum of the pip wheel. ``` Output with two wheels: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py ::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl::Found more than one wheel for package pip. ::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Found more than one wheel for package pip. ``` Output without wheels: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py ::error file=::Could not find a pip wheel on disk. ```
* gh-91960: Skip test_gdb if gdb cannot retrive Python frames (#108999)Victor Stinner2023-09-062-4/+10
| | | | | | | | | | Skip test_gdb if gdb is unable to retrieve Python frame objects: if a frame is "<optimized out>". When Python is built with "clang -Og", gdb can fail to retrive the 'frame' parameter of _PyEval_EvalFrameDefault(). In this case, tests like py_bt() are likely to fail. Without getting access to Python frames, python-gdb.py is mostly clueless on retrieving the Python traceback. Moreover, test_gdb is no longer skipped on macOS if Python is built with Clang.
* gh-107219: Fix concurrent.futures terminate_broken() (#108974)Victor Stinner2023-09-062-1/+10
| | | | | | | | Fix a race condition in _ExecutorManagerThread.terminate_broken(): ignore the InvalidStateError on future.set_exception(). It can happen if the future is cancelled before the caller. Moreover, test_crash_big_data() now waits explicitly until the executor completes.
* gh-108765: Cleanup #include in Python/*.c files (#108977)Victor Stinner2023-09-0618-48/+57
| | | Mention one symbol imported by each #include.
* gh-108303: Create Lib/test/test_dataclasses/ directory (#108978)Victor Stinner2023-09-067-5/+6
| | | | Move test_dataclasses.py and its "dataclass_*.py" modules into the new Lib/test/test_dataclasses/ subdirectory.
* gh-108983: Add more PEP 526 tests to `test_grammar` (#108984)Nikita Sobolev2023-09-061-0/+11
|
* gh-108991: replace _PyFrame_GetState by two simpler functions (#108992)Irit Katriel2023-09-061-31/+20
|
* gh-106670: Fix Pdb handling of chained Exceptions with no stacks. (#108865)Matthias Bussonnier2023-09-062-30/+108
|
* Fix a typo in umarshal.py (#108803)KH2023-09-061-1/+1
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>