Commit graph

107732 commits

Author SHA1 Message Date
Victor Stinner 1f76453173
bpo-41204: Fix compiler warning in ast_type_init() (GH-21307) 2020-07-04 23:18:15 +02:00
Zackery Spytz b40e434386
bpo-33864: Clarify the docs for typing.ByteString (GH-21311) 2020-07-03 20:58:21 -07:00
Konge daa0fe03a5
bpo-41162: Clear audit hooks later during finalization (GH-21222) 2020-07-03 22:06:46 +01:00
tkmikan d160e0f8e2
bpo-41180: Audit code.__new__ when unmarshalling (GH-21271) 2020-07-03 21:56:30 +01:00
Victor Stinner b1cc6ba73a
bpo-41194: Convert _ast extension to PEP 489 (GH-21293)
Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.
2020-07-03 20:01:46 +02:00
Dong-hee Na c0b214bc08
bpo-1635741: Port faulthandler module to multiphase initialization (GH-21294) 2020-07-04 01:36:47 +09:00
Victor Stinner 3549ca313a
bpo-1635741: Fix unicode_dealloc() for mortal interned string (GH-21270)
When unicode_dealloc() is called on a mortal interned string, the
string reference counter is now reset at zero.
2020-07-03 16:59:12 +02:00
Victor Stinner 91e1bc18bd
bpo-41194: The _ast module cannot be loaded more than once (GH-21290)
Fix a crash in the _ast module: it can no longer be loaded more than
once. It now uses a global state rather than a module state.

* Move _ast module state: use a global state instead.
* Set _astmodule.m_size to -1, so the extension cannot be loaded more
  than once.
2020-07-03 14:15:53 +02:00
Victor Stinner 74419f0c64
bpo-41194: Pass module state in Python-ast.c (GH-21284)
Rework asdl_c.py to pass the module state to functions in
Python-ast.c, instead of using astmodulestate_global.

Handle also PyState_AddModule() failure in init_types().
2020-07-03 11:35:37 +02:00
Mohamed Koubaa 9d006977d7
bpo-1635741: Port sha256 module to multiphase init (PEP 489) (GH-21189) 2020-07-03 17:59:47 +09:00
scoder 148f329135
bpo-39960: Allow heap types in the "Carlo Verre" hack check that override "tp_setattro()" (GH-21092)
Automerge-Triggered-By: @gvanrossum
2020-07-02 17:09:28 -07:00
Pablo Galindo 67673b08ea
Remove extraneous file from the Docs folder (GH-21286) 2020-07-02 23:08:36 +01:00
Victor Stinner 0ab917e07e
bpo-41193: Ignore OSError in readline write_history() (GH-21279)
The write_history() atexit function of the readline completer now
ignores any OSError to ignore error if the filesystem is read-only,
instead of only ignoring FileNotFoundError and PermissionError.
2020-07-02 12:43:25 +02:00
Rémi Lapeyre 004e64e805
bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks() (GH-20874) 2020-07-01 20:41:21 -07:00
Victor Stinner 666ecfb095
bpo-1635741: Release Unicode interned strings at exit (GH-21269)
* PyUnicode_InternInPlace() now ensures that interned strings are
  ready.
* Add _PyUnicode_ClearInterned().
* Py_Finalize() now releases Unicode interned strings:
  call _PyUnicode_ClearInterned().
2020-07-02 01:19:57 +02:00
Victor Stinner 90db4653ae
bpo-40521: Cleanup finalize_interp_types() (GH-21265)
Remove the now unused is_main_interp parameter of
finalize_interp_types().
2020-07-01 23:21:36 +02:00
Kit Choi 6b34d7b51e
bpo-39385: Add an assertNoLogs context manager to unittest.TestCase (GH-18067)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2020-07-01 22:08:38 +01:00
Serhiy Storchaka 5d5c84ef78
bpo-41187: Convert the _msi module to Argument Clinic (GH-21264) 2020-07-01 21:53:07 +03:00
Lysandros Nikolaou d0981e61a5
Add lysnikolaou to CODEOWNERS for the new parser (GH-21252) 2020-07-01 12:47:35 +03:00
tomerv 741008a57b
Doc: Minor fix to init config C API documentation (GH-21198)
Co-authored-by: Tomer Vromen <tomer.vromen@intel.com>
2020-07-01 11:32:54 +02:00
Stefan Krah 1648c99932
bpo-41161 Add news entry for libmpdec-2.5.0 (GH-21243) 2020-06-30 20:58:57 +02:00
Rémi Lapeyre bd4a3f2145
bpo-39314: Closes parenthesis when autocompleting for functions that take no arguments (GH-20562) 2020-06-30 22:48:15 +09:00
Hai Shi 0c4f0f3b29
bpo-40275: Use new test.support helper submodules in tests (GH-21169) 2020-06-30 15:46:31 +02:00
Hai Shi 3ddc634cd5
bpo-40275: Use new test.support helper submodules in tests (GH-21219) 2020-06-30 15:46:06 +02:00
E-Paine 3fa4799c3f
Update FAQ release schedule and estimated users (GH-21180)
Update FAQ to include:
* The new yearly release schedule from PEP 602
* Estimated users from "tens of thousands" to "millions"
2020-06-30 05:42:43 -04:00
Lawrence D'Anna 604d95e235
bpo-41100: fix _decimal for arm64 Mac OS (GH-21228)
Patch by Lawrence Danna.
2020-06-30 11:15:46 +02:00
Serhiy Storchaka ba67d7386e
bpo-41142: Add support of non-ASCII paths for CAB files. (GH-21195)
* The path to the CAB file can be non-ASCII.
* Paths of added files can be non-ASCII.
2020-06-30 11:56:03 +03:00
Serhiy Storchaka 694d31e714
bpo-41158: IDLE: rewrite the code for handling file encoding (GH-21215) 2020-06-30 09:33:22 +03:00
Inada Naoki 038dd0f79d
bpo-36346: Raise DeprecationWarning when creating legacy Unicode (GH-20933) 2020-06-30 15:26:56 +09:00
Serhiy Storchaka 349f76c6aa
bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223) 2020-06-30 09:03:15 +03:00
Inada Naoki b3332660ad
bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209) 2020-06-30 12:23:07 +09:00
Serhiy Storchaka 2515a28230
bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214) 2020-06-29 20:18:22 -04:00
Victor Stinner dd8a93e23b
bpo-23427: Add sys.orig_argv attribute (GH-20729)
Add sys.orig_argv attribute: the list of the original command line
arguments passed to the Python executable.

