Commit Graph

116159 Commits

Author SHA1 Message Date
Gregory P. Smith 1d194235e4
gh-89792: Prevent test_tools from copying 1000M of "source" in freeze test (#101837)
Prevent test_tools from copying 1000M of "source"
    
It doesn't need a git repo, just the checkout.  We skip .git metadata, Doc/build, Doc/venv, and `__pycache__` subdirs, that developers often have in their clients to reduce the size of the source tree copy ten-fold.

This should significantly reduce IO and presumably time on buildbots during this long test.
2023-02-11 20:54:28 -08:00
mjoerg 3eb12df8b5
Fix typo in test_fstring.py (#101823) 2023-02-11 21:04:15 +05:30
Kumar Aditya b652d40f1c
GH-101797: allocate `PyExpat_CAPI` capsule on heap (#101798) 2023-02-11 14:07:39 +05:30
busywhitespace 17143e2c30
gh-101390: Fix docs for `imporlib.util.LazyLoader.factory` to properly call it a class method (GH-101391) 2023-02-10 15:29:24 -08:00
Hugo van Kemenade 61f2be0866
Docs: Fix getstatus() -> getcode() typos (#101296) 2023-02-10 20:46:12 +02:00
Erlend E. Aasland 2037ebf81b
Docs: use parameter list for sqlite3.Cursor.execute* (#101782)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-10 18:54:04 +01:00
Steve Dower e1aadedf09
gh-101763: Update bundled copy of libffi to 3.4.4 on Windows (GH-101784) 2023-02-10 16:57:30 +00:00
Irit Katriel 366b949058
gh-101517: make bdb avoid looking up in linecache with lineno=None (#101787) 2023-02-10 16:49:29 +00:00
Erlend E. Aasland 5d15224011
gh-101759: Update Windows installer to SQLite 3.40.1 (#101762) 2023-02-10 17:38:26 +01:00
Erlend E. Aasland 826bf0e695
gh-101277: Finalise isolating itertools (GH-101305)
Add repeat, islice, chain, tee, teedataobject, and batched types to module state.

Automerge-Triggered-By: GH:erlend-aasland
2023-02-10 03:58:14 -08:00
Erlend E. Aasland d40a23c0a1
gh-101759: Update macOS installer to SQLite 3.40.1 (#101761) 2023-02-10 08:25:02 +01:00
abel1502 448c7d154e
Fix some typos in asdl_c.py (GH-101757) 2023-02-09 21:10:46 -06:00
Nikita Sobolev 34c50ceb1e
gh-101747: Fix refleak in new `OrderedDict` repr (GH-101748) 2023-02-09 21:00:58 -06:00
Dong-hee Na 5b946d3719
gh-101430: Update tracemalloc to handle presize properly. (gh-101745) 2023-02-10 08:30:03 +09:00
Partha P. Mukherjee f1f3af7b82
GH-101228: Fix typo in docstring for read method of `_io.TextIOWrapper` class (#101227) 2023-02-09 23:16:40 +05:30
Ikko Eltociear Ashimine 272da55aff
Fix typo in `test_fstring.py` (#101600) 2023-02-09 23:15:58 +05:30
Gregory P. Smith b41c47cd06
gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727)
Fixes CVE-2023-0286 (High) and a couple of Medium security issues.
https://www.openssl.org/news/secadv/20230207.txt
2023-02-09 17:40:51 +00:00
Oleg Iarygin 6d92373f50
gh-101283: Fix 'versionchanged' for the shell=True fallback on Windows in 3.12 (GH-101728) 2023-02-09 17:36:24 +00:00
Steve Dower f23371fbc9
LibFFI build requires x64 Cygwin, and skip the ARM build (GH-101743) 2023-02-09 17:15:19 +00:00
Sergey B Kirpichev cb2411886a
gh-101670: typo fix in PyImport_ExtendInittab() (#101723)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-02-09 18:49:02 +02:00
Mark Shannon ecfd2d37c5
GH-99293: Document that `Py_TPFLAGS_VALID_VERSION_TAG` shouldn't be used. (#GH-101736)
Document that Py_TPFLAGS_VALID_VERSION_TAG shouldn't be used.
2023-02-09 14:05:53 +01:00
Dong-hee Na 1c49e61b9b
no-issue: Add Dong-hee Na as the cjkcodecs codeowner (gh-101731) 2023-02-09 21:01:32 +09:00
Sergey B Kirpichev 45fa12aec8
gh-101678: Merge math_1_to_whatever() and math_1() (#101730)
`math_1_to_whatever()` is no longer useful, since all existing uses of it convert to `float`.
Earlier versions of Python used `math_1_to_whatever` with an integer target; see
gh-16991 for the PR where that use was removed.
2023-02-09 09:40:13 +00:00
Sergey B Kirpichev 58395759b0
gh-101678: refactor the math module to use special functions from c11 (GH-101679)
Shouldn't affect users, hence no news.

Automerge-Triggered-By: GH:mdickinson
2023-02-09 00:40:52 -08:00
Soumendra Ganguly 244d4cd9d2
gh-85984: Remove legacy Lib/pty.py code. (#92365)
Refactored the implementation of pty.fork to use os.login_tty.

A DeprecationWarning is now raised by pty.master_open() and pty.slave_open(). They were
undocumented and deprecated long long ago in the docstring in favor of pty.openpty.

Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-02-08 17:00:17 -08:00
Guido van Rossum 65b7b6bd23
gh-98831: Use opcode metadata for stack_effect() (#101704)
* Write output and metadata in a single run
  This halves the time to run the cases generator
  (most of the time goes into parsing the input).
* Declare or define opcode metadata based on NEED_OPCODE_TABLES
* Use generated metadata for stack_effect()
* compile.o depends on opcode_metadata.h
* Return -1 from _PyOpcode_num_popped/pushed for unknown opcode
2023-02-08 16:23:19 -08:00
Steve Dower 0e0c5d8baa
gh-101283: Version was just released, so should be changed in 3.11.3 (GH-101719) 2023-02-08 23:52:03 +00:00
Steve Dower 20cf32e761
gh-101283: Fix use of unbound variable (GH-101712) 2023-02-08 23:38:56 +00:00
Oleg Iarygin 23751ed826
gh-101283: Improved fallback logic for subprocess with shell=True on Windows (GH-101286) 2023-02-08 22:12:19 +00:00
Erlend E. Aasland de3669ebcb
gh-101277: Port more itertools static types to heap types (#101304)
Add accumulate, compress, count, filterfalse, pairwise, product,
and zip_longest types to module state.
2023-02-08 21:25:42 +01:00
Guido van Rossum 616aec1ff1
gh-98831: Modernize CALL and family (#101508)
Includes a slight improvement to `DECREF_INPUTS()`.
2023-02-08 11:40:10 -08:00
Kumar Aditya d9de079248
GH-101696: invalidate type version tag in `_PyStaticType_Dealloc` (#101697) 2023-02-08 23:32:15 +05:30
Michał Górny 2a8bf25804
gh-100221: Fix creating dirs in `make sharedinstall` (GH-100329)
Fix creating install directories in `make sharedinstall` if they exist already outside `DESTDIR`.  The previous make rules assumed that the directories would be created via a dependency on a rule for `$(DESTSHARED)` that did not fire if the directory did exist outside `$(DESTDIR)`.

While technically `$(DESTDIR)` could be prepended to the rule name, moving the rules for creating directories straight into the `sharedinstall` rule seems to fit the common practices better. Since the rule explicitly checks whether the individual directories exist anyway, there seems to be no reason to rely on make determining that implicitly as well.
2023-02-08 08:50:43 -08:00
Sergey B Kirpichev 35dd55005e
gh-101670: typo fix in PyImport_AppendInittab() (GH-101672) 2023-02-08 07:49:04 -08:00
Michael Droettboom 86ebd5c3fa
gh-101196: Make isdir/isfile/exists faster on Windows (GH-101324)
Co-authored-by: Eryk Sun <eryksun@gmail.com>
2023-02-08 14:34:24 +00:00
David Hewitt 3a88de7a0a
gh-101614: Don't treat python3_d.dll as a Python DLL when checking extension modules for incompatibility (GH-101615) 2023-02-08 14:23:57 +00:00
Nikita Sobolev eb49d32b9a
gh-100933: Improve `check_element` helper in `test_xml_etree` (#100934)
Items checked by this test are always `str` and `dict` instances.
2023-02-08 11:13:43 +01:00
Mark Shannon feec49c407
GH-101578: Normalize the current exception (GH-101607)
* Make sure that the current exception is always normalized.

* Remove redundant type and traceback fields for the current exception.

* Add new API functions: PyErr_GetRaisedException, PyErr_SetRaisedException

* Add new API functions: PyException_GetArgs, PyException_SetArgs
2023-02-08 09:31:12 +00:00
Stanley 027adf42cd
gh-47937: Note that Popen attributes are read-only (#93070)
* Note that Popen attributes aren't meant to be set by users by rewording the text about the attributes.
* Also update some universal_newlines references to mention the modern text parameter name while in the area.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-02-08 00:12:46 -08:00
Guido van Rossum a9f01448a9
gh-98831: Modernize CALL_FUNCTION_EX (#101627)
New generator feature: Move CHECK_EVAL_BREAKER() call to just before DISPATCH().
2023-02-07 20:03:22 -08:00
Nikita Sobolev 790ff6bc6a
gh-101446: Change `repr` of `collections.OrderedDict` (#101661) 2023-02-07 20:01:10 -06:00
Guido van Rossum b2b85b5db9
gh-98831: Modernize FORMAT_VALUE (#101628)
Generator update: support balanced parentheses and brackets in conditions and size expressions.
2023-02-07 17:35:55 -08:00
Guido van Rossum aacbdb0c65
gh-98831: Finish the UNPACK_SEQUENCE family (#101666)
New generator feature: Generate useful glue for output arrays, so you can just write values to the output array (no bounds checking). Rewrote UNPACK_SEQUENCE_TWO_TUPLE to use this, and also UNPACK_SEQUENCE_{TUPLE,LIST}.
2023-02-07 15:44:37 -08:00
penguin_wwy 753fc8a5d6
gh-101632: Add the new RETURN_CONST opcode (#101633) 2023-02-07 22:32:21 +00:00
Thomas Wouters 0d3d5007b1 Merge branch 'main' of https://github.com/python/cpython into main 2023-02-07 23:13:53 +01:00
Thomas Wouters 46f461be56 Post 3.12.0a5 2023-02-07 23:13:10 +01:00
Nikita Sobolev acc2f3b19d
gh-101656: Fix "conversion from Py_ssize_t to int" warning in `_testcapimodule` (#101657) 2023-02-07 22:43:33 +01:00
Irit Katriel dec1ab0387
gh-98831: rewrite UNPACK_EX, UNPACK_SEQUENCE, UNPACK_SEQUENCE_TWO_TUPLE in the instruction definition DSL (#101641) 2023-02-07 20:37:43 +00:00
Oleg Iarygin f87f6e2396
gh-97725: Fix documentation for the default file of `asyncio.Task.print_stack` (#101652) 2023-02-07 23:34:31 +05:30
Zachary Ware 6fd5eb640a
Make use of TESTFN_ASCII in test_fileio (GH-101645)
testBytesOpen requires an ASCII filename, but TESTFN usually isn't ASCII.

Automerge-Triggered-By: GH:zware
2023-02-07 09:22:58 -08:00