Commit Graph

111004 Commits

Author SHA1 Message Date
Pablo Galindo Salgado 764e6823a7
bpo-45204: Reduce verbosity of test_peg_generator (GH-28360) 2021-09-15 20:16:51 +02:00
Steve Dower 09b4ad11f3
bpo-45188: Windows now regenerates frozen modules at the start of build instead of late (GH-28322)
This will enable us to drop the frozen module header files from the repository.

It does currently cause many source files to be built twice, which just takes more time. For whoever comes to fix this in the future, the files shared between freeze_module and pythoncore should be put into a static library that is consumed by both.
2021-09-15 18:11:12 +01:00
Nikita Sobolev d897579a80
bpo-45185: enables `TestEnumerations` in `test_ssl` (GH-28330) 2021-09-15 19:57:03 +03:00
Eric Snow cbeb819710
bpo-45020: Freeze some of the modules imported during startup. (gh-28335)
Doing this provides significant performance gains for runtime startup (~15% with all the imported modules frozen). We don't yet freeze all the imported modules because there are a few hiccups in the build systems we need to sort out first. (See bpo-45186 and bpo-45188.)

Note that in PR GH-28320 we added a command-line flag (-X frozen_modules=[on|off]) that allows users to opt out of (or into) using frozen modules. The default is still "off" but we will change it to "on" as soon as we can do it in a way that does not cause contributors pain.

https://bugs.python.org/issue45020
2021-09-15 10:19:30 -06:00
Serhiy Storchaka 1a9ef57985
bpo-44786: Fix a warning in RE in c-analyzer (GH-28351) 2021-09-15 17:08:48 +03:00
Mark Shannon 11cdf2a670
bpo-45203: Cleanup stats gathering code for LOAD_METHOD (GH-28352) 2021-09-15 14:55:49 +01:00
Victor Stinner b49263b698
bpo-21302: Add _PyTime_AsNanoseconds() (GH-28350)
Refactor pytime.c:

* Add pytime_from_nanoseconds() and pytime_as_nanoseconds(),
  and use explicitly these functions
* Add two empty lines between functions
* PEP 7: add braces { ... }
* C99: declare variables where they are set
* Rename private functions to lowercase
* Rename error_time_t_overflow() to pytime_time_t_overflow()
* Rename win_perf_counter_frequency() to py_win_perf_counter_frequency()
* py_get_monotonic_clock(): add an assertion to detect overflow when
  mach_absolute_time() unsigned uint64_t is casted to _PyTime_t
  (signed int64_t).

_testcapi: use _PyTime_FromNanoseconds().
2021-09-15 14:26:43 +02:00
Irit Katriel 40d2ac92f9
bpo-45152: refactor the dis module to make handling of hasconst opcodes more generic (GH-28258) 2021-09-15 10:14:15 +01:00
Terry Jan Reedy 1afc7b3219
bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
The line that should not have been needed on macOS tk 8.6.8 but was,
should not be a problem on Ubuntu, but is.  It is not needed on macOS
tk 8.6.11, installed with 3.10.  Disable it but leave it for
now in case some system needs it.
2021-09-15 03:13:23 -04:00
Terry Jan Reedy 369bf949cc
bpo-45020: Don't test IDLE with frozen module. (GH-28344)
Otherwise, test would need special import.
2021-09-15 03:08:44 -04:00
Eric Snow a65c86889e
bpo-45020: Add -X frozen_modules=[on|off] to explicitly control use of frozen modules. (gh-28320)
Currently we freeze several modules into the runtime. For each of these modules it is essential to bootstrapping the runtime that they be frozen. Any other stdlib module that we later freeze into the runtime is not essential. We can just as well import from the .py file.  This PR lets users explicitly choose which should be used, with the new "-X frozen_modules=[on|off]" CLI flag. The default is "off" for now.

