Commit Graph

2914 Commits

Author SHA1 Message Date
Miss Islington (bot) cbfcc67170
bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497) (GH-23704)
(cherry picked from commit 37440eef7f)
2020-12-08 11:52:58 -08:00
Terry Jan Reedy b947b305a6
[3.8] bpo-41910: move news entry (GH-23698) 2020-12-08 13:00:03 -05:00
Victor Stinner b5cf308de8
bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642) (GH-23692) (GH-23696)
Fix encoding name when running a ".pyc" file on Windows:
PyRun_SimpleFileExFlags() now uses the correct encoding to decode the
filename.

* Add pyrun_file() subfunction.
* Add pyrun_simple_file() subfunction.
* PyRun_SimpleFileExFlags() now calls _Py_fopen_obj() rather than
  _Py_fopen().

(cherry picked from commit b6d98c10ff)
(cherry picked from commit f0e42ae03c)
2020-12-08 17:42:31 +01:00
Łukasz Langa f01ec28949 Python 3.8.7rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl/OOOAACgkQsmmV4xAl
 BWh8nQ//dAtAJguTePQnppw/R4oGRJm40vjqkRAJhsGWYHJhkkZ8kl47ZelxXzFl
 +m3zPsa/6h/0ds4rvc3y8jJ4rXfLMmIFlPsw4bsm5Jr9d2tdWYqedJbEdcYRx/TX
 8mX6KLVgYtGBR1kxau2c58aI6fX3dgltSLJLT7VZSRIMTuRxXYekbfVFDVOi0PeC
 UXbgnHzrpG+Joh2tGMbXWNJQap7KGEI+KX64DZ+IA8PLxpIsyrNFfcRYIuXFg9TX
 DJLFDcCreHkUOJpxidC6l4n8kdf9RjKB6K4g5YbSoN6yEO1mtlbDgHlCOgRoWPJ7
 OmefmtxQ1yqV/NWf38ypheMy5i+ZkoMlfrKl/RIneiKsqNIFUvrPzvVaoaHD5o3r
 lxIY/bAr9CIHFCKyBD4nSINJ5ZaLBk/o0nx6lOl4P84gyJE+PiECIHRSODblHtNg
 bYf8LMQ0xB/VI6v4EjVDygH6wQl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 =G9Dw
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.7rc1' into 3.8

Python 3.8.7rc1
2020-12-08 03:06:56 +01:00
Miss Islington (bot) 699e5e4489
bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) (GH-23672)
(cherry picked from commit c266736ec1)
2020-12-07 15:50:14 -08:00
Brandt Bucher 7c79798238
bpo-42536: GC track recycled tuples (GH-23623) (GH-23652)
Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:

- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip

Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012d1c)
2020-12-07 20:08:24 +00:00
Miss Islington (bot) ca52aa3ddd
bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match distutils (GH-22088)
(cherry picked from commit c0afb7fa0e)

Co-authored-by: Matti Picus <matti.picus@gmail.com>
2020-12-07 09:50:48 -08:00
Łukasz Langa e3201094af
Python 3.8.7rc1 2020-12-07 15:13:36 +01:00
Miss Islington (bot) a4e7d5f750
bpo-17735: inspect.findsource now raises OSError when co_lineno is out of range (GH-23633)
This can happen when a file was edited after it was imported.
(cherry picked from commit 2e0760bb2e)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-04 13:44:53 -08:00
Miss Islington (bot) 3b14f18205
bpo-42116: Fix inspect.getsource handling of trailing comments (GH-23630)
(cherry picked from commit 6e1eec71f5)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-12-04 12:20:09 -08:00
Miss Islington (bot) 8e8f82dd94
bpo-41473: Reenable test_gdb on gdb 9.2 and newer (GH-23637)
https://bugzilla.redhat.com/show_bug.cgi?id=1866884 is fixed in gdb
10.1 (failed to reproduce on gdb-10.1-1.fc34.aarch64).
(cherry picked from commit 066394018a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-04 07:41:02 -08:00
Miss Islington (bot) 930d5377c5
bpo-42553: Fix test_asyncio.test_call_later() (GH-23627)
Fix test_asyncio.test_call_later() race condition: don't measure
asyncio performance in the call_later() unit test. The test failed
randomly on the CI.
(cherry picked from commit 7e5e13d113)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-12-03 05:15:28 -08:00
Miss Islington (bot) 1cc5c943c0
bpo-42482: remove reference to exc_traceback from TracebackException (GH-23531)
(cherry picked from commit 427613f005)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-11-30 17:53:40 -08:00
Miss Islington (bot) b1c48e5136
bpo-42406: Fix whichmodule() with multiprocessing (GH-23403)
* bpo-42406: Fix whichmodule() with multiprocessing

Signed-off-by: Renato L. de F. Cunha <renatoc@br.ibm.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 86684319d3)

