Commit graph

113810 commits

Author SHA1 Message Date
Oleg Iarygin
f62ff97f31
gh-93851: Fix all broken links in Doc/ (GH-93853) 2022-06-21 20:55:18 +02:00
MilanJuhas
7327d61abe
Closes gh-94038: Update Release Schedule in README.rst from PEP 664 to PEP 693 (GH-94046) 2022-06-21 13:08:21 -05:00
Steve Dower
5a08e0fda4
gh-94068: Remove HVSOCKET_CONTAINER_PASSTHRU constant because it has been removed from Windows (GH-94069)
Fixes #94068

Automerge-Triggered-By: GH:zware
2022-06-21 10:27:21 -07:00
Adam Turner
0efe3a1636
gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)
* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"

This reverts commit 5c1f15b4b1

* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"

This reverts commit b63a620014.
2022-06-21 17:04:46 +02:00
Mark Shannon
6f8875eba3
GH-93841: Allow stats to be turned on and off, cleared and dumped at runtime. (GH-93843) 2022-06-21 15:40:54 +01:00
Victor Stinner
c7a79bb036
gh-74953: _PyThread_cond_after() uses _PyTime_t (#94056)
pthread _PyThread_cond_after() implementation now uses the _PyTime_t
type to handle properly overflow: clamp to the maximum value.

Remove MICROSECONDS_TO_TIMESPEC() function.
2022-06-21 15:45:49 +02:00
Victor Stinner
616fa3465d
gh-54781: Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/ (#94049)
* Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/.
* Remove Lib/test/test_lib2to3.py.
* Update imports.
* all_project_files(): use different paths and sort files
  to make the tests more reproducible.
* Update references to tests.
2022-06-21 15:21:22 +02:00
Christian Heimes
50ebd72fb0
gh-93839: Use load_package_tests() for testmock (GH-94055)
Fixes failing tests on WebAssembly platforms.

Automerge-Triggered-By: GH:tiran
2022-06-21 05:51:39 -07:00
Christian Heimes
0ff7b996f5
gh-94052: Don't re-run failed tests with --python option (#94054) 2022-06-21 14:42:32 +02:00
Erlend Egeberg Aasland
94eeac03dc
gh-94028: Clear and reset sqlite3 statements properly in cursor iternext (GH-94042) 2022-06-21 12:30:29 +01:00
Dennis Sweeney
5fcfdd87c9
GH-91432: Specialize FOR_ITER (GH-91713)
* Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations.

* Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
2022-06-21 11:19:26 +01:00
Victor Stinner
c735d54534
gh-93839: Move Lib/unttest/test/ to Lib/test/test_unittest/ (#94043)
* Move Lib/unittest/test/ to Lib/test/test_unittest/
* Remove Lib/test/test_unittest.py
* Replace unittest.test with test.test_unittest
* Remove unittest.load_tests()
* Rewrite unittest __init__.py and __main__.py
* Update build system, CODEOWNERS, and wasm_assets.py
2022-06-21 10:27:59 +02:00
Victor Stinner
d82e0bfe8b
gh-93839: Move Lib/ctypes/test/ to Lib/test/test_ctypes/ (#94041)
* Move Lib/ctypes/test/ to Lib/test/test_ctypes/
* Remove Lib/test/test_ctypes.py
* Update imports and build system.
2022-06-21 10:24:33 +02:00
Irit Katriel
889772fb56
GH-93678: refactor compiler so that optimizer does not need the assembler and compiler structs (GH-93842) 2022-06-21 09:22:17 +01:00
Christian Heimes
77c839c98f
gh-94021: Address unreachable code warning in specialize code (GH-94022) 2022-06-20 23:34:11 -07:00
Irit Katriel
1603a1029f
GH-93249: relax overly strict assertion on bounds->ar_start (GH-93961) 2022-06-20 17:13:39 +01:00
Victor Stinner
cfb986a1a2
gh-93937: PyOS_StdioReadline() uses PyConfig.legacy_windows_stdio (#94024)
On Windows, PyOS_StdioReadline() now gets
PyConfig.legacy_windows_stdio from _PyOS_ReadlineTState, rather than
using the deprecated global Py_LegacyWindowsStdioFlag variable.

Fix also a compiler warning in Py_SetStandardStreamEncoding().
2022-06-20 16:10:47 +02:00
Victor Stinner
7ad6f74fcf
gh-87347: Add parenthesis around macro arguments (#93915)
Add unit test on Py_MEMBER_SIZE() and some other macros.
2022-06-20 16:04:52 +02:00
Matthias Köppe
61f24e7885
gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (#92754) 2022-06-20 15:58:02 +02:00
Mark Shannon
ab0e601016
GH-93516: Speedup line number checks when tracing. (GH-93763)
* Use a lookup table to reduce overhead of getting line numbers during tracing.
2022-06-20 13:00:42 +01:00
Mark Shannon
45e62a2bc1
GH-93897: Store frame size in code object and de-opt if insufficient space on thread frame stack. (GH-93908) 2022-06-20 12:59:25 +01:00
Christian Heimes
774ef28814
gh-84461: Silence some compiler warnings on WASM (GH-93978) 2022-06-20 13:34:40 +02:00
itssme
affa9f22cf
gh-79009: sqlite3.iterdump now correctly handles tables with autoincrement (#9621)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-06-20 00:59:24 +02:00
Erlend Egeberg Aasland
8e08978141
gh-61162: Clarify sqlite3 connection context manager docs (GH-93890)
Explicitly note that transactions are only closed if there is an open
transation at `__exit__`, and that transactions are not implicitly
opened during `__enter__`.

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>

Automerge-Triggered-By: GH:erlend-aasland
2022-06-19 13:17:43 -07:00
Erlend Egeberg Aasland
6446592c89
gh-93925: Improve clarity of sqlite3 commit/rollback, and close docs (#93926)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-19 21:17:28 +02:00
Christian Heimes
62363bfe59
gh-84461: Skip test_unwritable_directory again on Emscripten (GH-94007)
GH-93992 removed geteuid() and enabled the test again on Emscripten.
2022-06-19 20:18:57 +02:00
Christian Heimes
2702e408fd
gh-84461: Fix Emscripten umask and permission issues (GH-94002)
- Emscripten's default umask is too strict, see
  https://github.com/emscripten-core/emscripten/issues/17269
- getuid/getgid and geteuid/getegid are stubs that always return 0
  (root). Disable effective uid/gid syscalls and fix tests that use
  chmod() current user.
- Cannot drop X bit from directory.
2022-06-19 18:28:55 +02:00
Lei Zhang
476d302508
gh-93991: Use boolean instead of 0/1 for condition check (GH-93992)
# gh-93991: Use boolean instead of 0/1 for condition check
2022-06-19 07:12:59 -07:00
Victor Stinner
27b9894033
gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938)
Move the follow functions and type from frameobject.h to pyframe.h,
so the standard <Python.h> provide frame getter functions:

* PyFrame_Check()
* PyFrame_GetBack()
* PyFrame_GetBuiltins()
* PyFrame_GetGenerator()
* PyFrame_GetGlobals()
* PyFrame_GetLasti()
* PyFrame_GetLocals()
* PyFrame_Type

Remove #include "frameobject.h" from many C files. It's no longer
needed.
2022-06-19 12:02:33 +02:00
Victor Stinner
2664d9aacf
gh-74953: Reformat PyThread_acquire_lock_timed() (#93947)
Reformat the pthread implementation of PyThread_acquire_lock_timed()
using a mutex and a conditioinal variable.

* Add goto to avoid multiple indentation levels and exit quickly
* Use "while(1)" and make the control flow more obvious.
* PEP 7: Add braces around if blocks.
2022-06-19 11:50:21 +02:00
Victor Stinner
dba3fa57e2
gh-93761: Fix test_logging test_config_queue_handler() race condition (#93952)
Fix a race condition in test_config_queue_handler() of test_logging.
2022-06-19 11:49:35 +02:00
Hugo van Kemenade
59c1b33805
What's new in 3.10: fix link to issue (#93968)
* What's new in 3.10: fix link to issue

* What's new in 3.10: fix link to GH issue

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-06-19 11:04:26 +02:00
Kumar Aditya
726448ebe1
GH-93990: fix refcounting bug in add_subclass in typeobject.c (GH-93989) 2022-06-19 14:06:37 +08:00
Jason R. Coombs
6066f450b9
gh-93975: Nicer error reporting in test_venv (GH-93959)
- gh-93957: Provide nicer error reporting from subprocesses in test_venv.EnsurePipTest.test_with_pip.
- Update changelog

This change does three things:

1. Extract a function for trapping output in subprocesses.
2. Emit both stdout and stderr when encountering an error.
3. Apply the change to `ensurepip._uninstall` check.
2022-06-18 13:47:27 -07:00
Christian Heimes
dd78aae34b
gh-91387: Fix tarfile test on WASI (GH-93984)
WASI's rmdir() syscall does not like the trailing slash.
2022-06-18 10:55:48 -07:00
Ken Jin
fea1e9bc5c
gh-93955: Use unbound methods for slot __getattr__ and __getattribute__ (GH-93956) 2022-06-18 22:42:42 +08:00
Christian Heimes
7a2cc35e1c
gh-84461: Fix pydebug Emscripten browser builds (GH-93982)
wasm_assets script did not take the ABIFLAG flag of sysconfigdata into
account.
2022-06-18 14:51:50 +02:00
Serhiy Storchaka
f9433fff47
gh-89828: Do not relay the __class__ attribute in GenericAlias (#93754)
list[int].__class__ returned type, and isinstance(list[int], type)
returned True. It caused numerous problems in code that checks
isinstance(x, type).
2022-06-18 11:34:57 +03:00
Christian Heimes
084023ccbe
gh-84461: Fix circulare dependency on BUILDPYTHON (GH-93977) 2022-06-18 10:19:48 +02:00
Jason R. Coombs
b96d56d434
Add jaraco as primary owner of importlib.metadata and importlib.resources. (#93960)
* Add jaraco as primary owner of importlib.metadata and importlib.resources.

* Align indentation.

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-06-17 23:12:07 -04:00
Chris Fernald
c1e19421c2
gh-91387: Strip trailing slash from tarfile longname directories (GH-32423)
Co-authored-by: Brett Cannon <brett@python.org>
2022-06-17 15:38:41 -07:00
Irit Katriel
b1ae4af5e8
GH-77403: Fix tests which fail when PYTHONUSERBASE is not normalized (GH-93917) 2022-06-17 23:28:23 +01:00
CAM Gerlach
71354adff0
gh-92611: Add details on replacements for cgi utility funcs (GH-92792)
Per @brettcannon 's [suggestions on the Discourse thread](https://discuss.python.org/t/pep-594-take-2-removing-dead-batteries-from-the-standard-library/13508/51), discussed in #92611 and as a followup to PR #92612 , this PR add additional specific per-function replacement information for the utility functions in the `cgi` module deprecated by PEP 594 (PEP-594).

@brettcannon , should this be backported (without the `deprecated-removed` , which I would update it accordingly and re-add in my other PR adding that to the others for 3.11+), or just go in 3.11+?
2022-06-17 14:05:21 -07:00
Kumar Aditya
96464e5401
GH-89858: Fix test_embed for out-of-tree builds (GH-93465) 2022-06-17 17:24:17 +01:00
Ken Jin
11190c4ad0
gh-92888: Fix memoryview bad __index__ use after free (GH-92946)
Co-authored-by: chilaxan <35645806+chilaxan@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <3659035+serhiy-storchaka@users.noreply.github.com>
2022-06-17 23:14:53 +08:00
Ken Jin
a51742ab82
gh-93911: Specialize LOAD_ATTR_PROPERTY (GH-93912) 2022-06-17 23:13:17 +08:00
Victor Stinner
0ff626f210
gh-77782: Deprecate global configuration variable (#93943)
Deprecate global configuration variable like
Py_IgnoreEnvironmentFlag: the Py_InitializeFromConfig() API should be
instead.

Fix declaration of Py_GETENV(): use PyAPI_FUNC(), not PyAPI_DATA().
2022-06-17 16:12:00 +02:00
Victor Stinner
f64557f480
gh-74953: Fix PyThread_acquire_lock_timed() code recomputing the timeout (#93941)
Set timeout, don't create a local variable with the same name.
2022-06-17 16:11:25 +02:00
Victor Stinner
e444752fab
gh-74953: Add _PyTime_FromMicrosecondsClamp() function (#93942) 2022-06-17 16:11:13 +02:00
Victor Stinner
1735710873
gh-77782: Py_FdIsInteractive() now uses PyConfig.interactive (#93916) 2022-06-17 15:19:28 +02:00