Commit Graph

109735 Commits

Author SHA1 Message Date
Victor Stinner a41782cc84
bpo-43774: Document configure options (GH-25283)
Add Doc/using/configure.rst documentation to document configure,
preprocessor, compiler and linker options.

Add a new section about the "Python debug build".
2021-04-08 22:32:21 +02:00
Brandt Bucher d92c59f486
bpo-43764: Fix `__match_args__` generation logic for dataclasses (GH-25284) 2021-04-08 12:54:34 -07:00
Mark Shannon 28d28e053d
bpo-43760: Streamline dispatch sequence for machines without computed gotos. (GH-25244)
* Do fetch and decode at end of opcode then jump directly to switch.
  Should allow compilers that don't support computed-gotos, specifically MSVC,
  to generate better code.
2021-04-08 11:22:55 +01:00
Victor Stinner b98eba5bc2
bpo-43770: _PyTypes_Init() inits _PyAnextAwaitable_Type (GH-25266)
* Rename PyAnextAwaitable_Type to _PyAnextAwaitable_Type.
* Expose the type in the internal C API.
2021-04-08 09:58:15 +02:00
Stepan Sindelar 453074c8da
Fix broken test for MutableSet.pop() (GH-25209)
Changes the test to not assert concrete result of pop, but just that it
was an item from the set, and that the set shrunk by one.
2021-04-07 16:31:55 -07:00
Barney Gale 3f3d82b848
bpo-39899: os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. (GH-18841)
This makes `ntpath.expanduser()` match `pathlib.Path.expanduser()` in this regard, and is more in line with `posixpath.expanduser()`'s cautious approach.

Also remove the near-duplicate implementation of `expanduser()` in pathlib, and by doing so fix a bug where KeyError could be raised when expanding another user's home directory.
2021-04-07 23:50:13 +01:00
Victor Stinner df5dc1c7a5
bpo-43770: _PyTypes_Init() inits more static types (GH-25265) 2021-04-08 00:47:55 +02:00
Victor Stinner a518099078
bpo-43770: Sort types in _PyTypes_Init() (GH-25263) 2021-04-08 00:12:38 +02:00
Victor Stinner 3d55aa9e73
bpo-42923: Fix _Py_DumpExtensionModules() for NULL sysdict (GH-25262)
Fix Py_FatalError() is called before interp->sysdict is set.
2021-04-07 23:12:45 +02:00
Victor Stinner d27f8d2e07
bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252)
Rename AST functions of pycore_ast.h to use the "_PyAST_" prefix.
Remove macros creating aliases without prefix. For example, Module()
becomes _PyAST_Module(). Update Grammar/python.gram to use
_PyAST_xxx() functions.
2021-04-07 21:34:22 +02:00
Saiyang Gou 58d72cab89
bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235) 2021-04-07 20:06:43 +01:00
Barney Gale b05440c52b
bpo-39659: Route calls from pathlib.Path to os.getcwd() via the path accessor (GH-18834) 2021-04-07 17:31:49 +01:00
Barney Gale 8aac1bea2e
bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294) 2021-04-07 16:56:32 +01:00
Barney Gale abf964942f
bpo-39906: Add follow_symlinks parameter to pathlib.Path.stat() and chmod() (GH-18864) 2021-04-07 16:53:39 +01:00
tomKPZ 7a7ba3d343
bpo-43495 : Push missing frame block in compile.c (GH-24865) 2021-04-07 15:43:45 +01:00
Steve Dower e35dd556e1
Improve CDN purge script (GH-25251) 2021-04-07 13:14:00 +01:00
Yeting Li 7215d1ae25
bpo-43075: Fix ReDoS in urllib AbstractBasicAuthHandler (GH-24391)
Fix Regular Expression Denial of Service (ReDoS) vulnerability in
urllib.request.AbstractBasicAuthHandler. The ReDoS-vulnerable regex
has quadratic worst-case complexity and it allows cause a denial of
service when identifying crafted invalid RFCs. This ReDoS issue is on
the client side and needs remote attackers to control the HTTP server.
2021-04-07 13:27:41 +02:00
Victor Stinner d36d6a9c18
bpo-43244: Remove Yield macro from pycore_ast.h (GH-25243)
* pycore_ast.h no longer defines the Yield macro.
* Fix a compiler warning on Windows: "warning C4005: 'Yield': macro
  redefinition".
* Python-ast.c now defines directly functions with their real
  _Py_xxx() name, rather than xxx().
