This has no semantic impact as the class is guarded with a hasattr()
check; this is being done to keep typing.py in sync between Python 3.5
and 3.6 as requested by Guido.
It can be seen on various buildbots like 3.x.cea-indiana-amd64
and 3.x.murray-snowleopard:
/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Modules/_ssl.c:2227: warning: unused variable 'libver'
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Modules/_ssl.c:2227: warning: unused variable ‘libver’
Issue #26735: Fix os.urandom() on Solaris 11.3 and newer when reading more than
1,024 bytes: call getrandom() multiple times with a limit of 1024 bytes per
call.
The default value of __len__ is 0, not 1:
>>> from unittest.mock import MagicMock
>>> mock = MagicMock()
>>> len(mock)
0
Reported by Alex on docs@p.o.
Remove the remaining VMSError reference. VMS support is gone.
* No longer attempts to close already freed socket file descriptor
* Use socket object to be compatible with Windows
* Do not use a timeout to avoid complication with non-blocking mode
* Use internal localhost server rather than depending on a third party
* Avoid trouble with buffered HTTP data by testing tunnelled CONNECT data
ByteArrayAsStringTest.fixtype() was converting test data to bytes, not byte-
array, therefore many of the test cases inherited in this class were not
actually being run on the bytearray type.
The tests in buffer_tests.py were redundant with methods in string_tests
.MixinStrUnicodeUserStringTest and string_tests.CommonTest. These methods are
now moved into string_tests.BaseTest, where they will also get run for bytes
and bytearray.
This change also moves test_additional_split(), test_additional_rsplit(), and
test_strip() from CommonTest to BaseTest, meaning these tests are now run for
bytes and bytearray. I plan to eliminate redundancies with existing tests in
test_bytes.py soon.
This syncs to rev 7b43ada77821d23e55e3a4b35f6055a59b9e1ad7 there.
Summary:
- Add typing.DefaultDict (as a generic variant of collections.defaultdict).
- Use collections.Reversible if it exists (only relevant for Python 3.6).
- Revamped generic class behavior to conform to updated PEP 484.
- Improve speed of Generic.__new__.
- Make sure __init__ is called for new Generic instances. Fix issue #26391.
- Refactor async support to be compatible with 3.2, 3.3, 3.4.
- Remove 'io' and 're' from __all__ (they still exist, just not
included by "import *"). Fix issue #26234.
- Change @overload -- you can now use it outside stubs (you still
cannot call the decorated function though).
* Group functions into six new subsections
* Document the underlying Readline function or variable accessed
* get_history_length() returns the history file limit
* clear_history() is conditionally compiled in
* Clarify zero and one bases for history item indexes
* parse_and_bind() uses its argument directly as an init line
* Change "command line" to "line buffer" for consistency
* read_init_file() also executes the file
* read_history_file() replaces the previous history
* write_history_file() overwrites any existing file
* Differentiate history file lines from history list items, which could be
multi-line
* Add more information about completion, also addressing Issue #10796
* libedit (Editline) may be used on any platform; detection is OS X specific