| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(GH-6305)
|
|
|
| |
Most of them have been added in 3.7.
|
| |
|
|
|
| |
* Also in docs
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-6113)
test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()`
using the KqueueSelector. Closing `proto.transport` (as is done in
`write_pty_output()`) seems to fix it.
(cherry picked from commit 12f74d8608c15cacd9d5786524e2be9ca36f007e)
Co-authored-by: Nathan Henrie <n8henrie@users.noreply.github.com>
Also, re-enable test_read_pty_output on macOS.
|
| |
|
|
|
|
| |
(GH-6195)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
copy and pickle (GH-6216)
This also fixes python/typing#512
This also fixes python/typing#511
As was discussed in both issues, some typing forms deserve to be treated
as immutable by copy and pickle modules, so that:
* copy(X) is X
* deepcopy(X) is X
* loads(dumps(X)) is X # pickled by reference
This PR adds such behaviour to:
* Type variables
* Special forms like Union, Any, ClassVar
* Unsubscripted generic aliases to containers like List, Mapping, Iterable
This not only resolves inconsistencies mentioned in the issues, but also
improves backwards compatibility with previous versions of Python
(including 3.6).
Note that this requires some dances with __module__ for type variables
(similar to NamedTuple) because the class TypeVar itself is define in typing,
while type variables should get module where they were defined.
https://bugs.python.org/issue32873
|
|
|
|
|
|
|
|
|
|
| |
bpo-32844: subprocess: Fix a potential misredirection of a low fd to stderr.
When redirecting, subprocess attempts to achieve the following state:
each fd to be redirected to is less than or equal to the fd
it is redirected from, which is necessary because redirection
occurs in the ascending order of destination descriptors.
It fails to do so in a couple of corner cases,
for example, if 1 is redirected to 2 and 0 is closed in the parent.
|
|
|
|
|
| |
argument. (GH-6260)
This is part of PEP 487 and the descriptor protocol.
|
| |
|
|
|
|
|
| |
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
|
|
|
| |
Also, re-enable a test for ClassVars with default_factory.
|
|
|
|
| |
I noticed this had slipped into the original commit when
resolving a merge conflict for the backport to 3.7.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.
This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.
|
|
|
|
|
|
|
|
|
| |
- new test case for pre-initialization of sys.warnoptions and sys._xoptions
- restored ability to call these APIs prior to Py_Initialize
- updated the docs for the affected APIs to make it clear they can be
called before Py_Initialize
- also enhanced the existing embedding test cases
to check for expected settings in the sys module
|
|
|
|
|
|
|
| |
Harden ssl module against LibreSSL CVE-2018-8970.
X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new test
ensures that NULL bytes are not allowed.
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
| |
|
|
|
|
|
|
|
| |
string lookup which then is tested with if tests. (GH-6222)
* Change _hash_action to be a function table lookup, instead of a list
of strings which is then tested with if statements.
|
|
|
|
|
|
|
|
|
|
| |
- When adding a single element to a list, use .append() instead of
+= and creating a new list.
- For consistency, import the copy module, instead of just deepcopy. This
leaves only a module at the class level, instead of a function.
- Improve some comments.
- Improve some whitespace.
- Use tuples instead of lists.
- Simplify a test.
|
|
|
|
|
|
| |
Commit 141c5e8c re-added match_hostname() call. The resurrection of the
function call was never intended and was solely a merge mistake.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
| |
(GH-5848)
|
| |
|
|
|
|
| |
into/out of an except block.
|
|
|
|
|
|
|
|
| |
* Added new opcode END_ASYNC_FOR.
* Setting global StopAsyncIteration no longer breaks "async for" loops.
* Jumping into an "async for" loop is now disabled.
* Jumping out of an "async for" loop no longer corrupts the stack.
* Simplify the compiler.
|
|
|
|
|
| |
Field, but doesn't have a type annotation. (GH-6192)
If a dataclass has a member variable that's of type Field, but it doesn't have a type annotation, raise TypeError.
|
|
|
|
|
| |
This improves error message for situations when a non-class is
checked w.r.t. an abstract base class.
|
| |
|
|
|
|
| |
- Add missing 'Field' to __all__.
- Improve tests to catch this.
|
| |
|
| |
|
|
|
|
|
| |
default_factory (GH-6170)
Fix the way that new annotations in a class are detected.
|
|
|
|
|
|
| |
The result of host() was not empty when the network is constructed by a tuple containing an
integer mask and only 1 bit left for addresses.
|
|
|
|
| |
Original patch by Jon Foster and Berker Peksag.
|
|
|
|
| |
{Parse,Split}Result.port (GH-6078)
|
|
|
|
|
| |
(GH-6152)
If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.
|
| |
|
|
|
|
|
|
|
| |
derived classes (#6147)
If a non-dataclass derives from a frozen dataclass, allow attributes to be set.
Require either all of the dataclasses in a class hierarchy to be frozen, or all non-frozen.
Store `@dataclass` parameters on the class object under `__dataclass_params__`. This is needed to detect frozen base classes.
|
| |
|
|
|
|
|
| |
This reverts commit ac317700ce7439e38a8b420218d9a5035bba92ed.
(Reverts only the lib2to3 part.)
|
| |
|
| |
|
| |
|
|
|
| |
It was actually fixed in SQLite 3.8.8, not 3.8.7.
|
| |
|
|
|
|
|
| |
Multi-phase initialized modules allow m_traverse to be called while the
module is still being initialized, so module authors may need to account
for that.
|
| |
|
|
|
| |
(cherry picked from commit e32bbaf376a09c149fa7c7f2919d7c9ce4e2a055)
|