Co-authored-by: Renato Cunha <renatocunha@acm.org>
2020-11-29 10:43:36 -08:00
Miss Islington (bot) 4498e98a6b
bpo-34215: Clarify IncompleteReadError message when "expected" is None (GH-21925) (#23540)
Co-Authored-By: Tyler Bell <mrbell321@gmail.com>
(cherry picked from commit 8085f742f4)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-11-28 16:44:34 +02:00
Miss Islington (bot) bda2e68c88
bpo-12800: tarfile: Restore fix from 011525ee9 (GH-21409)
Restore fix from 011525ee92.
(cherry picked from commit 4fedd7123e)

Co-authored-by: Julien Palard <julien@palard.fr>
2020-11-25 02:01:01 -08:00
Miss Islington (bot) ad49526c80
bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300)
The function accepts now the representation of the default state as
empty sequence (as returned by Style.map()).
The structure of the result is now the same on all platform
and does not depend on the value of wantobjects.
(cherry picked from commit dd844a2916)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-23 00:51:22 -08:00
Miss Islington (bot) 28b40d7a34
bpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447)
(cherry picked from commit 453bc1da20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-21 21:24:11 -08:00
Miss Islington (bot) 6e665424d6
bpo-38443: Check that the specified universal architectures work (GH-22910)
As [bpo-38443]() says the error message from configure when specifying --enable-universalsdk with a set of architectures that is not supported by the compiler is not very helpful.   This PR explicitly checks if the compiler works and bails out if it doesn't.
(cherry picked from commit 0f20bd9042)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-11-21 17:54:08 -08:00
Miss Islington (bot) 97136d71a7
bpo-40791: Make compare_digest more constant-time. (GH-20444)
* bpo-40791: Make compare_digest more constant-time.

The existing volatile `left`/`right` pointers guarantee that the reads will all occur, but does not guarantee that they will be _used_. So a compiler can still short-circuit the loop, saving e.g. the overhead of doing the xors and especially the overhead of the data dependency between `result` and the reads. That would change performance depending on where the first unequal byte occurs. This change removes that optimization.

(This is change GH-1 from https://bugs.python.org/issue40791 .)
(cherry picked from commit 31729366e2)

Co-authored-by: Devin Jeanpierre <jeanpierreda@google.com>
2020-11-21 01:12:21 -08:00
Miss Islington (bot) c076d48805
bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)
Inspect.getdoc(ob) sometimes gets docstrings when ob.__doc__ is None.
(cherry picked from commit 7ddbaa7a1b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-11-19 23:22:29 -08:00
Miss Islington (bot) 66dd5338a1
bpo-42398: Fix "make regen-all" race condition (GH-23362) (GH-23367)
Fix a race condition in "make regen-all" when make -jN option is used
to run jobs in parallel. The clinic.py script now only use atomic
write to write files. Moveover, generated files are now left
unchanged if the content does not change, to not change the file
modification time.

The "make regen-all" command runs "make clinic" and "make
regen-importlib" targets:

* "make regen-importlib" builds object files (ex: Modules/_weakref.o)
  from source files (ex: Modules/_weakref.c) and clinic files (ex:
  Modules/clinic/_weakref.c.h)
* "make clinic" always rewrites all clinic files
  (ex: Modules/clinic/_weakref.c.h)

Since there is no dependency between "clinic" and "regen-importlib"
Makefile targets, these two targets can be run in parallel. Moreover,
half of clinic.py file writes are not atomic and so there is a race
condition when "make regen-all" runs jobs in parallel using make -jN
option (which can be passed in MAKEFLAGS environment variable).

Fix clinic.py to make all file writes atomic:

* Add write_file() function to ensure that all file writes are
  atomic: write into a temporary file and then use os.replace().
* Moreover, write_file() doesn't recreate or modify the file if the
  content does not change to avoid modifying the file modification
  file.
* Update test_clinic to verify these assertions with a functional
  test.
* Remove Clinic.force attribute which was no longer used, whereas
  Clinic.verify remains useful.

(cherry picked from commit 8fba9523cf)
(cherry picked from commit c53c3f4000)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-11-18 08:28:57 -08:00
Miss Islington (bot) 73e02ff0d4
bpo-41561: skip test_min_max_version_mismatch (GH-22308)
skip test_min_max_version_mismatch when TLS 1.0 is not available

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit ce04e7105b)

Co-authored-by: Christian Heimes <christian@python.org>
2020-11-18 04:29:34 -08:00
Victor Stinner a702bd4b92
bpo-41686: Always create the SIGINT event on Windows (GH-23344) (GH-23347) (GH-23349)
bpo-41686, bpo-41713: On Windows, the SIGINT event,
_PyOS_SigintEvent(), is now created even if Python is configured to
not install signal handlers (PyConfig.install_signal_handlers=0 or
Py_InitializeEx(0)).

(cherry picked from commit 05a5d697f4)
2020-11-17 22:23:18 +01:00
Miss Islington (bot) 4f54ca0734
bpo-42120: Remove macro defining copysign to _copysign on Windows (GH-23326)
(cherry picked from commit 9cc9e27725)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-11-16 15:42:49 -08:00
Miss Islington (bot) 85a8a19134
bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297)
The University of Washington stopped hosting the IMAP documents. Link to a rescued copy on GitHub.
(cherry picked from commit aa01011003)

