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
(cherry picked from commit b30ee26e36)
Co-authored-by: Ravi Teja P <rvteja92@gmail.com>
Fix also a resource warning when store counts and module info.
(cherry picked from commit 04cdeb7a56)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Could not open os.path.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 8ab77c6f9f)
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
- 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 the recursive unparsing aspect of ast.unparse
(cherry picked from commit 8df1016)
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..
(cherry picked from commit 1f0f4abb11)
Prefix the error message with `fstring: `, when parsing an f-string expression throws a `SyntaxError`.
(cherry picked from commit 2e0a920e9e)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
tracemalloc_get_frame() checked filename == NULL two times in a row.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9cfcdb7d6e)
Co-authored-by: Christian Heimes <christian@python.org>
Signed-off-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: @tiran.
(cherry picked from commit bb6ec14479)
Co-authored-by: Christian Heimes <christian@python.org>
Adds a simple check for whether or not the package is being installed in the GUI or using installer on the command line. This addresses an issue where CLI-based software management tools (such as Munki) unexpectedly open Finder windows into a GUI session during installation runs.
(cherry picked from commit 5f190d2cc6)
Co-authored-by: Rick Heil <rickheil@partnersandsimons.com>
- fix installer builds when using latest versions of Python 3
- fix installer builds on newer macOS releases with SIP
- Python Launcher app factory defaults now use python3
* Fix support of non-ASCII names in functions OpenDatabase()
and init_database().
* Fix support of non-ASCII SQL in method Database.OpenView().
(cherry picked from commit 55939b1708)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
In absence of explicit declaration, resource compiler uses system
codepage. When this codepage is DBCS or UTF-8, Python's copyright
string is corrupted, because it contains copyright sign encoded
as \xA9.
The fix is to explicitly declare codepage 1252.
(cherry picked from commit 33b79b11b8)
Co-authored-by: Nikita Nemkin <nikita@nemkin.ru>
This was detected by our Coverity scan as a REVERSE_INULL issue.
Automerge-Triggered-By: @gpshead
(cherry picked from commit d780fa7)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Automerge-Triggered-By: @matrixise
(cherry picked from commit 80526f6841)
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
* Add missing header files to pythoncore.
* Add missing file filters ("Resource Files" in particular) to
all projects.
* Add new sub-filters for private headers in pythoncore and
for 3rd party source files.
* Add missing _zoneinfo configurations in pcbuild.sln.
* Update bdist_wininst with the new zlib location.
Co-authored-by: Nikita Nemkin <nikita@nemkin.ru>
Remove auto-generated resource header. Pass definitions required
by resource files (ORIGINAL_FILENAME and FIELD3) directly to resource
compiler.
Remove unused MS_DLL_ID resource string and related dead code.
(cherry picked from commit 4efc3360c9)
Co-authored-by: Nikita Nemkin <nikita@nemkin.ru>
Fix integer overflow in the :meth:`array.array.index` method on 64-bit Windows
for index larger than ``2**31``.
(cherry picked from commit 1d3dad5f96)
Co-authored-by: WildCard65 <WildCard65@users.noreply.github.com>
* Add a glossary entry for the term "callback"
* Link to it in loop.call_soon() and in the "Concurrency and Multithreading" section
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit a16d697049)
Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
Unexpected errors in calling the __iter__ method are no longer
masked by TypeError in csv.reader(), csv.writer.writerow() and
csv.writer.writerows().
(cherry picked from commit c88239f864)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Unexpected errors in calling the __iter__ method are no longer
masked by TypeError in the "in" operator and functions
operator.contains(), operator.indexOf() and operator.countOf().
(cherry picked from commit cafe1b6e9d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Reported by Coverity. (CID 1457554 RETURN_LOCAL)
path0 is assigned as a pointer to this right before it goes out of scope.
(cherry picked from commit 81328f3070)
Co-authored-by: Gregory P. Smith <greg@krypto.org>