Commit Graph

117809 Commits

Author SHA1 Message Date
Simone Rubino 83bd568d2b
Doc: devmode: add -Xdev option to example (#106253) 2023-07-16 16:29:58 +09:00
Hugo van Kemenade c02ee45031
Docs search: Replace jQuery with vanilla JavaScript (#106743)
* Replace jQuery with vanilla JavaScript
* Switch 'var' to 'const' or 'let'
2023-07-16 10:26:26 +03:00
Erlend E. Aasland 8c17729489
Docs: Normalize Argument Clinic How-To section capitalization (#106788) 2023-07-16 00:42:58 +02:00
Mathieu Dupuy d46a42fd8e
faq/library: remove outdated section (#105996) 2023-07-15 13:23:10 -07:00
Raymond Hettinger e2ec0bad67
Add more examples to the recipe docs (GH-106782)
Demonstrate that factor() works for large composites and large primes.
2023-07-15 14:43:09 -05:00
Jason R. Coombs 22980dc7c9
gh-106752: Sync with zipp 3.16.2 (#106757)
* gh-106752: Sync with zipp 3.16.2

* Add blurb
2023-07-15 09:21:17 -04:00
Inada Naoki 2566b74b26
gh-81283: compiler: remove indent from docstring (#106411)
Co-authored-by: Éric <merwok@netwok.org>
2023-07-15 19:33:32 +09:00
Erlend E. Aasland bbf6297985
gh-104050: Argument Clinic: Annotate BlockParser (#106750) 2023-07-15 10:11:32 +00:00
Erlend E. Aasland 2d7d1aa4bc
gh-106368: Increase Argument Clinic BlockParser test coverage (#106759) 2023-07-15 11:28:57 +02:00
Guido van Rossum 0db85eeba7
gh-106529: Fix subtle Tier 2 edge case with list iterator (#106756)
The Tier 2 opcode _IS_ITER_EXHAUSTED_LIST (and _TUPLE)
didn't set it->it_seq to NULL, causing a subtle bug
that resulted in test_exhausted_iterator in list_tests.py
to fail when running all tests with -Xuops.

The bug was introduced in gh-106696.

Added this as an explicit test.

Also fixed the dependencies for ceval.o -- it depends on executor_cases.c.h.
2023-07-14 17:22:06 -07:00
Jason R. Coombs 03185f0c15
gh-106752: Move zipfile._path into its own package (#106753)
* gh-106752: Move zipfile._path into its own package so it may have supplementary behavior.

* Add blurb
2023-07-14 20:40:46 +00:00
Irit Katriel fb32f35c05
gh-102799: replace internal sys.exc_info() call by sys.exception() (#106746) 2023-07-14 20:41:24 +01:00
Alex Waygood 89ec0e9529
gh-106745: typing docs: Clarify that removal of PEP-585 aliases is not currently planned (#106748) 2023-07-14 19:49:02 +01:00
J. Nick Koston aeef8591e4
gh-106554: replace `_BaseSelectorImpl._key_from_fd` with `dict.get` (#106555) 2023-07-15 03:46:30 +09:00
Irit Katriel 6a70edf24c
gh-105481: expose opcode metadata via the _opcode module (#106688) 2023-07-14 18:41:52 +01:00
Jason R. Coombs 243fdcb40e
gh-106531: Remove importlib.resources._legacy (#106532)
* gh-106531: Remove importlib.resources._legacy

Syncs with importlib_resources 6.0.

* Remove documentation for removed functionality.
2023-07-14 13:38:28 -04:00
Erlend E. Aasland 7c95345e4f
gh-104050: Argument Clinic: Annotate `output_templates()` (#106732)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-07-14 12:20:58 +00:00
Charlie Zhao 89867d2491
gh-106446: Fix failed doctest in stdtypes (#106447)
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-14 03:38:03 -04:00
Grant Ramsay 21d98be422
gh-105293: Do not call SSL_CTX_set_session_id_context on client side SSL context (#105295)
* gh-105293: Do not call SSL_CTX_set_session_id_context on client side SSL context

Openssl states this is a "server side only" operation.
Calling this on a client side socket can result in unexpected behavior

* Add news entry on SSL "set session id context" changes
2023-07-14 00:10:54 -07:00
Nikita Sobolev 490295d651
gh-105626: Change the default return value of `HTTPConnection.get_proxy_response_headers` (#105628) 2023-07-13 23:55:49 -07:00
Guido van Rossum 025995fead
gh-106529: Split FOR_ITER_{LIST,TUPLE} into uops (#106696)
Also rename `_ITER_EXHAUSTED_XXX` to `_IS_ITER_EXHAUSTED_XXX` to make it clear this is a test.
2023-07-13 17:27:35 -07:00
Alex Waygood 128a6c1d88
gh-104683: Argument clinic: use an enum to describe the different kinds of functions (#106721)
Argument clinic: use an enum to describe the different kinds of functions
2023-07-13 22:54:05 +00:00
Erlend E. Aasland ec45c513d3
gh-106368: Increase Argument Clinic test coverage (#106728)
- improve output_parameter() coverage
- improve coverage for Function.kind
2023-07-13 22:18:32 +00:00
Ned Batchelder f014f1567c
docs: clarify Path.suffix (GH-106650) 2023-07-13 20:24:54 +01:00
J. Nick Koston 8d2f3c36ca
gh-106664: selectors: add get() method to _SelectorMapping (#106665)
It can be used to avoid raising and catching KeyError twice via __getitem__.

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2023-07-13 19:18:53 +00:00
Guido van Rossum e6e0ea0113
gh-106701: Move the hand-written Tier 2 uops to bytecodes.c (#106702)
This moves EXIT_TRACE, SAVE_IP, JUMP_TO_TOP, and
_POP_JUMP_IF_{FALSE,TRUE} from ceval.c to bytecodes.c.

They are no less special than before, but this way
they are discoverable o the copy-and-patch tooling.
2023-07-13 12:14:51 -07:00
Ammar Askar 2f3ee02c22
gh-106690: Add a .coveragerc file to the CPython repository (#8150)
The added file is the coverage default at some point in time + checking branches both ways + IDLE additions, labelled as such and somewhat designed to be unlikely to affect other files.  Located in the CPython repository directory, it can be used where it is or copied elsewhere, depending on how one runs coverage.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-07-13 11:45:21 -04:00
Mark Shannon 487861c6ae
GH-104909: Split `LOAD_ATTR_INSTANCE_VALUE` into micro-ops (GH-106678) 2023-07-13 16:36:19 +01:00
Alex Waygood 32718f908c
gh-106309: Deprecate typing.no_type_check_decorator (#106312) 2023-07-13 14:30:35 +01:00
Chris Brett 4b4a5b70aa
gh-106634: Corrected minor asyncio doc issues (#106671) 2023-07-13 13:21:13 +05:30
CF Bolz-Tereick 7e6ce48872
gh-106628: email parsing speedup (gh-106629) 2023-07-13 15:12:56 +09:00
Jim Porter af51bd7cda
gh-89427: Set VIRTUAL_ENV_PROMPT even when VIRTUAL_ENV_DISABLE_PROMPT… (GH-106643) 2023-07-13 07:08:33 +01:00
Dennis Sweeney ab86426a34
gh-105235: Prevent reading outside buffer during mmap.find() (#105252)
* Add a special case for s[-m:] == p in _PyBytes_Find

* Add tests for _PyBytes_Find

* Make sure that start <= end in mmap.find
2023-07-12 22:50:45 -04:00
Erlend E. Aasland 2d43beec22
gh-104050: Argument Clinic: Annotate nested function parser_body() in the CLanguage class (#106699) 2023-07-12 22:49:30 +00:00
Alex Waygood 8aa4beaad0
gh-104683: Argument clinic: modernise `cpp.Monitor` (#106698) 2023-07-12 22:48:36 +00:00
Alex Waygood a180e7a0df
gh-104050: Argument clinic: Annotate the `Destination` class (#106655)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-12 22:33:47 +01:00
Prince Roshan 357e9e9da3
gh-106602: [Enum] Add __copy__ and __deepcopy__ (GH-106666) 2023-07-12 14:01:17 -07:00
Nikita Sobolev e4b88c1e4a
gh-106236: Replace `assert` with `raise RuntimeError` in `threading.py` (#106237)
Replace `assert` with `raise ` in `threading.py` so that -OO does not alter _DummyThread behavior.
2023-07-12 11:07:59 -07:00
Guido van Rossum dd1884dc5d
gh-106529: Split FOR_ITER_RANGE into uops (#106638)
For an example of what this does for Tier 1 and Tier 2, see
https://github.com/python/cpython/issues/106529#issuecomment-1631649920
2023-07-12 10:23:59 -07:00
Guido van Rossum 7f55f58b6c
gh-106656: Remove --emit-line-directives from regen-cases (#106657)
If you prefer to see `#line` directives in generated_cases.c.h, run
```
make regen-cases CASESFLAG=-l
```
But please don't commit the result.
2023-07-12 16:12:39 +00:00
Mark Shannon b03755a234
GH-104909: Break LOAD_GLOBAL specializations in micro-ops. (GH-106677) 2023-07-12 14:34:14 +01:00
Steve Dower e2d7366fb3
gh-99079: Update Windows build to use OpenSSL 3.0.9 (GH-106649) 2023-07-12 13:46:30 +01:00
Irit Katriel 2ca008e2b7
gh-105481: move Python/opcode_metadata.h to Include/internal/pycore_opcode_metadata.h (#106673) 2023-07-12 11:30:25 +01:00
Victor Stinner 42bc485a24
gh-105373: Elaborate Pending Removal in What's New in Python 3.13 (#106675)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-12 12:28:10 +02:00
Serhiy Storchaka be1b968dc1
gh-106521: Remove _PyObject_LookupAttr() function (GH-106642) 2023-07-12 08:57:10 +03:00
Hugo van Kemenade e8ab0096a5
Add Plausible for docs metrics (#106644) 2023-07-12 05:35:24 +03:00
Alex Waygood 7ce3ea4906
gh-104683: Argument clinic: Minor readability improvements for `Destination.__init__` (#106652) 2023-07-11 23:08:28 +00:00
Ijtaba Hussain de827322ca
gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory (#103213)
Fetch CONFIG_ARGS from the original source directory, instead of from
the copied source tree. When "make clean" is executed in the copied
source tree, the build directory is cleared and the configure argument
lookup fails. However, the original source directory still contains this
information.
2023-07-11 22:22:18 +00:00
Guido van Rossum da86db56cb
gh-106529: Implement JUMP_FORWARD in uops (with test) (#106651)
Note that this may generate two SAVE_IP uops in a row.
Removing unneeded SAVE_IP uops is the optimizer's job.
2023-07-11 15:13:57 -07:00
Alex Waygood d0972c77aa
gh-104050: Argument Clinic: Annotate the `Block` class (#106519) 2023-07-11 21:21:14 +00:00