https://bugs.python.org/issue45020
2021-09-14 17:31:45 -06:00
Pablo Galindo Salgado 1aaa859497
bpo-4356: Mention the new key arguments for the bisect module APIs in the 3.10 What's new (GH-28339) 2021-09-14 20:53:14 +01:00
junyixie b668cdfa09
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331) 2021-09-14 11:31:50 -07:00
Benjamin Peterson 024fda47d4
closes bpo-45190: Update Unicode data to version 14.0.0. (GH-28336) 2021-09-14 11:00:38 -07:00
Victor Stinner 797c8eb9ef
bpo-45195: Fix test_readline.test_nonascii() (GH-28329)
Fix test_readline.test_nonascii(): sometimes, the newline character
is not written at the end, so don't expect it in the output.
2021-09-14 17:38:04 +02:00
Nikita Sobolev 7f60c9e1c6
bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300)
Fixes infinite loop on unittest.mock.seal() of mocks created by
unittest.create_autospec().

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2021-09-14 12:20:40 +02:00
Irit Katriel c99fc4e53a
bpo-45168: change dis output to omit missing values rather than replacing them by their index (GH-28313) 2021-09-14 10:09:05 +01:00
Irit Katriel c2f1e95337
bpo-45152: Add HAS_CONST macro and get_const_value() function and use… (#28262) 2021-09-14 09:53:32 +01:00
Hugo van Kemenade 9f93018b69
bpo-42135 Correct version slated for importlib.find_loader removal (GH-28312)
importlib.find_loader should also be slated for 3.12 like the others in GH-25169 and as documented in https://docs.python.org/3.11/whatsnew/3.10.html#deprecated.
2021-09-13 15:57:50 -07:00
Eric Snow a2d8c4b81b
bpo-45019: Do some cleanup related to frozen modules. (gh-28319)
There are a few things I missed in gh-27980. This is a follow-up that will make subsequent PRs cleaner. It includes fixes to tests and tools that reference the frozen modules.

https://bugs.python.org/issue45019
2021-09-13 16:18:37 -06:00
Hugo van Kemenade 1fc41ae870
bpo-45173 Remove configparser deprecations (GH-28292)
In the configparser module, these have been deprecated since Python 3.2:

* the SafeConfigParser class,
* the filename property of the ParsingError class,
* the readfp method of the ConfigParser class,
2021-09-13 19:12:36 +02:00
Victor Stinner 85dc53a463
bpo-21302: Update time.sleep() doc for clock_nanosleep() (GH-28311)
Clean-up also What's New in Python 3.11 doc: move entries to the
correct sections.
2021-09-13 17:40:25 +02:00
Livius 85a4748118
bpo-21302: Add clock_nanosleep() implementation for time.sleep() (GH-28111)
In Unix operating systems, time.sleep() now uses the clock_nanosleep() function,
if available, which allows to sleep for an interval specified with nanosecond precision.

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-13 14:37:38 +02:00
Serhiy Storchaka 3e19409d64
bpo-45181: Simplify loading sqlite3 tests (GH-28304)
Use unittest discover instead of manually enumerating all
test modules and classes.
Also add support for filtering them by pattern.
2021-09-13 14:16:26 +03:00
Serhiy Storchaka 9260e67398
bpo-45182: Fix incorrect use of requires_zlib in test_bdist_rpm (GH-28305)
It is a decorator factory and should be always followed by "()".
2021-09-13 14:10:16 +03:00
Serhiy Storchaka 851811f577
bpo-5846: Do not use obsolete unittest functions. (GH-28303)
Get rid of use of makeSuite() and findTestCases().
Also make test_math and test_threading_local discoverable.
2021-09-13 10:49:53 +03:00
Erlend Egeberg Aasland c78d5ca380
bpo-45126: Fix ref. leak in `sqlite3.Connection.__init__` (GH-28231) 2021-09-12 21:27:42 +09:00
Serhiy Storchaka 92bf8691fb
bpo-43413: Fix handling keyword arguments in subclasses of some buitin classes (GH-26456)
* Constructors of subclasses of some buitin classes (e.g. tuple, list,
  frozenset) no longer accept arbitrary keyword arguments.
* Subclass of set can now define a __new__() method with additional
  keyword parameters without overriding also __init__().
2021-09-12 13:27:50 +03:00
Dong-hee Na 5277ffe12d
bpo-44987: Fix typo whatsnew 3.11 (GH-28293) 2021-09-12 04:05:55 +09:00
Dong-hee Na 9abd07e596
bpo-44987: Speed up unicode normalization of ASCII strings (GH-28283) 2021-09-11 18:04:38 +03:00
Serhiy Storchaka 97ea18eced
bpo-35474: Fix mimetypes.guess_all_extensions() potentially mutating list (GH-28286)
* Calling guess_all_extensions() with strict=False potentially
  mutated types_map_inv.
* Mutating the result of guess_all_extensions() mutated types_map_inv.
2021-09-11 17:44:44 +03:00
David CARLIER 5f5b7d0c65
bpo-45163: Haiku build fix. (GH-28269)
linkage issues mainly for shared libs and missing system library,
also little nit into the signal extension as strsignal returns
a constant in this platform.
2021-09-11 11:46:22 +03:00
giovanniwijaya b74c819fab
IDLE: adjust Python version in doc url for 3.10+ (GH-28228)
Expression 'python_version()[:3]' truncated '3.10.0' to '3.1' instead of '3.10'.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-09-10 17:10:28 -04:00
Irit Katriel f8d624d6a5
bpo-45144: use subTests in test_peepholer (GH-28247) 2021-09-10 18:29:21 +02:00
Irit Katriel e86bcfa580
bpo-9811: [doc] strftime handling of unsupported format specifiers is platform dependent (GH-28264) 2021-09-10 18:26:57 +02:00
Serhiy Storchaka f0f29f328d
bpo-25894: Always report skipped and failed subtests separately (GH-28082)
* In default mode output separate characters for skipped and failed subtests.
* In verbose mode output separate lines (including description) for skipped
   and failed subtests.
* In verbose mode output test description for errors in test cleanup.
2021-09-10 17:55:05 +02:00
Pablo Galindo Salgado ab327f2929
bpo-44964: Correct the note about the f_lasti field (GH-28208) 2021-09-10 17:53:42 +02:00
Łukasz Langa 296b710070
bpo-44219: Mention GH-28250 is a deadlock bugfix (GH-28261) 2021-09-10 17:51:43 +02:00
Ikko Ashimine 4338aeeb9e
Fix typos in pep384_macrocheck.py (GH-28220)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-09-10 22:44:03 +08:00
Serhiy Storchaka 17a1b3e63a
bpo-45132: Fix the reStructuredText markup error. (GH-28270) 2021-09-10 15:40:07 +03:00
Henry-Joseph Audéoud 707137b863
bpo-40563: Support pathlike objects on dbm/shelve (GH-21849)
Co-authored-by: Hakan Çelik <hakancelik96@outlook.com>
2021-09-10 15:26:16 +03:00
Raymond Hettinger 62fa613f6a
bpo-45024 and bpo-23864: Document how interface testing works with the collections ABCs (GH-28218) 2021-09-09 21:51:07 -05:00
Senthil Kumaran 794430700d
bpo-45067 - Verify the version of ncurses for extended color support feature usage. (GH-28260)
* issue45067 - Fix _curses compilation in CentOS 7. Verify the version of ncurses
for extended color support feature usage.

The function extended_color_content was introduced in 2017.  The ncurses-devel
package in CentOS 7 had a older version ncurses resulted in compilation error.
For compiling ncurses with extended color support, we verify the version of the
ncurses library.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-09 11:32:11 -07:00
D.Lintin 7366854135
Fix minor typo in 3.10.rst (GH-28253) 2021-09-09 12:02:01 -04:00
Vincent Michel 06148b1870
bpo-44219: Release the GIL during isatty syscalls (GH-28250)
Release the GIL while performing isatty() system calls on arbitrary
file descriptors. In particular, this affects os.isatty(),
os.device_encoding() and io.TextIOWrapper. By extension,
io.open() in text mode is also affected.
2021-09-09 15:12:03 +02:00
Irit Katriel 04676b6946
bpo-45017: move opcode-related logic from modulefinder to dis (GH-28246) 2021-09-09 14:04:12 +01:00
Victor Stinner 49acac00c0
bpo-44860: Update test_sysconfig for posix_user platlib (GH-28235)
Update test_sysconfig.test_user_similar() for the posix_user scheme:
"platlib" doesn't use sys.platlibdir.
2021-09-09 11:02:48 +02:00
andrei kulakov b7bb54fc10
Specify default order in memoryview.tobytes() docs (GH-27936) 2021-09-09 11:30:56 +03:00
Jean-Abou-Samra 5afb570d2e
Fix small mistake in fileinput documentation (GH-28241) 2021-09-09 11:01:10 +03:00
Raymond Hettinger 4a5cccb02b
bpo-20499: Rounding error in statistics.pvariance (GH-28230) 2021-09-08 22:00:12 -05:00