summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-92886: [clinic.py] raise exception on invalid input instead of assertion ↵Irit Katriel2022-10-072-2/+3
| | | | | | | (GH-98051) Tests should pass with -O (assertions off). Automerge-Triggered-By: GH:iritkatriel
* gh-97997: Add col_offset field to tokenizer and use that for AST nodes (#98000)Lysandros Nikolaou2022-10-073-11/+44
|
* GH-88968: Reject socket that is already used as a transport (#98010)Guido van Rossum2022-10-072-0/+7
|
* gh-96346: Use double caching for re._compile() (#96347)Serhiy Storchaka2022-10-072-21/+47
|
* gh-91708: Revert params note in urllib.parse.urlparse table (#96699)Stanley2022-10-071-1/+2
| | | Revert params note in urllib.parse.urlparse table
* gh-96265: Fix some formatting in faq/design.rst (#96924)Stanley2022-10-071-27/+31
| | | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-73196: Add namespace/scope clarification for inheritance section (#92840)Stanley2022-10-071-1/+2
| | | Add namespace/scope clarification for inheritance section
* gh-97646: Change `.js` and `.mjs` files mimetype to conform to RFC 9239 (#97934)Noam Cohen2022-10-072-2/+3
|
* gh-97923: Always run Ubuntu SSL tests with others in CI (#97940)Nikita Sobolev2022-10-071-4/+1
|
* gh-97956: Mention `generate_global_objects.py` in `AC How-To` (#97957)Nikita Sobolev2022-10-071-1/+9
|
* gh-96959: Update HTTP links which are redirected to HTTPS (#98039)1809092022-10-072-2/+2
|
* Add a warning message about PyOS_snprintf (#95993)Eric Wieser2022-10-072-1/+3
|
* GH-96073: Fix wild replacement in inspect.formatannotation (#96074)Anh71me2022-10-075-1/+26
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-65496: Correct wording on csv's skipinitialspace argument (#96170)Stanley2022-10-073-5/+10
|
* gh-64921: Clarify wording for open()'s newline arg (#96171)Stanley2022-10-071-2/+2
|
* gh-97955: Migrate `zoneinfo` to Argument Clinic (#97958)Nikita Sobolev2022-10-076-36/+258
|
* gh-97669: Move difflib examples to Doc/includes/ (#97964)Victor Stinner2022-10-073-31/+9
| | | | | | | | | | | Remove diff.py and ndiff.py scripts of Tools/scripts/: move them to Doc/includes/. * diff.py and ndiff.py files are no longer executable. Remove also their shebang ("#!/usr/bin/env python3"). * Remove the -profile command from ndiff.py to simply the code. * Remove ndiff.py copyright and history command. The Python documentation examples are distributed under the "Zero Clause BSD License".
* Make _symtable_entry.ste_type's comment consistent wit _Py_block_ty (#92414)zikcheng2022-10-071-1/+1
| | | | _Py_block_ty defines four types of block, FunctionBlock, ClassBlock, ModuleBlock and AnnotationBlock. But _symtable_entry.ste_type only comments three of them, I think it's better both sides are consistent.
* Fix a mistake in isSet() deprecated message doc (#95720)Marc Monfort2022-10-070-0/+0
|
* gh-64373: Convert `_functools` to Argument Clinic (#96640)Nikita Sobolev2022-10-076-29/+182
|
* gh-96415: Remove `types._cell_factory` from a module namespace (#96416)Nikita Sobolev2022-10-072-1/+2
| | | Closes #96415
* Add more syslog tests (GH-97953)Serhiy Storchaka2022-10-074-8/+95
|
* Add note on capture_output arg to subprocess.run() docstring (#98012)andrei kulakov2022-10-071-1/+2
| | | add note on capture_output arg to the docstring
* gh-94808: Cover `%p` in `PyUnicode_FromFormat` (#96677)Nikita Sobolev2022-10-071-0/+19
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Fix memory leaks in test_capi (#98017)Carl Meyer2022-10-072-0/+6
|
* gh-97983: Revert "Lay the foundation for further work in ↵Oleg Iarygin2022-10-071-129/+197
| | | | | | | | | | | | | | | | | | | | asyncio.test_streams: port server cases to IsolatedAsyncioTestCase" (#98015) This PR reverts gh-93369 and gh-97896 because they've made asyncio tests unstable. After these PRs were merged, random GitHub action jobs of random commits started to fail unrelated tests and test framework methods. The reverting is necessary because such shrapnel failures are a symptom of some underlying bug that must be found and fixed first. I had a hope that it's a server overload because we already have extremely rare disc access errors. However, one and a half day passed, and the failures continue to emerge both in PRs and commits. Affected issue: gh-93357. First reported in https://github.com/python/cpython/pull/97940#issuecomment-1270004134. * Revert "gh-93357: Port test cases to IsolatedAsyncioTestCase, part 2 (#97896)" This reverts commit 09aea94d291fed2f3e96558dcd6db04014c3e2fb. * Revert "gh-93357: Start porting asyncio server test cases to IsolatedAsyncioTestCase (#93369)" This reverts commit ce8fc186ac81bce1727bf4192205148daabf5c2e.
* gh-71316: Update dis documentation to include changes to jump arguments ↵Christopher Chianelli2022-10-071-0/+4
| | | | (GH-95798)
* Misc updates to the itertools recipes and tests (GH-98018)Raymond Hettinger2022-10-071-6/+40
|
* Doc: sphinx-lint finds two other default roles. (GH-98019)Julien Palard2022-10-072-3/+3
|
* gh-86298: Ensure that __loader__ and __spec__.loader agree in ↵Barry Warsaw2022-10-075-3/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | warnings.warn_explicit() (GH-97803) In `_warnings.c`, in the C equivalent of `warnings.warn_explicit()`, if the module globals are given (and not None), the warning will attempt to get the source line for the issued warning. To do this, it needs the module's loader. Previously, it would only look up `__loader__` in the module globals. In https://github.com/python/cpython/issues/86298 we want to defer to the `__spec__.loader` if available. The first step on this journey is to check that `loader == __spec__.loader` and issue another warning if it is not. This commit does that. Since this is a PoC, only manual testing for now. ```python # /tmp/foo.py import warnings import bar warnings.warn_explicit( 'warning!', RuntimeWarning, 'bar.py', 2, module='bar knee', module_globals=bar.__dict__, ) ``` ```python # /tmp/bar.py import sys import os import pathlib # __loader__ = pathlib.Path() ``` Then running this: `./python.exe -Wdefault /tmp/foo.py` Produces: ``` bar.py:2: RuntimeWarning: warning! import os ``` Uncomment the `__loader__ = ` line in `bar.py` and try it again: ``` sys:1: ImportWarning: Module bar; __loader__ != __spec__.loader (<_frozen_importlib_external.SourceFileLoader object at 0x109f7dfa0> != PosixPath('.')) bar.py:2: RuntimeWarning: warning! import os ``` Automerge-Triggered-By: GH:warsaw
* gh-82874: Convert remaining importlib format uses to f-str. (#98005)Gregory P. Smith2022-10-075-28/+24
| | | f-yes
* Docs: Fix backtick errors found by sphinx-lint (#97998)Hugo van Kemenade2022-10-0755-98/+90
| | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-97850: Remove deprecated functions from `importlib.utils` (#97898)Nikita Sobolev2022-10-076-373/+4
| | | | | * gh-97850: Remove deprecated functions from `importlib.utils` * Rebase and remove `set_package` from diff
* Remove extra spaces in custom openSSL documentation. (#93568)Xiao Chen2022-10-071-10/+10
|
* GH-90985: Revert "Deprecate passing a message into cancel()" (#97999)Guido van Rossum2022-10-078-102/+12
| | | | | Reason: we were too hasty in deprecating this. We shouldn't deprecate it before we have a replacement.
* bpo-35540 dataclasses.asdict now supports defaultdict fields (gh-32056)Tiger2022-10-073-2/+28
|
* GH-91052: Add C API for watching dictionaries (GH-31787)Carl Meyer2022-10-0710-17/+487
|
* bpo-38693: Use f-strings instead of str.format() within importlib (#17058)Gregory P. Smith2022-10-063-26/+1807
| | | | | | | | | This is a small performance improvement, especially for one or two hot places such as _handle_fromlist() that are called a lot and the .format() method was being used just to join two strings with a dot. Otherwise it is merely a readability improvement. We keep `_ERR_MSG` and `_ERR_MSG_PREFIX` as those may be used elsewhere for canonical looking error messages.
* GH-97002: Prevent `_PyInterpreterFrame`s from backing more than one ↵Brandt Bucher2022-10-063-6/+91
| | | | `PyFrameObject` (GH-97996)
* gh-97973: Return all necessary information from the tokenizer (GH-97984)Lysandros Nikolaou2022-10-066-146/+159
| | | | | Right now, the tokenizer only returns type and two pointers to the start and end of the token. This PR modifies the tokenizer to return the type and set all of the necessary information, so that the parser does not have to this.
* fixes gh-96078: os.sched_yield release the GIL while calling sched_yield(2). ↵Dong-hee Na2022-10-062-1/+8
| | | | (gh-97965)
* gh-65961: Do not rely solely on `__cached__` (GH-97990)Brett Cannon2022-10-0611-35/+130
| | | Make sure `__spec__.cached` (at minimum) can be used.
* gh-97850: Remove the open issues section from the import reference (#97935)Brett Cannon2022-10-061-19/+0
| | | | | Remove the open issues section from the import reference Tracking in https://github.com/python/cpython/issues/97850 instead.
* Docs: pin sphinx-lint (GH-97992)Hugo van Kemenade2022-10-061-1/+1
|
* gh-94590: add signatures to operator itemgetter, attrgetter, methodcaller ↵Erik Welch2022-10-061-6/+3
| | | | | | | | | | | | | (#94591) These were intentionally skipped when operator was updated to use the argument clinic: https://github.com/python/cpython/issues/64385#issuecomment-1093641466 However, by not using the argument clinic, they missed out on getting signatures. This is a narrow PR to update the docstrings so that `__text_signature__` can be extracted from them. Updating to use the argument clinic is beyond scope. `methodcaller` uses `*args, **kwargs` to match variadic names used elsewhere, including in `operator.call`.
* Add Pynche's move to the What's new in 3.11 (#97974)Barry Warsaw2022-10-061-0/+4
| | | | | | | | | * Add Pynche's move to the What's new in 3.11 * Update Doc/whatsnew/3.11.rst Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-97781: Apply changes from importlib_metadata 5. (GH-97785)Jason R. Coombs2022-10-065-302/+88
| | | | | | | * gh-97781: Apply changes from importlib_metadata 5. * Apply changes from upstream * Apply changes from upstream.
* gh-86482: Document assignment expression need for ()s (#23291)Terry Jan Reedy2022-10-062-0/+8
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-97943: PyFunction_GetAnnotations should return a borrowed reference. (#97949)larryhastings2022-10-062-2/+7
|
* gh-94808: Coverage: Test that maximum indentation level is handled (#95926)Michael Droettboom2022-10-061-1/+21
| | | | | * gh-94808: Coverage: Test that maximum indentation level is handled * Use "compile" rather than "exec"