Commit graph

110180 commits

Author SHA1 Message Date
Mark Shannon e117c02837
bpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)
* Specialize LOAD_ATTR with  LOAD_ATTR_SLOT and LOAD_ATTR_SPLIT_KEYS

* Move dict-common.h to internal/pycore_dict.h

* Add LOAD_ATTR_WITH_HINT specialized opcode.

* Quicken in function if loopy

* Specialize LOAD_ATTR for module attributes.

* Add specialization stats
2021-06-10 08:46:01 +01:00
Dong-hee Na 309ab61602
bpo-35800: Remove smtpd.MailmanProxy since 3.11 (GH-26617) 2021-06-10 08:12:41 +09:00
Pablo Galindo 457ce60fc7
bpo-44368: Ensure we don't raise incorrect custom syntax errors with soft keywords (GH-26630) 2021-06-09 22:20:01 +01:00
Furkan Onder 878d7e4ee4
bpo-21760: fix __file__ description (GH-19097) 2021-06-09 14:10:20 -07:00
Terry Jan Reedy 275d5f7957
bpo-40468: Split IDLE settings General tab (GH-26621)
Replace it with Windows tab for Shell and Editor options
and Shell/Ed for options exclusive to one of them.

Create room for more options and make dialog shorter,
to better fit small windows.
2021-06-09 16:17:58 -04:00
Eric Snow e6e34e4522
bpo-43693: Do not check co_cell2arg if a non-cell offset. (gh-26626)
This is the same fix as for PyFrame_LocalsToFast() in gh-26609, but applied to PyFrame_FastToLocalsWithError(). (It should have been in that PR.)

https://bugs.python.org/issue43693
2021-06-09 11:40:49 -06:00
Ethan Furman eea8148b7d
bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586)
Move the check for missing named flags in flag aliases from Flag creation
to a new *verify* decorator.
2021-06-09 09:03:55 -07:00
Mark Shannon 6f84656dc1
Delete line that was accidentally copied. (GH-26624) 2021-06-09 15:55:35 +01:00
Akira Nonaka aef1b58dc8
bpo-44345: Fix 'generated by' comment in parser.c (GH-26615) 2021-06-09 16:38:53 +02:00
Terry Jan Reedy 5571cabf1b
bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618) 2021-06-08 21:43:49 -04:00
Pablo Galindo 9fd21f649d
bpo-44349: Fix edge case when displaying text from files with encoding in syntax errors (GH-26611) 2021-06-09 00:54:29 +01:00
Serhiy Storchaka 2ea6d89028
bpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)
Emit a deprecation warning if the numeric literal is immediately followed by
one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
more informative message if it is immediately followed by other keyword or
identifier.

Automerge-Triggered-By: GH:pablogsal
2021-06-08 16:31:10 -07:00
Eric Snow 3e1c7167d8
bpo-43693: Un-revert commit f3fa63e. (#26609)
This was reverted in GH-26596 (commit 6d518bb) due to some bad memory accesses.

* Add the MAKE_CELL opcode. (gh-26396)

The memory accesses have been fixed.

https://bugs.python.org/issue43693
2021-06-08 16:01:34 -06:00
Terry Jan Reedy ab36b9f834
bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)
These are the settings that extend the help menu.  Moving them shortens the dialog and will help with it being too tall for small screens.
2021-06-08 15:35:10 -04:00
Pablo Galindo bafe0aade5
bpo-44335: Ensure the tokenizer doesn't go into Python with the error set (GH-26608) 2021-06-08 20:02:03 +01:00
Batuhan Taskaya 8004c4570b
bpo-11105: document the new test.support.infinite_recursion context manager (GH-26604) 2021-06-08 20:39:03 +03:00
Batuhan Taskaya e58d762c1f
bpo-11105: reduce the recursion limit for tests (GH-26550) 2021-06-08 19:55:10 +03:00
Petr Viktorin 257e400a19
bpo-43795: Note Stable ABI PEP in What's New (GH-26479)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-06-08 17:20:07 +02:00
Erlend Egeberg Aasland 1c02655fb0
bpo-44329: Refactor sqlite3 statement creation (GH-26566)
Call SQLite API's first, and return early in case of error. At the end,
allocate the object and initialise members. We now avoid unneeded
alloc/dealloc's in case the statement creation fails.
2021-06-08 16:00:56 +01:00
Pablo Galindo 3fe921cd49
Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)" (GH-26597)
This reverts commit 631f9938b1.
2021-06-08 13:17:55 +01:00
Pablo Galindo 781dc76577
Fix compiler errors for unused variables (GH-26601) 2021-06-08 13:16:24 +01:00
Pablo Galindo d334c73b56
bpo-44335: Fix a regression when identifying invalid characters in syntax errors (GH-26589) 2021-06-08 12:25:22 +01:00
Pablo Galindo 6d518bb3a1
bpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function (GH-26493)" (GH-26596)
This reverts commit f3fa63ec75 as is
causing crashes in some Windows tests in the buildbots.
2021-06-08 12:24:40 +01:00
Machinexa2 d56e700d6c
Use from imports (GH-26594)
from imports
2021-06-08 06:47:15 -03:00
Julien Palard 227a09325e
bpo-42238: Doc CI: Disable suspicious checks. (GH-26575)
They are slow and raise too many false positive, I'm in the slow
process to try to change this.
2021-06-08 09:22:58 +02:00
Ned Batchelder ffd87b7093
fix: use unambiguous punction in 'invalid escape sequence' message (GH-26582) 2021-06-08 01:15:46 +01:00
Eric Snow 165c884154
bpo-43693: Silence some compiler warnings. (gh-26588)
The plan is to eventually make PyCodeObject opaque in the public C-API, with the full struct moved to Include/internal/pycore_code.h. _PyLocalsPlusKinds and _PyLocalsPlusKind started off there but were needed on PyCodeObject, hence the duplication. This led to warnings with some compilers. (Apparently it does not trigger a warning on my install of GCC.)

