| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
| |
Make docstrings for `as_integer_ratio` consistent across types, and document that
the returned pair is always normalized (coprime integers, with positive denominator).
---------
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
|
|
|
|
|
|
| |
This PR adds a private `Fraction._from_coprime_ints` classmethod for internal creations of `Fraction` objects, replacing the use of `_normalize=False` in the existing constructor. This speeds up creation of `Fraction` objects arising from calculations. The `_normalize` argument to the `Fraction` constructor has been removed.
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
|
|
|
|
|
|
|
| |
This is related to fixing the refleaks introduced by commit 096d009. I haven't been able to find the leak yet, but these changes are a consequence of that effort. This includes some cleanup, some tweaks to the existing tests, and a bunch of new test cases. The only change here that might have impact outside the tests in question is in imp.py, where I update imp.load_dynamic() to use spec_from_file_location() instead of creating a ModuleSpec directly.
Also note that I've updated the tests to only skip if we're checking for refleaks (regrtest's --huntrleaks), whereas in gh-101969 I had skipped the tests entirely. The tests will be useful for some upcoming work and I'd rather the refleaks not hold that up. (It isn't clear how quickly we'll be able to fix the leaking code, though it will certainly be done in the short term.)
https://github.com/python/cpython/issues/102251
|
|
|
| |
Automerge-Triggered-By: GH:AlexWaygood
|
| |
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
| |
The argument is used as a switch and corresponds to a boolean logic. Therefore it is more intuitive to use the corresponding constant `False` as default value instead of the integer `0`.
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
|
| |
|
| |
|
|
|
| |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
| |
Followup from #101769.
|
| |
|
|
|
| |
Add tests for conversion from bool to complex.
|
|
|
|
|
| |
(#102232)
Sync with jaraco/zipp@757a4e1a.
|
|
|
| |
Currently this gets rendered with a dangling hyphen.
|
| |
|
|
|
|
| |
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
| |
|
|
|
| |
Co-authored-by: Seonkyo Ok <seonkyo.ok@linecorp.com>
|
|
|
|
| |
internal access of `builtins.__dict__` exhausts the iterator (#101769)
|
|
|
| |
Disable the timeout in test_implied_dirs_performance. Workaround for #102209 until I can work out a more robust test for linearity.
|
|
|
|
| |
(in Modules/) (#102196)
|
| |
|
| |
|
|
|
|
| |
(GH-102216)
|
| |
|
|
|
|
| |
(gh-102191)
|
|
|
|
|
| |
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't deadlock on shutdown if test_current_{exception,frames} fails
These tests spawn a thread that waits on a threading.Event. If the test fails any of its assertions, the Event won't be signaled and the thread will wait indefinitely, causing a deadlock when threading._shutdown() tries to join all outstanding threads.
Co-authored-by: Brett Simmers <bsimmers@meta.com>
* Add a news entry
* Fix whitespace
---------
Co-authored-by: Brett Simmers <bsimmers@meta.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
|
|
|
| |
For fast module state access from heap type methods.
|
|
|
| |
Automerge-Triggered-By: GH:erlend-aasland
|
|
|
| |
Automerge-Triggered-By: GH:erlend-aasland
|
|
|
| |
Automerge-Triggered-By: GH:erlend-aasland
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-7822)
lzma.LZMADecompressor and bz2.BZ2Decompressor objects caused
segfaults when their `__init__()` methods were not called.
lzma.LZMADecompressor, lzma.LZMACompressor, bz2.BZ2Compressor,
and bz2.BZ2Decompressor objects would leak locks and internal buffers
when their `__init__()` methods were called multiple times.
https://bugs.python.org/issue23224
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
(#102146)
Revert "bpo-46978: Correct docstrings for in-place builtin operators (#31802)"
This reverts commit 128379b8cdb88a6d3d7fed24df082c9a654b3fb8.
|
|
|
| |
Remove the undocumented locking capabilities of functools.cached_property.
|
|
|
|
| |
Missing closing ) reported on Discuss by Chukwudi Nwachukwu.
|
|
|
| |
Replaces our fallback non-OpenSSL MD5 and SHA1 implementations with those from HACL* as we've already done with SHA2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- partial tests for cosh/sinh overflows (L535 and L771). I doubt
both ||-ed conditions could be tested.
- removed inaccessible case in sqrt (L832): ax=ay=0 is handled
above (L823) because fabs() is exact. Also added test (checked
with mpmath and gmpy2) for second condition on that line.
- some trivial tests for isclose (cover all conditions on L1217-1218)
- add comment for uncovered L1018
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
|
|
|
|
| |
instrumentation. (GH-101985)
|
| |
|
|
|
|
|
|
|
|
|
| |
configure.ac (GH-100356)
In commit 254b309c801f82509597e3d7d4be56885ef94c11 a previous change to avoid linking to libpython was partially reverted for Android (and later Cygwin as well), to add back the link flags. This was applied to distutils and to python-config.sh, but not to python.pc.
Add it back to python.pc as well.
Automerge-Triggered-By: GH:gpshead
|
|
|
| |
Co-authored-by: HyunKyun Moon <hyunkyun.moon@linecorp.com>
|
|
|
|
|
| |
(gh-102100)
Co-authored-by: Long Vo <long.vo@linecorp.com>
|