Commit Graph

111968 Commits

Author SHA1 Message Date
Irit Katriel 30322c497e
bpo-22047: [argparse] deprecate nested argument groups and mutually exclusive groups (GH-30098) 2021-12-16 15:31:08 +00:00
Ken Jin d6e1374716
bpo-45755: [typing] Reveal class attributes of generic in generic aliases in `dir()` (GH-29962) 2021-12-16 22:29:59 +08:00
Mark Shannon 4506bbede1
bpo-46072: Document --enable-stats option. (GH-30139) 2021-12-16 13:40:54 +00:00
Brandt Bucher 62a8a0c522
bpo-45829: Check `__getitem__`'s version for overflow before specializing (GH-30129)
* Check __getitem__'s version for overflow.

* Use SPEC_FAIL_OUT_OF_VERSIONS instead
2021-12-16 11:08:20 +00:00
Vivek Vashist c5d18a5014
Fix the output of built-in iter() function example in Iterators (Section 9.8) of The Python Tutorial (GH-30110)
Updated the output for it=iter(s) from <iterator object at 0x00A1DB50> to <str_iterator object at 0x10c90e650>
2021-12-16 18:40:12 +08:00
Irit Katriel a951c95a13
bpo-28816: [doc] clarify that zipimport invokes importers only for python files (GH-30060) 2021-12-16 09:12:24 +00:00
AN Long f62420c3d3
Remove spaces in empty lines (GH-30121) 2021-12-16 01:35:21 +09:00
Mark Shannon 342b93f9f2
bpo-46072: Add --with-pystats configure option to simplify gathering of VM stats (GH-30116)
* Simplify specialization stats collection macros.

* Add --enable-pystats option to configure.

* Update specialization summary script to handle larger number of kinds
2021-12-15 15:32:32 +00:00
Mark Shannon 3a60bfef49
bpo-44525: Specialize for calls to type and other builtin classes with 1 argument. (GH-29942) 2021-12-15 15:03:42 +00:00
Vivek Vashist f025ae63dc
Add Positional only arguments forward slash (/) to sorted() function in Built-in Functions document (GH-30113)
sorted() function is missing forward slash (/) in Built-in Functions documentation page.

Automerge-Triggered-By: GH:asvetlov
2021-12-15 03:24:38 -08:00
Mark Shannon 0b50a4f0cd
bpo-46039: Split yield from in two (GH-30035)
* Split YIELD_FROM opcode into SEND and JUMP_ABSOLUTE.

* Remove YIELD_FROM opcode.
2021-12-15 10:30:09 +00:00
Irit Katriel 86de99588d
bpo-26952: [argparse] clearer error when formatting an empty mutually… (GH-30099) 2021-12-15 10:08:26 +00:00
Mark Shannon f54fee7f37
Document new call opcodes for 3.11 (GH-30107) 2021-12-14 23:40:44 +00:00
Mark Shannon 9f8f45144b
bpo-44525: Split calls into PRECALL and CALL (GH-30011)
* Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW.

* Update specialization to handle new CALL opcodes.

* Specialize call to method descriptors.

* Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
2021-12-14 18:22:44 +00:00
Irit Katriel d60457a667
bpo-45292: [PEP-654] add except* (GH-29581) 2021-12-14 16:48:15 +00:00
Vinay Sajip 850aefc2c6
bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) 2021-12-14 16:46:07 +00:00
Alex Waygood 1cbb88736c
bpo-46059: Clarify pattern-matching example in "control flow" docs (GH-30079)
The "Color" example in the pattern-matching section of the "control flow" documentation is not immediately runnable, leading to confusion.

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-12-14 23:04:29 +08:00
Christian Heimes 74821b3053
bpo-46023: Skip build if module is marked as DISABLED (GH-30100) 2021-12-14 15:42:46 +01:00
Kumar Aditya d46d08d947
bpo-23469: Delete Wing IDE configuration files (GH-30067) 2021-12-14 15:01:13 +02:00
Dong-hee Na 9130a4d620
bpo-45919: Remove out of date comment (GH-30090) 2021-12-14 10:31:41 +09:00
Eric Snow 121f1f893a
bpo-45953: Statically initialize the small ints. (gh-30092)
The array of small PyLong objects has been statically declared. Here I also statically initialize them. Consequently they are no longer initialized dynamically during runtime init.

I've also moved them under a new sub-struct in _PyRuntimeState, in preparation for static allocation and initialization of other global objects.

