| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
It can silence arbitrary exceptions.
|
|
|
|
|
|
|
|
| |
- Use the proper asdl sequence when creating empty arguments
- Remove reduntant casts (thanks to new typed asdl_sequences)
- Remove MarshalPrototypeVisitor and some utilities from asdl generator
- Fix the header of `Python/ast.c` (kept from pgen times)
Automerge-Triggered-By: @pablogsal
|
|
|
|
| |
limited API (GH-22621)
|
|
|
| |
Automerge-Triggered-By: @Mariatta
|
| |
|
|
|
|
| |
"fildes". (GH-22620)
|
|
|
|
|
| |
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>
|
|
|
| |
Updated python version and link to the release schedule
|
| |
|
| |
|
| |
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`site.getusersitepackages()` returns the location of the user-specific site-packages directory
even when the user-specific site-packages is disabled.
```
$ python -s -m site
sys.path = [
'/home/user/conda/lib/python37.zip',
'/home/user/conda/lib/python3.7',
'/home/user/conda/lib/python3.7/lib-dynload',
'/home/user/conda/lib/python3.7/site-packages',
]
USER_BASE: '/home/user/.local' (exists)
USER_SITE: '/home/user/.local/lib/python3.7/site-packages' (doesn't exist)
ENABLE_USER_SITE: False
```
It was not practical to prevent the function from returning None if user-specific site-packages are disabled, since there are other uses of the function which are relying on this behaviour (e.g. `python -m site`).
|
|
|
|
|
| |
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 `for` statement doesn't use a condition and this function, the `while` statement does.
|
|
|
|
|
| |
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)
|
| |
|
| |
|
|
|
|
| |
is called (#22505)
|
|
|
|
| |
Call urllib.request.urlcleanup() to reset the global
urllib.request._opener.
|
|
|
| |
Remove mention of space in "remove multiple items from list".
|
| |
|
|
|
| |
https://sqlite.org/releaselog/3_33_0.html
|
| |
|
|
|
|
| |
modifying an XML tree while iterating over it. (GH-22464)
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Multiple typo fixes in code comments
Automerge-Triggered-By: @Mariatta
|
| |
|
| |
|
|
|
|
| |
(GH-22526)
|
|
|
| |
Also document that eval() does this (the same way).
|
|
|
|
|
| |
This changes a few occurrences left behind by #22340.
Automerge-Triggered-By: @gvanrossum
|
|
|
|
| |
symtable module (GH-22391)
|
| |
|
|
|
|
|
| |
Missed this occurrence before, sorry. Also changed "the PEP" to "PEP".
Automerge-Triggered-By: @gvanrossum
|
|
|
| |
bpo-40564: Avoid copying state from extant ZipFile.
|
|
|
| |
Co-authored-by: Skip Montanaro
|
|
|
|
| |
(GH-22418)
|
| |
|