Commit graph

111850 commits

Author SHA1 Message Date
Pablo Galindo Salgado 9d35dedc5e
Revert "bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177)" (GH-30363)
This reverts commit e9898bf153 temporarily as we want to confirm if this commit is the cause of a slowdown at startup time.
2022-01-03 18:29:18 +00:00
David CARLIER c960b191b8
bpo-46222: posixmodule sendfile FreeBSD's constants updates. (GH-30327)
* posixodule sendfile FreeBSD's constants updates.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-01-03 15:01:04 +02:00
Ned Deily 549e628272
bpo-40477: macOS Python Launcher app fixes for recent macOS releases (GH-30348)
This change solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+):

- The launcher app was no longer able to launch the macOS Terminal.app to run a script.

- Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file.
2022-01-03 01:19:59 -05:00
Nikita Sobolev fedefa6735
bpo-46229: remove CODE_OF_CONDUCT.md to use org default (GH-30342)
Automerge-Triggered-By: GH:Mariatta
2022-01-02 15:30:54 -08:00
Irit Katriel 65e7c1f90e
bpo-46219, 46221: simplify except* implementation following exc_info changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289) 2022-01-02 23:22:42 +00:00
Jade Lovelace 8e75c6b49b
argparse docs: prog default is the basename of argv[0] (GH-30298) 2022-01-02 12:16:25 -08:00
Benjamin Peterson ba00f0d93a
Update copyright year to 2022. (GH-30335)
Automerge-Triggered-By: GH:benjaminp
2022-01-02 12:08:48 -08:00
Tim Peters 863729e9c6
bpo-46218: Change long_pow() to sliding window algorithm (GH-30319)
* bpo-46218: Change long_pow() to sliding window algorithm

The primary motivation is to eliminate long_pow's reliance on that the number of bits in a long "digit" is a multiple of 5. Now it no longer cares how many bits are in a digit.

But the sliding window approach also allows cutting the precomputed table of small powers in half, which reduces initialization overhead enough that the approach pays off for smaller exponents too. Depending on exponent bit patterns, a sliding window may also be able to save some bigint multiplies (sometimes when at least 5 consecutive exponent bits are 0, regardless of their starting bit position modulo 5).

