| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
| |
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
|
| |
The test now waits until all threads complete to avoid leaking
running threads.
Also, use regular threads rather than daemon threads.
|
| |
|
|
|
|
|
| |
There are two different `SimpleQueue` types imported (from `multiprocessing.queues` and `queue`) in `Lib/test/test_genericalias.py`, the second one shadowing the first one, making the first one not actually tested. Fix by using different names.
Automerge-Triggered-By: @gvanrossum
|
| |
|
| |
|
|
|
|
|
|
| |
Remove complex special methods __int__, __float__, __floordiv__,
__mod__, __divmod__, __rfloordiv__, __rmod__ and __rdivmod__
which always raised a TypeError.
|
|
|
| |
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
| |
gcc>9 (GH-22598)
|
|
|
|
|
|
|
| |
This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed).
Going into more detail for those who want it, the Tk change was made in [commit 591f68c](https://github.com/tcltk/tk/commit/591f68cb382525b72664c6fecaab87742b6cc87a) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](https://github.com/tcltk/tk/blob/591f68cb382525b72664c6fecaab87742b6cc87a/generic/tkScale.c#L623)), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`).
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
|
|
| |
imported (GH-22595)
…
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
| |
library numeric types (GH-6121)" (GH-22584)
This reverts commit 58a7da9e125422323f79c4ee95ac5549989d8162.
|
|
|
|
|
| |
This special marker annotation is intended to help in distinguishing
proper PEP 484-compliant type aliases from regular top-level variable
assignments.
|
|
|
|
|
| |
The hard part was making all the tests pass; there are some subtle issues here, because apparently the future import wasn't tested very thoroughly in previous Python versions.
For example, `inspect.signature()` returned type objects normally (except for forward references), but strings with the future import. We changed it to try and return type objects by calling `typing.get_type_hints()`, but fall back on returning strings if that function fails (which it may do if there are future references in the annotations that require passing in a specific namespace to resolve).
|
|
|
|
| |
This function recomputes `cls.__abstractmethods__`.
Also update `@dataclass` to use it.
|
|
|
|
|
|
|
|
|
|
|
| |
UnicodeNames tests (GH-22575)
Similarly to GH-22566, those tests called eval() on content received via
HTTP in test_named_sequences_full. This likely isn't exploitable because
unicodedata.lookup(seqname) is called before self.checkletter(seqname,
None) - thus any string which isn't a valid unicode character name
wouldn't ever reach the checkletter method.
Still, it's probably better to be safe than sorry.
|
|
|
|
| |
codec tests (GH-22566)
|
| |
|
|
|
|
| |
Call urllib.request.urlcleanup() to reset the global
urllib.request._opener.
|
|
|
|
|
|
|
|
|
|
|
| |
Enable recursion checks which were disabled when get __bases__ of
non-type objects in issubclass() and isinstance() and when intern
strings. It fixes a stack overflow when getting __bases__ leads
to infinite recursion.
Originally recursion checks was disabled for PyDict_GetItem() which
silences all errors including the one raised in case of detected
recursion and can return incorrect result. But now the code uses
PyDict_GetItemWithError() and PyDict_SetDefault() instead.
|
| |
|
| |
|
|
|
| |
Also document that eval() does this (the same way).
|
|
|
|
| |
symtable module (GH-22391)
|
|
|
| |
bpo-40564: Avoid copying state from extant ZipFile.
|
|
|
| |
Co-authored-by: Skip Montanaro
|
|
|
|
| |
(GH-22418)
|
| |
|
|
|
|
| |
default namespace was defined. (GH-22474)
|
|
|
| |
* Correct at 2 places in email module
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
numeric types (GH-6121)
* bpo-26680: Adds support for int.is_integer() for compatibility with float.is_integer().
The int.is_integer() method always returns True.
* bpo-26680: Adds a test to ensure that False.is_integer() and True.is_integer() are always True.
* bpo-26680: Adds Real.is_integer() with a trivial implementation using conversion to int.
This default implementation is intended to reduce the workload for subclass
implementers. It is not robust in the presence of infinities or NaNs and
may have suboptimal performance for other types.
* bpo-26680: Adds Rational.is_integer which returns True if the denominator is one.
This implementation assumes the Rational is represented in it's
lowest form, as required by the class docstring.
* bpo-26680: Adds Integral.is_integer which always returns True.
* bpo-26680: Adds tests for Fraction.is_integer called as an instance method.
The tests for the Rational abstract base class use an unbound
method to sidestep the inability to directly instantiate Rational.
These tests check that everything works correct as an instance method.
* bpo-26680: Updates documentation for Real.is_integer and built-ins int and float.
The call x.is_integer() is now listed in the table of operations
which apply to all numeric types except complex, with a reference
to the full documentation for Real.is_integer(). Mention of
is_integer() has been removed from the section 'Additional Methods
on Float'.
The documentation for Real.is_integer() describes its purpose, and
mentions that it should be overridden for performance reasons, or
to handle special values like NaN.
* bpo-26680: Adds Decimal.is_integer to the Python and C implementations.
The C implementation of Decimal already implements and uses
mpd_isinteger internally, we just expose the existing function to
Python.
The Python implementation uses internal conversion to integer
using to_integral_value().
In both cases, the corresponding context methods are also
implemented.
Tests and documentation are included.
* bpo-26680: Updates the ACKS file.
* bpo-26680: NEWS entries for int, the numeric ABCs and Decimal.
Co-authored-by: Robert Smallshire <rob@sixty-north.com>
|
|
|
| |
Remove PREDICTion of POP_BLOCK from FOR_ITER.
|
|
|
|
| |
(GH-22441)
|
| |
|
|
|
|
| |
Add codecs.unregister() and PyCodec_Unregister() functions
to unregister a codec search function.
|
| |
|
|
|
| |
This commit reverts commit ac0333e1e117b7f61ed7ef1dbcdb6e515ada603b as the original links are working again and they provide extended features such as comments and alternative versions.
|
|
|
|
|
| |
Same changes as #22276 squashed to a single commit. Just hoping to get Travis to cooperate by opening a new PR...
Automerge-Triggered-By: @vsajip
|
|
|
| |
* Account for control blocks in 'except' in compiler. Fixes #39934.
|
|
|
| |
'Python Shell' may have contributed to some beginners confusing 'IDLE' with ' Python'.
|
| |
|
|
|
|
| |
Add PyDateTime_DATE_GET_TZINFO() and PyDateTime_TIME_GET_TZINFO()
macros.
|
| |
|
|
|
| |
use `str.__str__` for `StrEnum` so that `str(StrEnum.member)` is the same as directly accessing the string value of the `StrEnum` member
|
| |
|
|
|
|
|
| |
`.NotImplementedType` (GH-22336)
closes issue 41810
|
|
|
|
|
| |
pymain_run_module (#21956)
Closes bpo issue 41602
|
|
|
| |
* use new StrEnum to ensure all members are strings
|