summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-102500: Document PEP 688 (#102571)Jelle Zijlstra2023-05-044-1/+95
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-102500: Implement PEP 688 (#102521)Jelle Zijlstra2023-05-0426-15/+640
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-96534: socketmodule: support FreeBSD divert(4) socket (#96536)Gleb Smirnoff2023-05-043-0/+25
|
* gh-104066: Improve performance of hasattr for module objects (#104063)Itamar Ostricher2023-05-044-29/+78
|
* gh-102795: Fix use of poll in test_epoll's test_control_and_wait (#102796)Kevin Krakauer2023-05-042-4/+12
| | | | | | | | | | This test can fail unnecessarily. In the test we wait for events on two file descriptors. This is done in a single call to select.epoll's poll() function. However, it is valid for the OS to return only one event via poll() and the next via a subsequent call to poll(). This rarely happens, but it can cause the test to fail despite properly functioning polling. Instead, we poll a second time when necessary.
* gh-103323: Remove PyRuntimeState_GetThreadState() (#104171)Victor Stinner2023-05-045-17/+9
| | | | | This function no longer makes sense, since its runtime parameter is no longer used. Use directly _PyThreadState_GET() and _PyInterpreterState_GET() instead.
* gh-104169: Ensure the tokenizer doesn't overwrite previous errors (#104170)Pablo Galindo Salgado2023-05-041-0/+6
|
* Fix typo "involvin" → "involving" (#104166)Christopher Chavez2023-05-042-2/+2
|
* gh-103092: Port _ctypes.COMError to heap type (#104020)Erlend E. Aasland2023-05-043-60/+47
|
* gh-97556: Raise null bytes syntax error upon null in multiline string ↵Lysandros Nikolaou2023-05-042-1/+21
| | | | (GH-104136)
* GH-97950: Use new-style index directive ('statement') (#104162)Adam Turner2023-05-049-53/+53
|
* GH-97950: Use new-style index directive ('exception') (#104160)Adam Turner2023-05-043-13/+13
|
* gh-104089: catch DeprecationWarning in `test_fstring` (#104137)sunmy20192023-05-041-5/+12
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-97950: Use new-style index directive ('object') (#104158)Adam Turner2023-05-0431-143/+143
| | | | | | | | | | | * Uncomment object removal in pairindextypes * Use new-style index directive ('object') - C API * Use new-style index directive ('object') - Library * Use new-style index directive ('object') - Reference * Use new-style index directive ('object') - Tutorial
* GH-97950: Use new-style index directive ('operator') (#104156)Adam Turner2023-05-043-54/+54
|
* GH-97950: Use new-style index directive ('keyword') (#104153)Adam Turner2023-05-044-28/+28
| | | | | * Uncomment keyword removal in pairindextypes * Use new-style index directive ('keyword') - Reference
* GH-97950: Use new-style index directive ('module') (#103996)Adam Turner2023-05-0433-69/+65
| | | | | | | | | | | | | | | | | * Use new-style index directive ('module') - C API * Use new-style index directive ('module') - Library * Use new-style index directive ('module') - Reference * Use new-style index directive ('module') - Tutorial * Uncomment module removal in pairindextypes * Use new-style index directive ('module') - C API * Use new-style index directive ('module') - Library * Use new-style index directive ('module') - Reference
* gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)Petr Viktorin2023-05-0430-19/+970
| | | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* GH-97950: Allow translation of index directive content (#104000)Adam Turner2023-05-042-0/+34
|
* gh-104146: Remove unused 'second_pass_replacements' from clinic.py (#104147)Erlend E. Aasland2023-05-041-19/+2
| | | | The code that manipulated 'second_pass_replacements' was removed in 2015 with commit 0759f84 (gh-67688, bpo-23500).
* pydoc.safeimport: Use importlib.import_module instead of __import__ (GH-103118)Yuxin Wu2023-05-031-4/+1
|
* gh-97850: Deprecate `find_loader` and `get_loader` in `pkgutil` (GH-98520)Nikita Sobolev2023-05-035-18/+43
| | | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-103590: mention that the change is included in 3.11.4 and clarify except* ↵Irit Katriel2023-05-032-3/+6
| | | | documentation (#104095)
* GH-104114: Fix `pathlib.WindowsPath.glob()` use of literal pattern segment ↵Barney Gale2023-05-033-41/+18
| | | | | | | | | case (GH-104116) We now use `_WildcardSelector` to evaluate literal pattern segments, which allows us to retrieve the real filesystem case. This change is necessary in order to implement a *case_sensitive* argument (see GH-81079) and a *follow_symlinks* argument (see GH-77609).
* GH-103944: Remove last use of `utcfromtimestamp` (#103995)Paul Ganssle2023-05-031-15/+20
| | | | | | | | | | | * Remove last use of `utcfromtimestamp` This was a weirdly valid use of `utcfromtimestamp` in the sense that the "timestamps" in TZif files are not epoch times, but actually something more properly thought of as "number of seconds since 1970 in the local time zone", so even though we didn't want UTC time, `utcfromtimestamp` was still a good way to get the thing we wanted. Since we're deprecating `utcfromtimestamp`, it's just as valid to use `timedelta` arithmetic here. We may be able to avoid the question entirely by switching these tests over to using `ZoneInfo` in the future. * Fix a few missing DeprecationWarnings in tests In one test, we simply turn off DeprecationWarning rather than asserting about it, because whether the error condition happens before or after the warning seems to differ between the Python and C versions.
* gh-103693: Add convenience variable feature to `pdb` (#103694)Tian Gao2023-05-035-0/+119
|
* gh-103968: Deprecate creating heap types whose metaclass has custom tp_new. ↵Petr Viktorin2023-05-036-12/+106
| | | | | | | | (GH-103972) (That's a mouthful of an edge case!) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* GH-97850: Suppress cross-references to removed ``importlib.util`` functions ↵Adam Turner2023-05-035-10/+10
| | | | | | | | | (#104134) `importlib.utils` -> `importlib.util` in a few places --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-97850: Suppress cross-references to the removed ``module_repr`` method ↵Adam Turner2023-05-035-9/+9
| | | | | (#104133) Suppress cross-references to ``module_repr``
* GH-98040: Suppress cross-references to the removed ``imp`` module (#104131)Adam Turner2023-05-0311-19/+20
| | | Suppress cross-references to imp
* gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059)Barry Warsaw2023-05-0339-1047/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove deprecated classes from pkgutil * Remove some other PEP 302 obsolescence * Use find_spec instead of load_module * Remove more tests of PEP 302 obsolete APIs * Remove another bunch of tests using obsolete load_modules() * Remove deleted names from __all__ * Remove obsolete footnote * imp is removed * Remove `imp` from generated stdlib names * What's new and blurb * Update zipimport documentation for the removed methods * Fix some Windows tests * Remove any test (or part of a test) that references `find_module()`. * Use assertIsNone() / assertIsNotNone() consistently. * Update Doc/reference/import.rst * We don't need pkgutil._get_spec() any more either * test.test_importlib.fixtures.NullFinder * ...BadLoaderFinder.find_module * ...test_api.InvalidatingNullFinder.find_module * ...test.test_zipimport test of z.find_module * Suppress cross-references to find_loader and find_module * Suppress cross-references to Finder * Suppress cross-references to pkgutil.ImpImporter and pkgutil.ImpLoader --------- Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* gh-103845: Remove line & instruction instrumentations before adding them ↵Tian Gao2023-05-033-8/+70
| | | | back (GH-103851)
* GH-84976: Re-introduce `datetime.py` and fix reprsPaul Ganssle2023-05-033-29/+27
| | | | | Without the change to the reprs, pure-python classes would have a repr of `datetime._pydatetime.time`, etc.
* GH-84976: Move Lib/datetime.py to Lib/_pydatetimePaul Ganssle2023-05-034-5/+14
| | | | | | This breaks the tests, but we are keeping it as a separate commit so that the move operation and editing of the moved files are separate, for a cleaner history.
* gh-104078: Improve performance of PyObject_HasAttrString (#104079)Itamar Ostricher2023-05-032-6/+18
|
* gh-82012: Deprecate bitwise inversion (~) of bool (#103487)Tim Hoffmann2023-05-036-25/+78
| | | | | | | | | | | | | | The bitwise inversion operator on bool returns the bitwise inversion of the underlying int value; i.e. `~True == -2` such that `bool(~True) == True`. It's a common pitfall that users mistake `~` as negation operator and actually want `not`. Supporting `~` is an artifact of bool inheriting from int. Since there is no real use-case for the current behavior, let's deprecate `~` on bool and later raise an error. This removes a potential source errors for users. Full reasoning: https://github.com/python/cpython/issues/82012#issuecomment-1258705971 Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-101100: Fix Sphinx warnings in `curses` and `curses.ascii` modules (#103457)Hugo van Kemenade2023-05-023-468/+500
| | | | Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* GH-89769: `pathlib.Path.glob()`: do not follow symlinks when checking for ↵andrei kulakov2023-05-034-9/+25
| | | | | precise match (GH-29655) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* gh-104049: do not expose on-disk location from SimpleHTTPRequestHandler ↵Ethan Furman2023-05-033-1/+11
| | | | | | | | | | (#104067) Do not expose the local server's on-disk location from `SimpleHTTPRequestHandler` when generating a directory index. (unnecessary information disclosure) --------- Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-104109: Expose Py_NewInterpreterFromConfig() in the Public C-API (gh-104110)Eric Snow2023-05-026-16/+22
| | | | | We also expose PyInterpreterConfig. This is part of the PEP 684 (per-interpreter GIL) implementation. We will add docs as soon as we can. FYI, I'm adding the new config field for per-interpreter GIL in gh-99114.
* gh-94673: More Per-Interpreter Fields for Builtin Static Types (gh-103912)Eric Snow2023-05-025-86/+185
| | | | | his involves moving tp_dict, tp_bases, and tp_mro to PyInterpreterState, in the same way we did for tp_subclasses. Those three fields are effectively const for builtin static types (unlike tp_subclasses). In theory we only need to make their values immortal, along with their contents. However, that isn't such a simple proposition. (See gh-103823.) In the meantime the simplest solution is to move the fields into the interpreter. One alternative is to statically allocate the values, but that's its own can of worms.
* GH-103963: Make dis display names of args for intrinsics opcodes (#104029)Juhi Chandalia2023-05-026-17/+110
|
* GH-104102: Optimize `pathlib.Path.glob()` handling of `../` pattern segments ↵Barney Gale2023-05-023-0/+19
| | | | | | | | (GH-104103) These segments do not require a `stat()` call, as the selector's `_select_from()` method is called after we've established that the parent is a directory.
* GH-104104: Optimize `pathlib.Path.glob()` by avoiding repeated calls to ↵Barney Gale2023-05-022-11/+16
| | | | | | `os.path.normcase()` (GH-104105) Use `re.IGNORECASE` to implement case-insensitive matching. This restores behaviour from before GH-31691.
* gh-103822: [Calendar] change return value to enum for day and month APIs ↵Prince Roshan2023-05-022-2/+2
| | | | (GH-103827)
* gh-65022: Fix description of tuple return value in copyreg (#103892)Shantanu2023-05-021-1/+1
|
* GH-103525: Improve exception message from `pathlib.PurePath()` (GH-103526)Barney Gale2023-05-023-16/+27
| | | | | | | | Check that arguments are strings before calling `os.path.join()`. Also improve performance of `PurePath(PurePath(...))` while we're in the area: we now use the *unnormalized* string path of such arguments. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-84436: Add integration C API tests for immortal objects (gh-103962)Dong-hee Na2023-05-036-1/+69
|
* gh-103743: Add PyUnstable_Object_GC_NewWithExtraData (GH-103744)Jurica Bradarić2023-05-026-2/+156
| | | | Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-102997: Update Windows installer to SQLite 3.41.2. (#102999)Mariusz Felisiak2023-05-024-3/+4
|