* Remove "#undef Yield" in C files including pycore_ast.h.
2021-04-07 13:01:09 +02:00
Mark Shannon 67969f5eb8
Correct micro release number and add a couple of asserts. (GH-25224) 2021-04-07 10:52:07 +01:00
Saiyang Gou 1be456ae9d
bpo-38605: Update "Future statements" docs since PEP 563 is always enabled (GH-25236)
Update documentation section for "Future statements" to reflect that `from __future__ import annotations` is on by default, and no features require using the future statement now.
2021-04-06 22:02:20 -07:00
Barney Gale 2219187cab
bpo-40038: pathlib: remove partial support for preserving accessor when modifying a path (GH-19342) 2021-04-07 01:26:37 +01:00
Barney Gale 986da8effc
bpo-39895: Move `pathlib.Path.touch()` implementation into the path accessor. (GH-18838) 2021-04-07 01:25:37 +01:00
Steve Dower 04732ca993
bpo-43105: Importlib now resolves relative paths when creating module spec objects from file locations (GH-25121) 2021-04-07 01:02:07 +01:00
Barney Gale b57e045320
bpo-39924: handle missing os functions more consistently in pathlib (GH-19220) 2021-04-07 00:01:22 +01:00
Steve Dower 7482838190
bpo-43567: Improved generated code refresh on Windows (GH-25120)
Generated files are now refreshed automatically on regular build, or may be forcibly regenerated by calling `build.bat --regen`.
2021-04-06 23:54:43 +01:00
Saiyang Gou 0fdf11e8e9
bpo-43755: Update docs to reflect that lambda is not allowed in `comp_if` since 3.9 (GH-25231) 2021-04-06 23:15:37 +01:00
Dennis Sweeney 50616223d1
bump the bytecode magic number (GH-25225) 2021-04-06 18:44:50 +01:00
Ken Jin 5143fd15b4
Update pattern matching docs for changes to the PEP (#25185)
See:
- https://github.com/python/peps/pull/1909 (__match_args__ must be a tuple)
- https://github.com/python/peps/pull/1908 (allow keyword patterns for int(x) etc.)
2021-04-06 09:03:00 -07:00
Brett Cannon 57c6cb5100
bpo-42135: Deprecate implementations of find_module() and find_loader() (GH-25169) 2021-04-06 08:56:57 -07:00
Dong-hee Na efccff9ac8
bpo-41870: Update What's News 3.10 about vectorcall (#25219)
* bpo-41870: Update What's News 3.10 about vectorcall

* update

* Update Doc/whatsnew/3.10.rst

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-04-07 00:43:59 +09:00
Eric V. Smith 1744c96ebc
Fix blurb for bpo-43176. (GH-25215) 2021-04-06 10:08:18 -04:00
Hai Shi 5787ba4a45
bpo-41111: Don't build xxlimited with Py_TRACE_REFS macro (GH-25180) 2021-04-06 14:55:13 +02:00
Steve Dower 354b015c17
bpo-43745: Actually updates Windows release to OpenSSL 1.1.1k. (GH-25213)
Earlier releases were mislabelled and included 1.1.1i again.
The tag/directory name is updated to ensure that builds get the fresh bits. However, the openssl-bin-1.1.1k tag in the repository has been forcibly updated, so fresh builds will be fine even without this change.
2021-04-06 13:08:30 +01:00
Mark Shannon b37181e692
bpo-43683: Handle generator entry in bytecode (GH-25138)
* Handle check for sending None to starting generator and coroutine into bytecode.

* Document new bytecode and make it fail gracefully if mis-compiled.
2021-04-06 11:48:59 +01:00
Inada Naoki 489c36920e
bpo-43651: PEP 597: Fix pdeps used locale encoding (GH-25204) 2021-04-06 17:02:54 +09:00
Gregory P. Smith 1d023e374c
bpo-17305: Link to the third-party idna package. (GH-25208)
So long as we don't have idna2008 in the standard library, we should at least point people to the third-party solution.
2021-04-06 00:55:45 -07:00
Iurii Kemaev 376ffc6ac4
bpo-43176: Fix processing of empty dataclasses (GH-24484)
When a dataclass inherits from an empty base, all immutability checks are omitted. This PR fixes this and adds tests for it.

Automerge-Triggered-By: GH:ericvsmith
2021-04-05 22:14:01 -07:00
Inada Naoki 4663e5f39e
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25190)
* Fix test_lzma
* Fix test_mailbox
* Fix test_mimetypes
* Fix test_posix
2021-04-06 13:02:22 +09:00
Inada Naoki fb78692f2a
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25189)
* Fix _sitebuiltins
* Fix test_inspect
* Fix test_interpreters
* Fix test_io
* Fix test_iter
* Fix test_json
* Fix test_linecache
* Fix test_lltrace
* Fix test_logging
* Fix logging
2021-04-06 11:18:41 +09:00
Brandt Bucher f84d5a1136
bpo-42128: __match_args__ can't be a list anymore (GH-25203) 2021-04-05 19:17:08 -07:00
Inada Naoki 3d4af4a876
bpo-43651: Fix EncodingWarning in sysconfig (GH-25192) 2021-04-06 10:01:11 +09:00
Raymond Hettinger 7bc25ec727
bpo-20503: Show how isinstance() works with ABC registered classes. (GH-25175) 2021-04-05 12:48:24 -07:00
Zackery Spytz 75220674c0
bpo-36470: Allow dataclasses.replace() to handle InitVars with default values (GH-20867)
Co-Authored-By: Claudiu Popa <pcmanticore@gmail.com>

Automerge-Triggered-By: GH:ericvsmith
2021-04-05 12:41:01 -07:00
Zackery Spytz 14829b09eb
bpo-43087: Fix error in ctypes "Incomplete Types" doc (GH-24404)
The previous "Fundamental data types" section says a c_char_p must be bytes (or None).
2021-04-05 15:21:00 -04:00
Terry Jan Reedy 4e2ef70841
Fix typo in turtledemo.two_canvases. (GH-25194) 2021-04-05 13:19:13 -04:00
Pablo Galindo 04eecf7fac
Post 3.10.0a7 2021-04-05 18:04:54 +01:00
Pablo Galindo 53e55290cf
Python 3.10.0a7 2021-04-05 17:39:49 +01:00
Pablo Galindo 57f21db3f6
Fix the "make suspicious" check on the pprint docs (GH-25193) 2021-04-05 17:38:10 +01:00
Serhiy Storchaka b1dc1aacf8
bpo-43084: Return bool instead of int from curses.window.enclose() (GH-24398) 2021-04-05 16:50:24 +03:00
Inada Naoki c8e5eb904e
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25181)
* Fix test_shutil
* Fix test_imp
* Fix test_import
* Fix test_importlib
2021-04-05 13:11:23 +09:00