Note: boosting the window width to 6 didn't work well overall. It give marginal speed improvements for huge exponents, but the increased overhead (the small-power table needs twice as many entries) made it a loss for smaller exponents.

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2022-01-02 13:18:20 -06:00
Nikita Sobolev ce4d25f3cd
bpo-46196: document method cmd.Cmd.columnize (#30303)
The method is already written and tested, now it's officially public.
2022-01-02 13:33:20 -05:00
Hugo van Kemenade 7a8796dc67
bpo-45903: Fix typo in What's New: Signature.from_builtin is removed (GH-29813) 2022-01-02 08:51:56 -08:00
Irit Katriel a82baed0e9
bpo-45615: Add missing test for printing traceback for non-exception. Fix traceback.py (GH-30091) 2022-01-02 09:34:03 +00:00
Raymond Hettinger a09bc3a404
bpo-46095: Improve SeqIter documentation. (GH-30316) 2022-01-01 10:37:26 -08:00
Raymond Hettinger ac4eea2172
bpo-46079: Replace external link that is down for maintenance. (GH-30315) 2022-01-01 09:49:55 -08:00
Mark Dickinson 0b58bac3e7
bpo-37295: More direct computation of power-of-two factor in math.comb (GH-30313)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-31 19:52:27 +00:00
Sebastian Pipping e18d81569f
bpo-45321: Add missing error codes to module xml.parsers.expat.errors (GH-30188)
The idea is to ensure that module `xml.parsers.expat.errors`
contains all known error codes and messages,
even when CPython is compiled or run with an outdated version of libexpat.

https://bugs.python.org/issue45321
2021-12-31 10:57:00 +01:00
Jason R. Coombs 35628e4cde
bpo-46118: Make sure importlib.resources is included. (GH-30311) 2021-12-30 22:39:24 -05:00
Jason R. Coombs 99945c6b5c
bpo-46109: Separate out files relating to importlib.resources (GH-30160)
* Separate out files relating to importlib.resources

* Update Introduction to direct readers to the submodule documentation.

* Create separate file for abcs relating to resources.

* Move abc docs back to where they were.
2021-12-30 21:17:05 -05:00
Jason R. Coombs e712a5b277
bpo-46118: Move importlib.resources to its own package. (#30176)
* bpo-46118: Move importlib.resources to its own package.

* Expand compatibility shims with documentation and explicit imports.
2021-12-30 21:00:48 -05:00
Hugo van Kemenade 2cf7d02b99
bpo-46178: Remove/rename redundant Travis CI code (#30309) 2021-12-30 16:16:27 -08:00
Nikita Sobolev 82c2b54a35
bpo-46178: remove unusued .travis.yml file (#30257)
* bpo-46178: remove unusued `.travis.yml` file

* Delete 2021-12-26-12-35-41.bpo-46178.Aw1TZg.rst
2021-12-30 13:26:01 -08:00
Nikita Sobolev fbaf2e604c
bpo-46184: remove netlify.toml (#30272)
* bpo-46184: remove `netlify.toml`

* Delete runtime.txt

* Delete requirements.txt

* Revert "Delete requirements.txt"

This reverts commit 9aa4f0631f.
2021-12-30 13:18:37 -08:00
Nikita Sobolev 30ee33d6be
Delete FUNDING.yml, since there's an organisation default (#30294) 2021-12-30 12:24:46 -08:00
andrei kulakov 8d7644fa64
bpo-45853: Fix misspelling and unused import in pathlib (GH-30292) 2021-12-30 09:45:06 +02:00
Dong-hee Na fb44d05896
bpo-46085: Fix iterator cache mechanism of OrderedDict. (GH-30290) 2021-12-30 12:35:45 +09:00
Nikita Sobolev d12bec6993
bpo-43424: Deprecate webbrowser.MacOSXOSAScript._name attribute (GH-30241) 2021-12-30 10:30:13 +09:00
Carlos Damazio 8e11237c5d
closes docs: remove references to Py_USING_MEMORY_DEBUGGER (GH-30284) 2021-12-29 16:20:42 -06:00
Erlend Egeberg Aasland bc87ac6d0b
bpo-46185: Fix wrong version ref. in macOS installer ReadMe (GH-30278) 2021-12-29 20:39:49 +01:00
David CARLIER 66c47b63a0
bpo-46176: mmap module adding MAP_STACK constant. (GH-30252) 2021-12-29 22:52:29 +09:00
Brandt Bucher 77195cd44b
bpo-46090: Allow PyThreadState.datastack_* members to be NULL (GH-30234) 2021-12-28 09:49:48 -08:00
Mark Dickinson 02b5417f11
bpo-37295: Speed up math.comb(n, k) for 0 <= k <= n <= 67 (GH-30275) 2021-12-28 12:26:40 +00:00
Dong-hee Na 196b53eb1e
bpo-45189: Drop the "list_frozen" command from _test_embed. (GH-30273) 2021-12-28 11:05:50 +09:00
Xinhang Xu 3581c7abbe
bpo-46055: Speed up binary shifting operators (GH-30044)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2021-12-27 18:36:55 +00:00
Mark Dickinson 360fedc2d2
bpo-46055: Streamline inner loop for right shifts (#30243) 2021-12-27 18:04:36 +00:00
E-Paine 2e3e0d23ad
bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185) 2021-12-26 13:28:24 +02:00
Serhiy Storchaka ad4857884b
bpo-43413: Revert changes in set.__init__ (GH-28403)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-12-26 13:27:01 +02:00
Serhiy Storchaka 1944434b44
bpo-22815: Print unexpected successes in summary in TextTestResult (GH-30138) 2021-12-26 13:22:44 +02:00
Kumar Aditya a23ab7b6d8
bpo-23819: Fix asyncio tests on python optimized mode (GH-30195) 2021-12-26 13:13:14 +02:00
David Gilbertson f9a4352056
Fix typo in io.rst (GH-30218) 2021-12-26 13:11:08 +02:00
Joe 10bf0a9ac3
doc: fix a typo in unittest.mock.rst (GH-30227) 2021-12-26 13:09:17 +02:00
Rafael Fontenelle c1d7a6bed9
docs: Fix typos and use anchor for internal link (GH-30236) 2021-12-26 12:43:06 +02:00
Serhiy Storchaka 1fb7c61ca7
Remove a NEWS entry for bpo-45878 (GH-30259)
The docs linter complains about it, and in general news entries for such changes are not required.
2021-12-26 12:38:19 +02:00
Serhiy Storchaka 078abb676c
bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050)
The registry() method of functools.singledispatch() functions checks now
the first argument or the first parameter annotation and raises a TypeError if it is
not supported. Previously unsupported "types" were ignored (e.g. typing.List[int])
or caused an error at calling time (e.g. list[int]).
2021-12-25 14:16:14 +02:00
Nikita Sobolev 1b30660c3b
bpo-46120: State that | is preferred over Union (GH-30222)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2021-12-24 13:36:09 -08:00
Nikita Sobolev b8de8b7039
bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240)
Ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser`
2021-12-24 00:07:50 -08:00
Gregory P. Smith d8880677a7
Allow test_pathlib to pass on systems where fakeuser exists. (GH-30244) 2021-12-23 19:17:40 -08:00
Kumar Aditya cf15419a99
typos (#30239) 2021-12-23 12:25:12 +02:00
Kumar Aditya 71ef0b4c2b
bpo-46157: fix typo in docs (GH-30237) 2021-12-23 11:17:31 +02:00
David Hewitt 31ff96712e
bpo-46140: take more Py_buffer arguments as const * (GH-30217) 2021-12-22 15:07:46 +02:00
Kumar Aditya fc54e722a2
bpo-46106: Update OpenSSL to 1.1.1m (GH-30211)
Co-authored-by: Ned Deily <nad@python.org>
2021-12-21 21:20:16 -05:00
Irit Katriel c66fc0fb53
bpo-46107: ExceptionGroup.subgroup()/split() should copy __note__ to the parts (GH-30159) 2021-12-21 10:12:26 +00:00