Serhiy Storchaka
26c0e5e03a
gh-108082: Remove _PyErr_WriteUnraisableMsg() (GH-111643)
...
Replace the remaining calls with PyErr_FormatUnraisable().
2023-11-03 09:45:53 +02:00
Terry Jan Reedy
0d3df272fb
gh-54434: Make difflib.rst doctests pass. ( #111677 )
2023-11-03 02:20:39 -04:00
AN Long
3a1b09e6d0
gh-111654: remove redundant decref in LOAD_FROM_DICT_OR_DEREF ( #111655 )
2023-11-02 21:06:51 -07:00
Eric Snow
93206d19a3
gh-76785: Minor Fixes in crossinterp.c (gh-111671)
...
There were a few corner cases I didn't handle properly in gh-111530, which I've noticed while working on a follow-up PR. This fixes those cases.
2023-11-03 00:45:42 +00:00
LoipesMas
489b80640f
Fix typo in documentation of SysLogHandler.createSocket
( #111665 )
2023-11-02 22:47:43 +00:00
Michael Droettboom
25937e3188
gh-111663: Restore the Tier 2 uop count pystats ( #111664 )
2023-11-02 15:24:52 -07:00
Tian Gao
f4b5588bde
gh-110892: Return NULL for PyTrace_RETURN
events caused by an exception (GH-110909)
2023-11-02 16:38:08 +00:00
Mark Shannon
0887b9ce8b
GH-109369 Add vectorcall to PyLong_Type
(GH-111642)
2023-11-02 15:07:47 +00:00
Victor Stinner
4fe22c7377
gh-111482: Use Argument Clinic for clock_gettime() ( #111641 )
...
Use Argument Clinic for time.clock_gettime() and
time.clock_gettime_ns() functions.
Benchmark on time.clock_gettime_ns():
import time
import pyperf
runner = pyperf.Runner()
runner.timeit(
'clock_gettime_ns(CLOCK_MONOTONIC_COARSE)',
setup='import time; clock_gettime_ns=time.clock_gettime_ns; CLOCK_MONOTONIC_COARSE=6',
stmt='clock_gettime_ns(CLOCK_MONOTONIC_COARSE)')
Result on Linux with CPU isolation:
Mean +- std dev: [ref] 134 ns +- 1 ns -> [change] 55.7 ns +- 1.4 ns: 2.41x faster
2023-11-02 14:29:05 +01:00
partev
6a0d7b43df
gh-111625: Fix link to Info-ZIP homepage ( #111626 )
2023-11-02 11:10:30 +00:00
dependabot[bot]
7215f173f5
build(deps): bump hypothesis from 6.87.1 to 6.88.1 in /Tools ( #111596 )
...
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis ) from 6.87.1 to 6.88.1.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases )
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.87.1...hypothesis-python-6.88.1 )
---
updated-dependencies:
- dependency-name: hypothesis
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-02 10:53:40 +00:00
dependabot[bot]
330392e288
build(deps): bump actions/setup-node from 3 to 4 ( #111594 )
...
* build(deps): bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node ) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases )
- [Commits](https://github.com/actions/setup-node/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump to Node.js 20
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-11-02 11:49:01 +01:00
Irit Katriel
52cc4af6ae
gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 ( #111459 )
2023-11-02 10:18:43 +00:00
Serhiy Storchaka
970e719a7a
gh-108082: Use PyErr_FormatUnraisable() (GH-111580)
...
Replace most of calls of _PyErr_WriteUnraisableMsg() and some
calls of PyErr_WriteUnraisable(NULL) with PyErr_FormatUnraisable().
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-11-02 09:16:34 +00:00
Serhiy Storchaka
a12f624a9d
Remove unnecessary includes (GH-111633)
2023-11-02 10:42:58 +02:00
Kumar Aditya
229f44d353
GH-110894: Call loop exception handler for exceptions in client_connected_cb ( #111601 )
...
Call loop exception handler for exceptions in `client_connected_cb` of `asyncio.start_server` so that applications can handle it.
2023-11-02 07:38:18 +00:00
Ayappan Perumal
794dff2fb1
gh-111544: Fix mimalloc build on AIX ( #111593 )
2023-11-02 08:01:50 +01:00
Anthony Shaw
230e8e924d
GH-111435: Add Support for Sharing True and False Between Interpreters (gh-111436)
...
This only affects users of the APIs in pycore_crossinterp.h (AKA _xxsubinterpretersmodule.c and _xxinterpchannels.c).
2023-11-02 00:09:01 +00:00
Eric Snow
9322ce90ac
gh-76785: Crossinterp utils additions (gh-111530)
...
This moves several general internal APIs out of _xxsubinterpretersmodule.c and into the new Python/crossinterp.c (and the corresponding internal headers).
Specifically:
* _Py_excinfo, etc.: the initial implementation for non-object exception snapshots (in pycore_pyerrors.h and Python/errors.c)
* _PyXI_exception_info, etc.: helpers for passing an exception beween interpreters (wraps _Py_excinfo)
* _PyXI_namespace, etc.: helpers for copying a dict of attrs between interpreters
* _PyXI_Enter(), _PyXI_Exit(): functions that abstract out the transitions between one interpreter and a second that will do some work temporarily
Again, these were all abstracted out of _xxsubinterpretersmodule.c as generalizations. I plan on proposing these as public API at some point.
2023-11-01 17:36:40 -06:00
Victor Stinner
cde1071b2a
gh-111089: Use PyUnicode_AsUTF8() in getargs.c ( #111620 )
...
Replace PyUnicode_AsUTF8AndSize() with PyUnicode_AsUTF8() to remove
the explicit check for embedded null characters.
2023-11-02 00:13:55 +01:00
Guido van Rossum
ff3b0a6938
High level docs for the VM state ( #111621 )
2023-11-01 22:55:10 +00:00
Guido van Rossum
e4b37835ef
GH-111485: Silence warnings in Python/executor_cases.c.h ( #111619 )
2023-11-01 14:24:52 -07:00
Yilei Yang
834b7c18d7
gh-106718: Treat PyConfig.stdlib_dir as highest-priority setting for stdlib_dir when calculating paths (GH-108730)
2023-11-01 21:11:18 +00:00
Victor Stinner
821a7ac493
gh-106168: Update PyList_SET_ITEM() What's New doc ( #111618 )
2023-11-01 21:46:10 +01:00
Yilei Yang
45a36d5f56
gh-111374: Add a new PYTHON_FROZEN_MODULES env var, equivalent of -X frozen_modules
. ( #111411 )
...
Adds a new PYTHON_FROZEN_MODULES env var to correspond with -X frozen_modules.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-01 20:39:31 +00:00
Guido van Rossum
7e135a48d6
gh-111520: Integrate the Tier 2 interpreter in the Tier 1 interpreter ( #111428 )
...
- There is no longer a separate Python/executor.c file.
- Conventions in Python/bytecodes.c are slightly different -- don't use `goto error`,
you must use `GOTO_ERROR(error)` (same for others like `unused_local_error`).
- The `TIER_ONE` and `TIER_TWO` symbols are only valid in the generated (.c.h) files.
- In Lib/test/support/__init__.py, `Py_C_RECURSION_LIMIT` is imported from `_testcapi`.
- On Windows, in debug mode, stack allocation grows from 8MiB to 12MiB.
- **Beware!** This changes the env vars to enable uops and their debugging
to `PYTHON_UOPS` and `PYTHON_LLTRACE`.
2023-11-01 13:13:02 -07:00
Serhiy Storchaka
5d6db168b9
Simplify trivial calls of PyUnicode_FromFormat() (GH-111605)
2023-11-01 19:54:32 +02:00
Victor Stinner
d9b606b3d0
gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic ( #111585 )
...
Replace PyUnicode_AsUTF8AndSize() with PyUnicode_AsUTF8() to remove
the explicit check for embedded null characters.
The change avoids to have to include explicitly <string.h> to get the
strlen() function when using a recent version of the limited C API.
2023-11-01 16:34:42 +01:00
Serhiy Storchaka
97b3cd38d1
gh-111495: Add tests for PyBytes and PyByteArray C API (GH-111496)
2023-11-01 17:31:07 +02:00
Serhiy Storchaka
937872e8ea
Simplify _PyPegen_join_names_with_dot() (GH-111602)
2023-11-01 16:25:36 +02:00
Mark Shannon
5697fc2d4b
GH-111537: Avoid using this_instr
in asserts. (GH-111600)
2023-11-01 12:59:08 +00:00
Mark Shannon
b14e882428
GH-111485: Use micro-ops to split specialization code from base action (GH-111561)
2023-11-01 10:53:27 +00:00
Serhiy Storchaka
eaf67e37a2
gh-111576: Improve documention for tkinter.messagebox (GH-111578)
2023-11-01 12:27:02 +02:00
Sergey B Kirpichev
33ed5fa69d
gh-111495: add stub files for C API test modules (GH-111586)
...
This is to reduce merge conflicts (Modules/Setup.stdlib.in) for
subsequent pull requests for the issue.
2023-11-01 07:44:54 +02:00
Victor Stinner
d9a5530d23
gh-110367: Make regrtest --verbose3 compatible with --huntrleaks -jN ( #111577 )
...
"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
2023-11-01 04:28:55 +01:00
Victor Stinner
ef83b3fc00
gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED was added to 3.12 ( #111584 )
2023-11-01 04:24:33 +01:00
Krzysiek Karbowiak
102685c4c8
gh-111282: Fix NamedTemporaryFile example code (GH-111283)
2023-10-31 17:06:02 -05:00
Thomas Grainger
770530679e
gh-110774: allow setting the Runner(loop_factory=...) from IsolatedAsyncioTestCase ( #110776 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-10-31 15:03:54 -07:00
Serhiy Storchaka
f6a02327b5
gh-108082: Add PyErr_FormatUnraisable() function (GH-111086)
2023-10-31 23:42:44 +02:00
Tomas R
453e96e302
gh-111420: Allow type comments in parenthesized with
statements ( #111468 )
2023-10-31 21:02:42 +00:00
Victor Stinner
faa5f6053d
gh-108765: Python.h no longer includes <stddef.h> on Windows ( #111563 )
...
In practice, only Windows is impacted, because the HAVE_STDDEF_H
macro was only defined on Windows.
2023-10-31 21:53:57 +01:00
Dino Viehland
c42347d025
gh-90815: Exclude mimalloc .c files from Windows build ( #111532 )
...
* Don't include mimalloc .c's in Windows build
* Fix warnings on Windows related to mimalloc
2023-10-31 11:54:35 -07:00
Quentin Peter
2445673983
gh-102249: Expand sys.call_tracing documentation ( #102806 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-10-31 16:24:54 +00:00
Prometheus3375
5cc6c80a77
gh-93607: document root
attribute of iterparse
( #99410 )
...
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-31 16:16:55 +00:00
xzmeng
cf3dbe4c3d
gh-106861: Docs: Add availability directives to all Unix-only modules ( #108975 )
2023-10-31 18:14:27 +02:00
Hugo van Kemenade
52a5b5d276
gh-111062: CI: Rename reusable-build-[X].yml to reusable-[X].yml ( #111552 )
2023-10-31 15:55:17 +00:00
Pablo Galindo Salgado
abb15420c1
gh-109181: Speed up Traceback object creation by lazily compute the line number ( #111548 )
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2023-10-31 15:02:31 +00:00
Anthony Shaw
ad6380bc34
GH-111438: Add Support for Sharing Floats Between Interpreters (gh-111439)
...
This only affects users of the APIs in pycore_crossinterp.h (AKA _xxsubinterpretersmodule.c and _xxinterpchannels.c).
2023-10-31 08:17:20 -06:00
Mark Shannon
2904d99839
GH-111485: Remove some special cases from the code generator and bytecodes.c (GH-111540)
2023-10-31 13:21:07 +00:00
Mark Shannon
d27acd4461
GH-111485: Increment next_instr
consistently at the start of the instruction. (GH-111486)
2023-10-31 10:09:54 +00:00