This change eliminates the superfluous typedef.

https://bugs.python.org/issue43693
2021-06-07 17:58:38 -06:00
Eric Snow 631f9938b1
bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)
This moves logic out of the frame initialization code and into the compiler and eval loop.  Doing so simplifies the runtime code and allows us to optimize it better.

https://bugs.python.org/issue43693
2021-06-07 16:52:00 -06:00
Terry Jan Reedy e915db3e9e
Use absolute imports in IDLE tests (GH-26581)
Relative imports do not work when running test_x as main.
2021-06-07 17:56:34 -04:00
Ryan Hileman 449e6f0ef3
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision time source (GH-26568) 2021-06-07 21:26:02 +01:00
Eric Snow 2ab27c4af4
bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)
These were reverted in gh-26530 (commit 17c4edc) due to refleaks.

* 2c1e258 - Compute deref offsets in compiler (gh-25152)
* b2bf2bc - Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)

This change fixes the refleaks.

https://bugs.python.org/issue43693
2021-06-07 12:22:26 -06:00
Mark Shannon 001eb520b5
bpo-44187: Quickening infrastructure (GH-26264)
* Add co_firstinstr field to code object.

* Implement barebones quickening.

* Use non-quickened bytecode when tracing.

* Add NEWS item

* Add new file to Windows build.

* Don't specialize instructions with EXTENDED_ARG.
2021-06-07 18:38:06 +01:00
Sergey B Kirpichev 89e50ab36f
bpo-44258: support PEP 515 for Fraction's initialization from string (GH-26422)
* bpo-44258: support PEP 515 for Fraction's initialization from string

* regexps's version

* A different regexps version, which doesn't suffer from catastrophic backtracking

* revert denom -> den

* strip "_" from the decimal str, add few tests

* drop redundant tests

* Add versionchanged & whatsnew entry

* Amend Fraction constructor docs

* Change .. versionchanged:...
2021-06-07 08:06:33 +01:00
wim glenn afb2eed72b
bpo-37449: ensurepip uses importlib.resources.files() traversable APIs (#22659)
* `ensurepip` now uses `importlib.resources.files()` traversable APIs

* Update Lib/ensurepip/__init__.py

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* Update Misc/NEWS.d/next/Library/2020-10-11-20-23-48.bpo-37449.f-t3V6.rst

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-06-06 22:14:47 -04:00
Terry Jan Reedy 67dfa6f2a5
bpo-44322: Document more SyntaxError details. (GH-26562)
1. SyntaxError args have a tuple of other attributes.
2. Attributes are adjusted for errors in f-string field expressions.
3. Compile() can raise SyntaxErrors.
2021-06-06 21:42:31 -04:00
Erlend Egeberg Aasland 0d12f24552
bpo-44326: Remove unused members from pysqlite_Statement (GH-26564)
* Remove unused db member of pysqlite_Statement

* Remove unused sql method from statement object
2021-06-06 23:12:07 +01:00
Erlend Egeberg Aasland 505624e917
bpo-44327: Remove unused members from pysqlite_Connection (GH-26565)
* Remove timeout_started

* Remove timeout member
2021-06-06 23:11:44 +01:00
hrchu 18e9edb7b3
Update bisect docstrings (GH-26548) 2021-06-06 11:22:48 -07:00
NAKAMURA Osamu 71be461704
bpo-44320: Fix markup for W3C C14N test suite (GH-26556) 2021-06-06 11:34:10 +09:00
Pablo Galindo 6e3b7cf3af
bpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held (GH-26551) 2021-06-05 23:41:11 +01:00
Pablo Galindo fa106a685c
bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects (GH-26545) 2021-06-05 03:50:39 +01:00
Pablo Galindo f171877ebe
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH-26542) 2021-06-05 00:33:20 +01:00
Raymond Hettinger 3668e118f7
Update nonstandard variable names (GH-26540) 2021-06-04 16:28:31 -07:00
Irit Katriel dda9ecbfec
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) 2021-06-04 23:07:57 +01:00
Kazantcev Andrey 2780df4781
Align comment for better readability. (GH-26192) 2021-06-04 18:41:23 -03:00
Erlend Egeberg Aasland 7459208de1
bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535) 2021-06-04 21:42:20 +01:00
Erlend Egeberg Aasland 006fd869e4
bpo-43853: Handle sqlite3_value_text() errors (GH-25422) 2021-06-04 19:34:00 +01:00
Erlend Egeberg Aasland 8363ac8607
bpo-44041: Add test for sqlite3 column count (GH-25907) 2021-06-04 18:36:08 +01:00
Pablo Galindo 17c4edc4e0
bpo-43693: Revert commits 2c1e2583fd and b2bf2bc1ec (GH-26530)
* Revert "bpo-43693: Compute deref offsets in compiler (gh-25152)"

This reverts commit b2bf2bc1ec.

* Revert "bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)"

This reverts commit 2c1e2583fd.

These two commits are breaking the refleak buildbots.
2021-06-04 17:51:05 +01:00
stratakis a46c220edc
bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)
test_disallow_instantiation and test_readonly_types try to test all the available
digests, however under FIPS mode, while the algorithms are available, trying to use
them will fail with a ValueError.
2021-06-04 17:47:59 +01:00