https://bugs.python.org/issue45953
2021-12-13 18:04:05 -07:00
Vinay Sajip cb589d1b6b
bpo-46063: Improve algorithm for computing which rolled-over log file… (GH-30093) 2021-12-14 00:53:37 +00:00
Christian Heimes eb483c46d6
bpo-45949: Pure Python freeze module for cross builds (GH-29899) 2021-12-13 20:48:46 +01:00
Gareth Rees a62be77266
bpo-45643: Add signal.SIGSTKFLT on platforms where this is defined (GH-29266) 2021-12-13 18:22:43 +01:00
Dong-hee Na 191c431de7
bpo-45919: Use WinAPI GetFileType() in is_valid_fd() (GH-30082) 2021-12-13 21:57:59 +09:00
Paul Bryan e09705f58f
Clarify new_event_loop return value. (GH-30078) 2021-12-13 14:39:22 +02:00
AN Long b56774bd93
bpo-16594: Add allow_reuse_port on socketserver (GH-30072)
* bpo-16594: Add allow_reuse_port on socketserver

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2021-12-13 14:14:17 +02:00
Irit Katriel 481f3ffdbe
bpo-37602: Clarify that the lib2to3 nonzero fixer changes only definitions (GH-30075) 2021-12-13 10:04:34 +00:00
Serhiy Storchaka e08c0d8eec
bpo-27718: Fix help for the signal module (GH-30063)
Functions signal(), getsignal(), pthread_sigmask(), sigpending(),
sigwait() and valid_signals() were omitted.

If __all__ is not defined all non-builtin functions should have
correct __module__.
2021-12-13 11:21:55 +02:00
Andre Delfino d0669c5e69
Remove erroneous padding in dataclasses (GH-30076)
Automerge-Triggered-By: GH:ericvsmith
2021-12-12 10:05:48 -08:00
Pablo Galindo Salgado c6d1c52c16
bpo-46054: Correct non-utf8 character tests in test_exceptions (GH-30074) 2021-12-12 16:53:00 +00:00
Georg Brandl f4095e53ab
bpo-45855: document that `no_block` has no use anymore in PyCapsule_Import (#29665) 2021-12-12 10:49:50 +01:00
Jim Crist-Harif f3c16a5e72
Re-add `reuse_address` parameter to `create_server` (GH-29733)
This parameter was accidentally removed when fixing
https://bugs.python.org/issue45129, this reverts the unnecessary changes
there.

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2021-12-12 11:47:01 +02:00
Kumar Aditya 41026c3155
bpo-45855: Replaced deprecated `PyImport_ImportModuleNoBlock` with PyImport_ImportModule (GH-30046) 2021-12-12 10:45:20 +02:00
Christian Sattler e6fe10d340
bpo-45874: Handle empty query string correctly in urllib.parse.parse_qsl (#29716) 2021-12-12 10:41:12 +02:00
Pablo Galindo Salgado 4325a766f5
bpo-46054: Fix parsing error when parsing non-utf8 characters in source files (GH-30068) 2021-12-12 07:06:50 +00:00
Pablo Galindo Salgado 59435eea08
bpo-46042: Improve SyntaxError locations in the symbol table (GH-30059) 2021-12-11 21:28:24 +00:00
Eric V. Smith e029c53e1a
bpo-44674: Use unhashability as a proxy for mutability for default dataclass __init__ arguments. (GH-29867)
`@dataclass` in 3.10 prohibits using list, dict, or set as default values. It does this to avoid the mutable default problem. This test is both too strict, and not strict enough. Too strict, because some immutable subclasses should be safe, and not strict enough, because other mutable types should be prohibited. With this change applied, `@dataclass` now uses unhashability as a proxy for mutability: if objects aren't hashable, they're assumed to be mutable.
2021-12-11 16:12:17 -05:00
Steve Dower bfc59ed0a0
bpo-46049: Fixes ._pth support on non-Windows (GH-30051) 2021-12-11 15:06:17 +00:00
Steve Dower 971ece8e17
bpo-46048: Fix parsing of single character lines in getpath readlines() (GH-30048) 2021-12-11 13:43:40 +00:00
180909 4fe5585240
bpo-19737: Improved the documentation for globals (GH-29823)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-12-11 01:04:21 +01:00
dependabot[bot] 901cbbd2ca
build(deps): bump actions/cache from 2.1.6 to 2.1.7 (GH-29875)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 2.1.7.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.6...v2.1.7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-11 00:46:49 +01:00
Carl Friedrich Bolz-Tereick b593bdc780
bpo-37971: fix the position of decorator application (GH-30027)
The line numbers of actually calling the decorator functions of
functions and classes was wrong (as opposed to loading them, were they
have been correct previously too).

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-12-11 00:45:02 +01:00
Weipeng Hong 28179aac79
bpo-42918: Improve build-in function compile() in mode 'single' (GH-29934)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-12-11 00:44:26 +01:00
Petr Viktorin 98e506ae8a
bpo-43795: Document stable_abi.txt format and contents (GH-29956)
Also mention that removals generally aren't allowed.
2021-12-11 00:34:31 +01:00
Yurii Karabas 3cb357a2e6
bpo-46014: Add ability to use typing.Union with singledispatch (GH-30017) 2021-12-11 00:27:55 +01:00
Kumar Aditya 810c1769f1
bpo-27062: add `__all__` to inspect module (GH-30003) 2021-12-11 00:05:23 +01:00
Irit Katriel 0fe104fce7
bpo-45635: refactor print_exception_recursive into smaller functions to standardize error handling (GH-30015)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-12-10 23:02:10 +00:00
Louis Sautier c1051e08b3
bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976)
Signed-off-by: Louis Sautier <sautier.louis@gmail.com>
2021-12-11 00:00:02 +01:00
Christian Heimes 16638a4bdb
bpo-45654: No need to freeze types (GH-30028) 2021-12-10 19:09:09 +01:00