Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the fork #1

Merged
merged 378 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
378 commits
Select commit Hold shift + click to select a range
e0bec69
Remove old comment in string_parser.c (GH-20906)
pablogsal Jun 16, 2020
fc710ee
bpo-40993: Don't run Travis CI coverage on PRs (GH-20916)
vstinner Jun 16, 2020
fcc60e4
bpo-40989: Make _PyTraceMalloc_NewReference() internal (GH-20915)
vstinner Jun 16, 2020
51c5896
bpo-40958: Avoid buffer overflow in the parser when indexing the curr…
pablogsal Jun 16, 2020
c4862e3
bpo-1635741: Port _gdbm module to multiphase initialization (GH-20920)
corona10 Jun 16, 2020
818f5b5
bpo-32604: Clean up test.support.interpreters. (gh-20926)
ericsnowcurrently Jun 17, 2020
2c4928d
bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878)
methane Jun 17, 2020
07923f3
bpo-35059: Enhance _PyObject_GC_TRACK() macros (GH-20931)
vstinner Jun 17, 2020
8e34e92
bpo-36346: Make unicodeobject.h C89 compatible (GH-20934)
methane Jun 17, 2020
8362893
bpo-41003: Fix test_copyreg when numpy is installed (GH-20935)
vstinner Jun 17, 2020
bb6ec14
bpo-41009: fix requires_OS_version() class decorator (GH-20942)
tiran Jun 17, 2020
7824cc0
bpo-41006: collections imports lazily heap (GH-20940)
vstinner Jun 17, 2020
98ce7b1
bpo-41006: pkgutil imports lazily re (GH-20939)
vstinner Jun 17, 2020
236a0f5
bpo-40637: Do not emit warnings for disabled builtin hashes (GH-20937)
stratakis Jun 17, 2020
9e09849
bpo-41006: importlib.util no longer imports typing (GH-20938)
vstinner Jun 17, 2020
4c18fc8
bpo-41006: Document the runpy optimization (GH-20953)
vstinner Jun 17, 2020
1bf7959
bpo-41006: Remove init_sys_streams() hack (GH-20954)
vstinner Jun 17, 2020
2c2a4f3
bpo-41006: What's New: less => fewer modules (GH-20955)
vstinner Jun 17, 2020
ddbeb2f
bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (…
vstinner Jun 18, 2020
8f192d1
bpo-40884: Added defaults parameter for logging.Formatter (GH-20668)
bharel Jun 18, 2020
8a64cea
bpo-38144: Add the root_dir and dir_fd parameters in glob.glob(). (GH…
serhiy-storchaka Jun 18, 2020
d906f0e
Update CODEOWNERS to account for the new parser location (GH-20971)
pablogsal Jun 18, 2020
01ece63
bpo-40334: Produce better error messages on invalid targets (GH-20106)
lysnikolaou Jun 18, 2020
37bb289
bpo-40943: PY_SSIZE_T_CLEAN required for '#' formats (GH-20784)
vstinner Jun 19, 2020
310f6aa
bpo-40636: PEP 618: add strict parameter to zip() (GH-20921)
gvanrossum Jun 19, 2020
66a65ba
Improve readability of `formataddr` docstring (GH-20963)
jugmac00 Jun 19, 2020
8a0fe7b
Improve blake2 comment for Victor (GH-20981)
tiran Jun 19, 2020
ec68918
bpo-40077: Convert _bz2 module to use PyType_FromSpec (GH-20960)
corona10 Jun 19, 2020
3358da4
bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS …
vstinner Jun 19, 2020
59cf853
bpo-40636: Documentation for zip-strict (#20961)
cool-RR Jun 19, 2020
a041e11
bpo-41040: Fix test_modulefinder. (GH-20991)
serhiy-storchaka Jun 19, 2020
9355868
bpo-41043: Escape literal part of the path for glob(). (GH-20994)
serhiy-storchaka Jun 20, 2020
344c2a7
bpo-41024: doc: Explicitly mention use of 'enum.Enum' as a valid cont…
vincent-ferotin Jun 20, 2020
861efc6
bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970)
lysnikolaou Jun 20, 2020
af157fa
Add link to .pypirc specification (GH-20680)
bhrutledge Jun 20, 2020
55460ee
bpo-41044: Generate valid PEG python parsers for opt+seq rules (GH-20…
isidentical Jun 20, 2020
314858e
bpo-40939: Remove the old parser (Part 2) (GH-21005)
lysnikolaou Jun 20, 2020
eb0d5c3
bpo-41056: Fix a NULL pointer dereference on MemoryError within the s…
gpshead Jun 20, 2020
3ccb96c
bpo-41056: Use the fildes converter for fd to please Coverity. (GH-21…
gpshead Jun 20, 2020
6c4e0bd
bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the gram…
lysnikolaou Jun 21, 2020
19fcffa
bpo-41058: Use source file encoding in pdb.find_function(). (GH-21010)
serhiy-storchaka Jun 21, 2020
f9bab74
bpo-41055: Remove outdated tests for the tp_print slot. (GH-21006)
serhiy-storchaka Jun 21, 2020
6989af0
bpo-41052: Opt out serialization/deserialization for _random.Random (…
corona10 Jun 21, 2020
564cd18
bpo-40939: Rename PyPegen* functions to PyParser* (GH-21016)
lysnikolaou Jun 21, 2020
6f79838
Skip tests to fix bot (GH-20777)
nanjekyejoannah Jun 21, 2020
81328f3
bpo-41056: Fix reference to deallocated stack in pathconfig (Coverity…
gpshead Jun 22, 2020
d780fa7
bpo-41056: Fix a possible MemoryError leak within zoneinfo. (GH-21007)
gpshead Jun 22, 2020
4901ea9
bpo-41061: Fix incorrect expressions in hashtable (GH-21028)
tiran Jun 22, 2020
cafe1b6
bpo-40824: Do not mask errors in __iter__ in "in" and the operator mo…
serhiy-storchaka Jun 22, 2020
c88239f
bpo-26407: Do not mask errors in csv. (GH-20536)
serhiy-storchaka Jun 22, 2020
36ff513
bpo-41068: Fix read after write in zipfile for non-ASCII files names.…
serhiy-storchaka Jun 22, 2020
9e27bc0
bpo-41005: Fixed perrmission error (GH-20936)
KrishnaSai2020 Jun 22, 2020
384621c
bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056)
vstinner Jun 22, 2020
c45dbe9
bpo-41078: Add pycore_list.h internal header file (GH-21057)
vstinner Jun 22, 2020
1937edd
bpo-1635741: Port _lzma module to multiphase initialization (GH-19382)
corona10 Jun 22, 2020
c96d00e
bpo-41078: Fix bltinmodule.c with Py_TRACE_REFS (GH-21058)
vstinner Jun 22, 2020
a16d697
Improve asyncio.loop.call_soon() documentation (GH-20883)
akindofyoga Jun 23, 2020
26a1ad1
Small clean-ups for the random module (GH-21038)
rhettinger Jun 23, 2020
b4e85ca
bpo-40521: Make dict free lists per-interpreter (GH-20645)
vstinner Jun 23, 2020
261cfed
bpo-40521: Make the empty frozenset per interpreter (GH-21068)
vstinner Jun 23, 2020
1d3dad5
bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071)
WildCard65 Jun 23, 2020
32f2eda
bpo-40521: Remove freelist from collections.deque() (GH-21073)
rhettinger Jun 23, 2020
c41eed1
bpo-40521: Make bytes singletons per interpreter (GH-21074)
vstinner Jun 23, 2020
61b6492
bpo-36710: Pass tstate explicitly in abstract.c (GH-21075)
vstinner Jun 23, 2020
30a8933
Call _PyWarnings_InitState() in subinterpreters (GH-21078)
vstinner Jun 23, 2020
bc43f6e
bpo-41065: Use zip-strict in zoneinfo (GH-21031)
cool-RR Jun 23, 2020
522691c
bpo-40521: Cleanup code of free lists (GH-21082)
vstinner Jun 23, 2020
f9bd05e
bpo-40521: Empty frozenset is no longer a singleton (GH-21085)
rhettinger Jun 23, 2020
fe2a48c
bpo-41089: Filters and other issues in Visual Studio projects (GH-21070)
nnemkin Jun 23, 2020
930f451
On path with known exact float, extract the double with the fast macr…
rhettinger Jun 23, 2020
4efc336
bpo-41054: Simplify resource compilation on Windows (GH-21004)
nnemkin Jun 23, 2020
2c6e4e9
bpo-41039: Simplify python3.dll build (GH-20989)
nnemkin Jun 23, 2020
281cce1
bpo-40521: Make MemoryError free list per interpreter (GH-21086)
vstinner Jun 23, 2020
d051801
bpo-31938: Fix default-value signatures of several functions in the s…
asottile Jun 23, 2020
f363d0a
bpo-40521: Make empty Unicode string per interpreter (GH-21096)
vstinner Jun 23, 2020
90ed8a6
bpo-40521: Optimize PyUnicode_New(0, maxchar) (GH-21099)
vstinner Jun 23, 2020
bbf36e8
bpo-41070: Simplify pyshellext.dll build (GH-21037)
nnemkin Jun 23, 2020
2f9ada9
bpo-40521: Make Unicode latin1 singletons per interpreter (GH-21101)
vstinner Jun 24, 2020
cde283d
bpo-40521: Fix _PyContext_Fini() (GH-21103)
vstinner Jun 24, 2020
bf2e515
bpo-40707: Document that Popen.communicate sets the returncode attrib…
gareth-rees Jun 24, 2020
6c6810d
bpo-41094: Fix decoding errors with audit when open files. (GH-21095)
serhiy-storchaka Jun 24, 2020
80526f6
Fix typo in dataclasses module (GH-21109)
jugmac00 Jun 24, 2020
0430dfa
bpo-40521: Always create the empty tuple singleton (GH-21116)
vstinner Jun 24, 2020
33b79b1
bpo-41038: Fix non-ASCII string corruption in Win32 resource files (G…
nnemkin Jun 24, 2020
a7dc714
bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)
serhiy-storchaka Jun 24, 2020
cf18c9e
bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081)
arisaka97 Jun 24, 2020
152f0b8
bpo-41002: Optimize HTTPResponse.read with a given amount (GH-20943)
bmerry Jun 25, 2020
55939b1
bpo-41074: Fix support of non-ASCII names and SQL in msilib. (GH-21126)
serhiy-storchaka Jun 25, 2020
1931e64
Forward port macOS installer updates from 3.7/3.8/3.9 (GH-21132)
ned-deily Jun 25, 2020
5f190d2
bpo-39580: add check for CLI installation on macOS (GH-20271)
rickheil Jun 25, 2020
f7ba40b
bpo-40275: Use new test.support helper submodules in tests (GH-20849)
shihai1991 Jun 25, 2020
94eee69
bpo-35773: Fix test_bdb on non-UTF-8 locales. (GH-21136)
serhiy-storchaka Jun 25, 2020
589e8fe
bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. (GH-21141)
ned-deily Jun 25, 2020
aad8f0e
bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138)
serhiy-storchaka Jun 25, 2020
0f8ec1f
bpo-41113: Fix test_warnings on non-Western locales. (GH-21143)
serhiy-storchaka Jun 25, 2020
91698d8
bpo-40521: Optimize PyBytes_FromStringAndSize(str, 0) (GH-21142)
vstinner Jun 25, 2020
06a40d7
bpo-40275: Use new test.support helper submodules in tests (GH-20824)
shihai1991 Jun 25, 2020
8d02f91
bpo-40939: run autoreconf to fix configure{,.ac} disparity (GH-21152)
ned-deily Jun 25, 2020
8ea6353
BPO-41100: Support macOS 11 when building (GH-21113)
ronaldoussoren Jun 25, 2020
700cfa8
bpo-41069: Make TESTFN and the CWD for tests containing non-ascii cha…
serhiy-storchaka Jun 25, 2020
847f94f
bpo-40275: Use new test.support helper submodules in tests (GH-21151)
shihai1991 Jun 25, 2020
77ed29b
Fix typo in functions.rst (GH-21131)
cool-RR Jun 25, 2020
6f8a6ee
bpo-41103: Remove old buffer protocol support (#21117)
methane Jun 25, 2020
4b85e60
bpo-41119: Output correct error message for list/tuple followed by co…
lysnikolaou Jun 25, 2020
ef19bad
Improve code organization for the random module (GH-21161)
rhettinger Jun 26, 2020
2e0a920
bpo-41084: Adjust message when an f-string expression causes a Syntax…
lysnikolaou Jun 26, 2020
2f168c6
bpo-41100: clarify NEWS item about macOS 11 support (GH-21174)
ned-deily Jun 27, 2020
20a7902
bpo-41123: Remove Py_UNICODE_str* functions (GH-21164)
methane Jun 27, 2020
9cfcdb7
Remove dead code from tracemalloc (GH-21029)
tiran Jun 27, 2020
6dcbc24
bpo-41132: Use pymalloc allocator in the f-string parser (GH-21173)
lysnikolaou Jun 27, 2020
c8f29ad
bpo-40769: Allow extra surrounding parentheses for invalid annotated …
isidentical Jun 27, 2020
89e82c4
Add soft keywords to the documentation (GH-21185)
pablogsal Jun 27, 2020
1f0f4ab
bpo-41076: Pre-feed the parser with the f-string expression location …
lysnikolaou Jun 27, 2020
9d197c7
bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (…
gvanrossum Jun 28, 2020
60eb9f1
bpo-39151: Simplify DFS in the assembler (GH-17733)
pablogsal Jun 28, 2020
8df1016
bpo-38870: Extend subject of ast.unparse warnings (GH-21053)
isidentical Jun 28, 2020
8ab77c6
bpo-41144: Fix IDLE open module error (#21182)
E-Paine Jun 28, 2020
cd3c2bd
bpo-31082: Use "iterable" in the docstring for functools.reduce() (GH…
ZackerySpytz Jun 28, 2020
04cdeb7
bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)
serhiy-storchaka Jun 28, 2020
8bea91b
bpo-40874 Update the required libmpdec version for the decimal module…
skrah Jun 28, 2020
d9f2a13
bpo-41123: Remove PyUnicode_GetMax() (GH-21192)
methane Jun 29, 2020
e4f1fe6
bpo-41123: Remove PyLong_FromUnicode() (GH-21204)
methane Jun 29, 2020
7f569c9
bpo-41048: mimetypes should read the rule file using UTF-8, not the l…
srinivasreddy Jun 29, 2020
a3ad95d
Update libmpdec license dates (GH-21216)
skrah Jun 29, 2020
b30ee26
bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interfac…
rvteja92 Jun 29, 2020
5b96370
Fix typo in Object/listobject.c (GH-21079)
jeongukjae Jun 29, 2020
e67f7db
bpo-37999: Simplify the conversion code for %c, %d, %x, etc. (GH-20437)
serhiy-storchaka Jun 29, 2020
2fb5f03
bpo-40924: Ensure importlib.resources.path returns an extant path (GH…
jaraco Jun 29, 2020
dd8a93e
bpo-23427: Add sys.orig_argv attribute (GH-20729)
vstinner Jun 29, 2020
2515a28
bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214)
serhiy-storchaka Jun 30, 2020
b333266
bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)
methane Jun 30, 2020
349f76c
bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (…
serhiy-storchaka Jun 30, 2020
038dd0f
bpo-36346: Raise DeprecationWarning when creating legacy Unicode (GH-…
methane Jun 30, 2020
694d31e
bpo-41158: IDLE: rewrite the code for handling file encoding (GH-21215)
serhiy-storchaka Jun 30, 2020
ba67d73
bpo-41142: Add support of non-ASCII paths for CAB files. (GH-21195)
serhiy-storchaka Jun 30, 2020
604d95e
bpo-41100: fix _decimal for arm64 Mac OS (GH-21228)
lawrence-danna-apple Jun 30, 2020
3fa4799
Update FAQ release schedule and estimated users (GH-21180)
E-Paine Jun 30, 2020
3ddc634
bpo-40275: Use new test.support helper submodules in tests (GH-21219)
shihai1991 Jun 30, 2020
0c4f0f3
bpo-40275: Use new test.support helper submodules in tests (GH-21169)
shihai1991 Jun 30, 2020
bd4a3f2
bpo-39314: Closes parenthesis when autocompleting for functions that …
remilapeyre Jun 30, 2020
1648c99
bpo-41161 Add news entry for libmpdec-2.5.0 (GH-21243)
skrah Jun 30, 2020
741008a
Doc: Minor fix to init config C API documentation (GH-21198)
tomerv Jul 1, 2020
d0981e6
Add lysnikolaou to CODEOWNERS for the new parser (GH-21252)
lysnikolaou Jul 1, 2020
5d5c84e
bpo-41187: Convert the _msi module to Argument Clinic (GH-21264)
serhiy-storchaka Jul 1, 2020
6b34d7b
bpo-39385: Add an assertNoLogs context manager to unittest.TestCase (…
kitchoi Jul 1, 2020
90db465
bpo-40521: Cleanup finalize_interp_types() (GH-21265)
vstinner Jul 1, 2020
666ecfb
bpo-1635741: Release Unicode interned strings at exit (GH-21269)
vstinner Jul 1, 2020
004e64e
bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.…
remilapeyre Jul 2, 2020
0ab917e
bpo-41193: Ignore OSError in readline write_history() (GH-21279)
vstinner Jul 2, 2020
67673b0
Remove extraneous file from the Docs folder (GH-21286)
pablogsal Jul 2, 2020
148f329
bpo-39960: Allow heap types in the "Carlo Verre" hack check that over…
scoder Jul 3, 2020
9d00697
bpo-1635741: Port sha256 module to multiphase init (PEP 489) (GH-21189)
koubaa Jul 3, 2020
74419f0
bpo-41194: Pass module state in Python-ast.c (GH-21284)
vstinner Jul 3, 2020
91e1bc1
bpo-41194: The _ast module cannot be loaded more than once (GH-21290)
vstinner Jul 3, 2020
3549ca3
bpo-1635741: Fix unicode_dealloc() for mortal interned string (GH-21270)
vstinner Jul 3, 2020
c0b214b
bpo-1635741: Port faulthandler module to multiphase initialization (G…
corona10 Jul 3, 2020
b1cc6ba
bpo-41194: Convert _ast extension to PEP 489 (GH-21293)
vstinner Jul 3, 2020
d160e0f
bpo-41180: Audit code.__new__ when unmarshalling (GH-21271)
tkmikan Jul 3, 2020
daa0fe0
bpo-41162: Clear audit hooks later during finalization (GH-21222)
zkonge Jul 3, 2020
b40e434
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)
ZackerySpytz Jul 4, 2020
1f76453
bpo-41204: Fix compiler warning in ast_type_init() (GH-21307)
vstinner Jul 4, 2020
13c90e8
Uncomment Py_DEPRECATED for Py_UNICODE APIs (GH-21318)
methane Jul 5, 2020
9c84417
bpo-41211: Doc: Fix PyLong_FromUnicodeObject (GH-21325)
methane Jul 5, 2020
7fed755
bpo-39168: Remove the __new__ method of typing.Generic (GH-21327)
ZackerySpytz Jul 5, 2020
b3dd5cd
bpo-36346: Undeprecate private function _PyUnicode_AsUnicode(). (GH-2…
serhiy-storchaka Jul 5, 2020
e51dd9d
bpo-29727: Register array.array as a MutableSequence (GH-21338)
pablogsal Jul 5, 2020
9ed3cd8
bpo-26205: Specify the number of nested scopes (GH-21324)
nanjekyejoannah Jul 6, 2020
d12af71
bpo-28681: Clarify multiple function names in the tutorial (GH-21340)
nanjekyejoannah Jul 6, 2020
9ce8132
bpo-41165: Deprecate PyEval_ReleaseLock() (GH-21309)
methane Jul 6, 2020
883bc63
bpo-40275: Use new test.support helper submodules in tests (GH-21314)
shihai1991 Jul 6, 2020
a089d21
bpo-40275: Use new test.support helper submodules in tests (GH-21315)
shihai1991 Jul 6, 2020
b4a9263
bpo-37207: Update whatsnews for 3.9 (GH-21337)
corona10 Jul 6, 2020
deb0162
bpo-40275: Use new test.support helper submodules in tests (GH-21317)
shihai1991 Jul 6, 2020
dcbaa1b
bpo-29778: Ensure python3.dll is loaded from correct locations when P…
zooba Jul 6, 2020
1ac0cbc
bpo-41215: Don't use NULL by default in the PEG parser keyword list (…
pablogsal Jul 6, 2020
a103e73
bpo-40742: Doc: fix parallel build. (GH-21237)
JulienPalard Jul 6, 2020
bd46174
bpo-41218: Only mark async code with CO_COROUTINE. (#21357)
Carreau Jul 6, 2020
c2c1f1f
bpo-41218: Improve the test cases for test_compile_top_level_await_no…
pablogsal Jul 6, 2020
782f44b
bpo-41215: Make assertion in the new parser more strict (GH-21364)
lysnikolaou Jul 6, 2020
6ae2780
bpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359)
jaraco Jul 7, 2020
8f42748
bpo-29778: test_embed tests the path configuration (GH-21306)
vstinner Jul 7, 2020
a95ac77
bpo-41224: Document is_annotated() in symtable module and update doc …
nanjekyejoannah Jul 7, 2020
10772ec
bpo-41173: Copy test results file from ARM worker before uploading (G…
zooba Jul 7, 2020
6f13adf
Add a test for get_id() (GH-21370)
nanjekyejoannah Jul 8, 2020
aebc049
closes bpo-41235: Fix the error handling in SSLContext.load_dh_params…
ZackerySpytz Jul 8, 2020
b26a0db
Revert "bpo-40170: PyType_HasFeature() now always calls PyType_GetFla…
vstinner Jul 8, 2020
529f426
bpo-41247: asyncio.set_running_loop() cache running loop holder (GH-2…
tontinton Jul 8, 2020
61fc23c
bpo-41175: Guard against a NULL pointer dereference within bytearrayo…
stratakis Jul 8, 2020
4fa61a7
bpo-40597: Allow email.contextmanager set_content() to set a null str…
msapiro Jul 8, 2020
a908bc4
Doc: Builtins functions: faster jump table (GH-21376)
JulienPalard Jul 9, 2020
ee96f32
bpo-41252: Fix incorrect refcounting in _ssl.c's _servername_callback…
ZackerySpytz Jul 9, 2020
61bb24a
bpo-41199: Docstring convention not followed for dataclasses document…
marload Jul 9, 2020
96a6a6d
bpo-40275: Use new test.support helper submodules in tests (GH-21412)
shihai1991 Jul 9, 2020
8b33961
bpo-29590: fix stack trace for gen.throw() with yield from (#19896)
cjerdonek Jul 9, 2020
af56c4f
bpo-41172: Fix check for compiler in test suite (GH-21400)
zooba Jul 9, 2020
1ee5dc1
Remove trailing >>> in enum docs (GH-21358)
E-Paine Jul 9, 2020
bce2eb4
bpo-37765: Add keywords to IDLE tab completions (GH-15138)
terryjreedy Jul 9, 2020
3cbade7
bpo-23802: patch: __deepcopy__ memo dict argument usage (GH-21326)
nanjekyejoannah Jul 10, 2020
0f9aa47
bpo-41263: Convert code.__new__ to Argument Clinic (GH-21426)
serhiy-storchaka Jul 10, 2020
d878349
bpo-36346: Do not use legacy Unicode C API in ctypes. (#21429)
serhiy-storchaka Jul 10, 2020
8182cc2
bpo-39573: Use the Py_TYPE() macro (GH-21433)
vstinner Jul 10, 2020
6fc732a
Fix typo in docs: 'created by th' -> 'created by the' (GH-21384)
marload Jul 10, 2020
9650fe0
bpo-20179: Convert the _overlapped module to the Argument Clinic (GH-…
ZackerySpytz Jul 10, 2020
4c8f09d
bpo-36346: Make using the legacy Unicode C API optional (GH-21437)
serhiy-storchaka Jul 10, 2020
344dce3
bpo-41228: Fix /a/are/ in monthcalendar() descripton (GH-21372)
nimadini Jul 11, 2020
6a1e9c2
Fix error in docstrings in bisect module (GH-21422)
jdavcs Jul 11, 2020
b7047e5
bpo-20181: Convert the readline module to the Argument Clinic (#14326)
ZackerySpytz Jul 12, 2020
545b54d
bpo-20175: Convert Modules/_multiprocessing to the Argument Clinic (G…
ZackerySpytz Jul 12, 2020
b0689ae
bpo-41146: Convert signal.default_int_handler() to Argument Clinic (G…
serhiy-storchaka Jul 12, 2020
4f309ab
bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)
serhiy-storchaka Jul 13, 2020
8dd32fe
bpo-32192: A basic lazy importer example (GH-21330)
nanjekyejoannah Jul 13, 2020
4f28f75
Fix repeated words in Classes tutorial (GH-21455)
PaulMcMillan Jul 14, 2020
2a51818
bpo-32528: Document the change in inheritance of asyncio.CancelledErr…
JustAnotherArchivist Jul 14, 2020
568fb0f
bpo-41273: asyncio's proactor read transport's better performance by …
tontinton Jul 14, 2020
bbceef6
bpo-20183: Convert _locale to the Argument Clinic (GH-14201)
ZackerySpytz Jul 15, 2020
5a8d121
bpo-39017: Avoid infinite loop in the tarfile module (GH-21454)
rishi93 Jul 15, 2020
015efdb
bpo-41302: Fix build with system libmpdec (GH-21481)
felixonmars Jul 15, 2020
ea62a4b
Fix -Wstrict-prototypes warning in thread_pthread.h. (GH-21477)
benjaminp Jul 15, 2020
0108b2a
Fix -Wstring-prototypes warnings in _zoneinfo.c. (GH-21478)
benjaminp Jul 15, 2020
af4eda4
bpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() c…
ZackerySpytz Jul 15, 2020
936a660
bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495)
zooba Jul 15, 2020
e34bbfd
bpo-31844: Remove _markupbase.ParserBase.error() (GH-8562)
berkerpeksag Jul 16, 2020
d4d127f
bpo-31844: Move whatsnew note to 3.10.rst (GH-21504)
berkerpeksag Jul 16, 2020
5e5c0f9
Remove unnecessary spaces in code blocks in urllib.parse.rst (GH-21500)
chrisyeh96 Jul 16, 2020
2ad7e9c
Fix possibly-unitialized warning in string_parser.c. (GH-21503)
benjaminp Jul 16, 2020
0275e04
Fix trivial typo in the PEG string parser (GH-21508)
ericvsmith Jul 16, 2020
38d3864
bpo-41300: IDLE - save files with non-ascii chars (GH-21512)
terryjreedy Jul 16, 2020
8e836bb
bpo-41195: Add getter for Openssl security level (GH-21282)
matthewhughes934 Jul 17, 2020
cb9879b
bpo-40941: Unify implicit and explicit state in the frame and generat…
markshannon Jul 17, 2020
164b04c
bpo-43104: Update NEWS to include CVE-2020-15801 reference (GH-21521)
zooba Jul 17, 2020
d583738
Fix a small grammatical mistake in a comment (GH-21526)
brettcannon Jul 17, 2020
b4c98ed
bpo-41288: Refactor of unpickling NEWOBJ and NEWOBJ_EX opcodes. (GH-2…
serhiy-storchaka Jul 18, 2020
80a5036
bpo-41262: Convert memoryview to Argument Clinic. (GH-21421)
serhiy-storchaka Jul 18, 2020
9b01c59
bpo-41325: Add version note for args and kwargs property in call obje…
uSpike Jul 18, 2020
8ca8a2e
bpo-39603: Prevent header injection in http methods (GH-18485)
amiremohamadi Jul 18, 2020
c53b310
bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528)
scoder Jul 18, 2020
6bf3237
bpo-41333: Convert OrderedDict.pop() to Argument Clinic (GH-21534)
serhiy-storchaka Jul 19, 2020
10e4664
bpo-41205: Document Decimal power 0 to the 0 (GH-21386)
srinivasreddy Jul 19, 2020
bfd0fbd
bpo-38169: Increase code coverage for SharedMemory and ShareableList …
vinay0410 Jul 19, 2020
902356a
bpo-41338: Fix DeprecationWarning in tests (GH-21542)
methane Jul 20, 2020
7cf1cb3
bpo-40741: Update macOS installer to use SQLite 3.32.3 (GH-20979)
Jul 20, 2020
7f03445
Doc: fix import of asdl.py when called from outside Doc/. (GH-21529)
JulienPalard Jul 20, 2020
d42528a
bpo-37703: improve asyncio.gather documentation regarding cancellatio…
vinay0410 Jul 20, 2020
f9bf015
Simple Documentation fix: Missing link to return type class. (GH-21291)
Volker-Weissmann Jul 20, 2020
eca2549
bpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546)
ZackerySpytz Jul 20, 2020
e123012
bpo-41343: Convert methods of complex to Argument Clinic (GH-21550)
corona10 Jul 20, 2020
12f4334
bpo-41334: Convert constructors of str, bytes and bytearray to Argume…
serhiy-storchaka Jul 20, 2020
5a2bac7
bpo-41342: Convert int.__round__ to Argument Clinic (GH-21549)
serhiy-storchaka Jul 20, 2020
84761c3
bpo-40741: Update Windows build to include SQLite 3.32.3 (GH-21570)
zooba Jul 20, 2020
5241e18
bpo-41283: Fix mismatched argument name for imghdr.what (GH-21501)
ammaraskar Jul 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bpo-29727: Register array.array as a MutableSequence (pythonGH-21338)
  • Loading branch information
pablogsal authored Jul 5, 2020
commit e51dd9dad6590bf3a940723fbbaaf4f64a3c9228
66 changes: 66 additions & 0 deletions Lib/test/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Roger E. Masse
"""

import collections.abc
import unittest
from test import support
from test.support import os_helper
Expand Down Expand Up @@ -29,6 +30,10 @@ def __init__(self, typecode, newarg=None):

class MiscTest(unittest.TestCase):

def test_array_is_sequence(self):
self.assertIsInstance(array.array("B"), collections.abc.MutableSequence)
self.assertIsInstance(array.array("B"), collections.abc.Reversible)

def test_bad_constructor(self):
self.assertRaises(TypeError, array.array)
self.assertRaises(TypeError, array.array, spam=42)
Expand Down Expand Up @@ -331,6 +336,67 @@ def test_exhausted_iterator(self):
self.assertEqual(list(empit), [self.outside])
self.assertEqual(list(a), list(self.example) + [self.outside])

def test_reverse_iterator(self):
a = array.array(self.typecode, self.example)
self.assertEqual(list(a), list(self.example))
self.assertEqual(list(reversed(a)), list(iter(a))[::-1])

def test_reverse_iterator_picking(self):
orig = array.array(self.typecode, self.example)
data = list(orig)
data2 = [self.outside] + data
rev_data = data[len(data)-2::-1] + [self.outside]
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
# initial iterator
itorig = reversed(orig)
d = pickle.dumps((itorig, orig), proto)
it, a = pickle.loads(d)
a.insert(0, self.outside)
self.assertEqual(type(it), type(itorig))
self.assertEqual(list(it), rev_data)
self.assertEqual(list(a), data2)

# running iterator
next(itorig)
d = pickle.dumps((itorig, orig), proto)
it, a = pickle.loads(d)
a.insert(0, self.outside)
self.assertEqual(type(it), type(itorig))
self.assertEqual(list(it), rev_data[1:])
self.assertEqual(list(a), data2)

# empty iterator
for i in range(1, len(data)):
next(itorig)
d = pickle.dumps((itorig, orig), proto)
it, a = pickle.loads(d)
a.insert(0, self.outside)
self.assertEqual(type(it), type(itorig))
self.assertEqual(list(it), [])
self.assertEqual(list(a), data2)

# exhausted iterator
self.assertRaises(StopIteration, next, itorig)
d = pickle.dumps((itorig, orig), proto)
it, a = pickle.loads(d)
a.insert(0, self.outside)
self.assertEqual(list(it), [])
self.assertEqual(list(a), data2)

def test_exhausted_reverse_iterator(self):
a = array.array(self.typecode, self.example)
self.assertEqual(list(a), list(self.example))
exhit = reversed(a)
empit = reversed(a)
for x in exhit: # exhaust the iterator
next(empit) # Pointing past the 0th position.
a.insert(0, self.outside)
self.assertEqual(list(exhit), [])
# The iterator index points past the 0th position so inserting
# an element in the beggining does not make it appear.
self.assertEqual(list(empit), [])
self.assertEqual(list(a), [self.outside] + list(self.example))

def test_insert(self):
a = array.array(self.typecode, self.example)
a.insert(0, self.example[0])
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Register :class:`array.array` as a
:class:`~collections.abc.MutableSequence`. Patch by Pablo Galindo.
20 changes: 20 additions & 0 deletions Modules/arraymodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2989,6 +2989,26 @@ array_modexec(PyObject *m)
Py_DECREF((PyObject *)&Arraytype);
return -1;
}

PyObject *abc_mod = PyImport_ImportModule("collections.abc");
if (!abc_mod) {
Py_DECREF((PyObject *)&Arraytype);
return -1;
}
PyObject *mutablesequence = PyObject_GetAttrString(abc_mod, "MutableSequence");
Py_DECREF(abc_mod);
if (!mutablesequence) {
Py_DECREF((PyObject *)&Arraytype);
return -1;
}
PyObject *res = PyObject_CallMethod(mutablesequence, "register", "O", (PyObject *)&Arraytype);
Py_DECREF(mutablesequence);
if (!res) {
Py_DECREF((PyObject *)&Arraytype);
return -1;
}
Py_DECREF(res);

Py_INCREF((PyObject *)&Arraytype);
if (PyModule_AddObject(m, "array", (PyObject *)&Arraytype) < 0) {
Py_DECREF((PyObject *)&Arraytype);
Expand Down