Co-authored-by: Yash Shete <universeyash4@gmail.com>
2020-11-15 21:12:34 -08:00
Miss Islington (bot) 8a4557240b
bpo-40754: Adds _testinternalcapi to Windows installer for test suite (GH-23271)
(cherry picked from commit 9b6934230c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-11-13 14:42:10 -08:00
Jakub Stasiak f37628eb71
[3.8] bpo-42237: Fix os.sendfile() on illumos (GH-23154). (GH-23246)
(cherry picked from commit fd4ed57674)

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2020-11-12 14:23:48 +02:00
Miss Islington (bot) c745b36ee3
bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585)
The onerror is supposed to be called with failed function, but in this case lstat is wrongly used instead of open.

Not sure if this needs bug or not...

Automerge-Triggered-By: GH:hynek
(cherry picked from commit e59b2deffd)

Co-authored-by: Michal Čihař <michal@cihar.com>
2020-11-10 08:27:02 -08:00
Miss Islington (bot) 109c17315a
bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() (GH-23020)
The overflow occurs under some circumstances when a task or future
recursively returns itself.

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 42d873c63a)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2020-11-10 06:21:53 -08:00
Miss Islington (bot) db087f6d9e
bpo-41754: Ignore NotADirectoryError in invocation of xdg-settings (GH-23075) (GH-23198)
It is not clear why this can happen, but several users have mentioned
getting this exception on macOS.
(cherry picked from commit 23831a7a90)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-11-08 13:06:17 +01:00
Jakub Kulík a12f459ec2
[3.8] bpo-35455: Fix thread_time for Solaris OS (GH-11118). (GH-23145)
(cherry picked from commit 9568622c99)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2020-11-04 14:19:17 +00:00
Miss Skeleton (bot) ac70175fc0
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
(cherry picked from commit 212d32f45c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-03 07:01:56 -08:00
Serhiy Storchaka 547d2bcc55
[3.8] bpo-42103: Improve validation of Plist files. (GH-22882) (GH-23116)
* Prevent some possible DoS attacks via providing invalid Plist files
  with extremely large number of objects or collection sizes.
* Raise InvalidFileException for too large bytes and string size instead of returning garbage.
* Raise InvalidFileException instead of ValueError for specific invalid datetime (NaN).
* Raise InvalidFileException instead of TypeError for non-hashable dict keys.
* Add more tests for invalid Plist files.

(cherry picked from commit 34637a0ce2)
2020-11-03 09:32:15 +02:00
Miss Skeleton (bot) 1341582e16
bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
They were occurring with both repeated 'force-calltip' invocations and by typing parentheses
 in expressions, strings, and comments in the argument code.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit da7bb7b4d7)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2020-11-01 20:49:59 -08:00
Miss Skeleton (bot) 39a56e5523
[3.8] bpo-29566: binhex.binhex now consitently writes MacOS 9 line endings. (GH-23059) (GH-23070)
[[bpo-29566]()]() notes that binhex.binhex uses inconsistent line endings (both Unix and MacOS9 line endings are used). This PR changes this to use the MacOS9 line endings everywhere.
(cherry picked from commit 2165cea548)


Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>

Automerge-Triggered-By: GH:ronaldoussoren
2020-11-01 01:39:16 -08:00
Miss Skeleton (bot) 9ede1b071b
bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creating the func object (GH-22953)
func_dealloc() does not handle partially-created objects. Best not to give it any.
(cherry picked from commit 350526105f)

Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
2020-10-29 03:24:12 -07:00
Miss Skeleton (bot) a053a7ecfe
bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)
* When the parameters argument is a list, correctly handle the case
  of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
  override an exception raised in ``__len__()``.