Rename also PyConfig._orig_argv to PyConfig.orig_argv and
document it.
2020-06-30 00:49:03 +02:00
Jason R. Coombs 2fb5f038f2
bpo-40924: Ensure importlib.resources.path returns an extant path (GH-20857) 2020-06-29 22:59:22 +02:00
Serhiy Storchaka e67f7db3c3
bpo-37999: Simplify the conversion code for %c, %d, %x, etc. (GH-20437)
Since PyLong_AsLong() no longer use __int__, explicit call
of PyNumber_Index() before it is no longer needed.
2020-06-29 22:36:41 +03:00
Jeong Ukjae 5b96370030
Fix typo in Object/listobject.c (GH-21079) 2020-06-29 21:56:56 +03:00
Ravi Teja P b30ee26e36
bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033)
The __hash__() methods of classes IPv4Interface and IPv6Interface had issue
of generating constant hash values of 32 and 128 respectively causing hash collisions.
The fix uses the hash() function to generate hash values for the objects
instead of XOR operation
2020-06-29 13:39:29 -04:00
Stefan Krah a3ad95dd21
Update libmpdec license dates (GH-21216) 2020-06-29 14:03:01 +02:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 7f569c9bc0
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) 2020-06-29 11:36:48 +03:00
Inada Naoki e4f1fe6edb
bpo-41123: Remove PyLong_FromUnicode() (GH-21204) 2020-06-29 13:00:43 +09:00
Inada Naoki d9f2a13106
bpo-41123: Remove PyUnicode_GetMax() (GH-21192) 2020-06-29 10:46:51 +09:00
Stefan Krah 8bea91b5e9
bpo-40874 Update the required libmpdec version for the decimal module (GH-21202) 2020-06-28 22:01:01 +02:00
Serhiy Storchaka 04cdeb7a56
bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)
Fix also a resource warning when store counts and module info.
2020-06-28 13:34:22 +03:00
Zackery Spytz cd3c2bdd5d
bpo-31082: Use "iterable" in the docstring for functools.reduce() (GH-20796) 2020-06-28 15:40:54 +09:00
E-Paine 8ab77c6f9f
bpo-41144: Fix IDLE open module error (#21182)
Could not open os.path.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-06-28 02:02:47 -04:00
Batuhan Taskaya 8df1016e2e
bpo-38870: Extend subject of ast.unparse warnings (GH-21053)
- Mention that some compiler optimizations might not roundtrip
exactly (such as constant tuples and frozensets).

- Add a warning about it might raise RecursionError on very
complex expressions due to recursive unparsing aspect of ast.unparse
2020-06-28 02:11:43 +01:00
Pablo Galindo 60eb9f1ab5
bpo-39151: Simplify DFS in the assembler (GH-17733) 2020-06-28 01:55:47 +01:00
Guido van Rossum 9d197c7d48
bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21021) 2020-06-27 17:33:49 -07:00
Lysandros Nikolaou 1f0f4abb11
bpo-41076: Pre-feed the parser with the f-string expression location (GH-21054)
This commit changes the parsing of f-string expressions with the new parser. The parser gets pre-fed with the location of the expression itself (not the f-string, which was what we were doing before). This allows us to completely skip the shifting of the AST nodes after the parsing is completed.
2020-06-28 00:41:48 +01:00
Pablo Galindo 89e82c4a62
Add soft keywords to the documentation (GH-21185) 2020-06-27 20:00:29 +01:00