| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
bpo-36256: Fix bug in parsermodule when parsing if statements
In the parser module, when validating nodes before starting the parsing with to create a ST in "parser_newstobject" there is a problem that appears when two arcs in the same DFA state has transitions with labels with the same type. For example, the DFA for if_stmt has a state with
two labels with the same type: "elif" and "else" (type NAME). The algorithm tries one by one the arcs until the label that starts the arc transition has a label with the same type of the current child label we are trying to accept. In this case, the arc for "elif" comes before the arc for "else"and passes this test (because the current child label is "else" and has the same type as "elif"). This lead to expecting a namedexpr_test (305) instead of a colon (11). The solution is to compare also the string representation (in case there is one) of the labels to see if the transition that we have is the correct one.
|
|
|
| |
Also fixes venvs from the build directory on Windows.
|
| |
|
|
|
|
|
|
|
| |
* Improve coverage.
* Note inherent limitations of the accuracy tests
https://bugs.python.org/issue36324
|
| |
|
| |
|
|
|
|
|
| |
approximation (GH-12448)
https://bugs.python.org/issue36324
|
|
|
|
| |
informative (GH-12446)
|
| |
|
| |
|
|
|
|
|
|
| |
Also, deprecate the *_field_types* attributes which duplicated the information in *\__annotations__*.
https://bugs.python.org/issue36320
|
|
|
|
| |
The test test_customize_compiler() now mocks all sysconfig variables
and all environment variables used by customize_compiler().
|
|
|
|
|
|
| |
(GH-12398)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix handshake timeout leak in asyncio/sslproto
Refs MagicStack/uvloop#222
* Break circular ref _SSLPipe <-> SSLProtocol
* bpo-34745: Fix asyncio ssl memory leak
* Break circular ref SSLProtocol <-> UserProtocol
* Add NEWS entry
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
status in multiprocessing.Pool (#11488)
* bpo-35493: Use Process.sentinel instead of sleeping for polling worker status in multiprocessing.Pool
* Use self-pipe pattern to avoid polling for changes
* Refactor some variable names and add comments
* Restore timeout and poll
* Use reader object only on wait()
* Recompute worker sentinels every time
* Remove timeout and use change notifier
* Refactor some methods to be overloaded by the ThreadPool, document the cache class and fix typos
|
|
|
|
| |
ProcessPoolExecutor workers will hold the return value of their last task in memory until the next task is received. Since the return value has already been propagated to the parent process's Future (or has been discarded by this point), the object can be safely released.
|
|
|
| |
If argv is empty, add an empty string.
|
|
|
|
|
|
|
|
|
| |
Fix CFLAGS in customize_compiler() of distutils.sysconfig: when the
CFLAGS environment variable is defined, don't override CFLAGS variable with
the OPT variable anymore.
Initial patch written by David Malcolm.
Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
(GH-12058)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The value is a string for string and byte literals, None otherwise.
It is 'u' for u"..." literals, 'b' for b"..." literals, '' for "..." literals.
The 'r' (raw) prefix is ignored.
Does not apply to f-strings.
This appears sufficient to make mypy capable of using the stdlib ast module instead of typed_ast (assuming a mypy patch I'm working on).
WIP: I need to make the tests pass. @ilevkivskyi @serhiy-storchaka
https://bugs.python.org/issue36280
|
| |
|
| |
|
| |
|
|
|
|
| |
Sizeof new empty dict becomes 72 bytes from 240 bytes (amd64).
It is same size to empty dict created by dict.clear().
|
| |
|
|
|
|
| |
This is relevant for `debug doesnotexist()`, which would crash with a
NameError otherwise.
|
|
|
|
|
|
|
|
|
|
| |
test_posix.PosixUidGidTests:
* Add tests for invalid uid/gid type (str)
* Add UID_OVERFLOW and GID_OVERFLOW constants to replace (1 << 32)
Initial patch written by David Malcolm.
Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
|
|
|
|
| |
Prevent conflicts with Linux dark themes
(and slightly darken calltip background).
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Refactor cookie path check as per RFC 6265
* Add tests for prefix match of path
* Add news entry
* Fix set_ok_path and refactor tests
* Use slice for last letter
|
|
|
| |
Don't send cookies of domain A without Domain attribute to domain B when domain A is a suffix match of domain B while using a cookiejar with `http.cookiejar.DefaultCookiePolicy` policy. Patch by Karthikeyan Singaravelan.
|
| |
|
|
|
|
|
| |
The overflow check was relying on undefined behaviour as it was using the result of the multiplication to do the check, and once the overflow has already happened, any operation on the result is undefined behaviour.
Some extra checks that exercise code paths related to this are also added.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This adds a `feature_version` flag to `ast.parse()` (documented) and `compile()` (hidden) that allow tweaking the parser to support older versions of the grammar. In particular if `feature_version` is 5 or 6, the hacks for the `async` and `await` keyword from PEP 492 are reinstated. (For 7 or higher, these are unconditionally treated as keywords, but they are still special tokens rather than `NAME` tokens that the parser driver recognizes.)
https://bugs.python.org/issue35975
|
|
|
|
| |
(GH-12201)
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
bpo-34247, bpo-36142: The PYTHONMALLOC environment variable has the
priority over PYTHONDEV env var and "-X dev" command line option.
For example, PYTHONMALLOC=malloc PYTHONDEVMODE=1 sets the memory
allocators to "malloc" (and not to "debug").
Add an unit test.
|
|
|
|
|
| |
* Update pip to 19.0.3
* Update setuptools to 40.8.0
|