(cherry picked from commit 0b419b7910)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-26 14:46:10 +09:00
Zackery Spytz f6255a2ccb
bpo-39871: Fix an error in a news entry (GH-21749)
(cherry picked from commit 5463635580)
2020-10-26 14:37:16 +09:00
Miss Skeleton (bot) 8485d3b911
bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
(cherry picked from commit 5df6c99cb4)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2020-10-24 20:41:26 -07:00
Miss Skeleton (bot) 8b4842b7a8
[3.8] bpo-40592: shutil.which will not return None anymore if ; is the last char in PATHEXT (GH-20088) (GH-22913)
shutil.which will not return None anymore for empty str in PATHEXT
Empty PATHEXT will now be defaulted to _WIN_DEFAULT_PATHEXT
(cherry picked from commit da6f098188)


Co-authored-by: Christopher Marchfelder <marchfelder@googlemail.com>
2020-10-23 14:37:58 -07:00
Miss Skeleton (bot) b2b3803081
bpo-41910: specify the default implementations of object.__eq__ and object.__ne__ (GH-22874) (#22877)
See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython.

Co-authored-by: Brett Cannon <brett@python.org>
2020-10-21 20:07:59 -04:00
Miss Skeleton (bot) 89fac4c374
[3.8] bpo-39416: Document some restrictions on the default string representations of numeric classes (GH-18111) (GH-22861)
[[bpo-39416]()](): Document string representations of the Numeric classes

This is a change to the specification of the Python language.

The idea here is to put sane minimal limits on the Python language's default
representations of its Numeric classes.  That way "Marty's Robotic Massage Parlor
and Python Interpreter" implementation of Python won't do anything too
crazy.

Some discussion in the email thread:
Subject: Documenting Python's float.__str__()
https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/
(cherry picked from commit c60394c7fc)


Co-authored-by: kpinc <kop@karlpinc.com>

Automerge-Triggered-By: GH:merwok
2020-10-21 11:56:20 -07:00
Miss Skeleton (bot) e866f33a48
bpo-41316: Make tarfile follow specs for FNAME (GH-21511)
tarfile writes full path to FNAME field of GZIP format instead of just basename if user specified absolute path. Some archive viewers may process file incorrectly. Also it creates security issue because anyone can know structure of directories on system and know username or other personal information.

RFC1952 says about FNAME:
This is the original name of the file being compressed, with any directory components removed.

So tarfile must remove directory names from FNAME and write only basename of file.

Automerge-Triggered-By: @jaraco
(cherry picked from commit 22748a83d9)

Co-authored-by: Artem Bulgakov <ArtemSBulgakov@ya.ru>
2020-10-20 22:29:44 -07:00
Miss Skeleton (bot) d84e411005
bpo-38439: Add 256px IDLE icon to the .ico, drop gifs from it (GH-19648)
(cherry picked from commit faddc7449d)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2020-10-20 10:17:31 -07:00
Miss Skeleton (bot) 333782a3f4
bpo-38439: Update the Windows Store package's icons for IDLE. Artwork by Andrew Clover (GH-22817)
(cherry picked from commit 6d883fbe14)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-10-20 10:17:17 -07:00
Miss Skeleton (bot) 4cde523aa4
bpo-38324: Fix test__locale.py Windows failures (GH-20529)
Use wide-char _W_* fields of lconv structure on Windows
Remove "ps_AF" from test__locale.known_numerics on Windows
(cherry picked from commit f2312037e3)

Co-authored-by: TIGirardi <tiagoigirardi@gmail.com>
2020-10-20 04:58:06 -07:00
Miss Skeleton (bot) d1eb75585e
bpo-41491: plistlib: accept hexadecimal integer values in xml plist files (GH-22764) (GH-22807)
(cherry picked from commit 3185267400)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-10-20 10:05:40 +02:00
Miss Skeleton (bot) e7c5a43984
bpo-41471: Ignore invalid prefix lengths in system proxy settings on macOS (GH-22762) (GH-22774)
(cherry picked from commit 93a1ccabde)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-10-20 09:17:58 +02:00
Miss Skeleton (bot) 65894cac08
bpo-42051: Reject XML entity declarations in plist files (GH-22760)
(cherry picked from commit 05ee790f4d)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-10-19 19:35:23 -07:00