PyType_GetFlags() return type is unsigned long, not long.
(cherry picked from commit 9fbcfc08e5)
Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
Unconditional forcing of ``CHECKED_HASH`` invalidation was introduced in
3.7.0 in bpo-29708. The change is bad, as it unconditionally overrides
*invalidation_mode*, even if it was passed as an explicit argument to
``py_compile.compile()`` or ``compileall``. An environment variable
should *never* override an explicit argument to a library function.
That change leads to multiple test failures if the ``SOURCE_DATE_EPOCH``
environment variable is set.
This changes ``py_compile.compile()`` to only look at
``SOURCE_DATE_EPOCH`` if no explicit *invalidation_mode* was specified.
I also made various relevant tests run with explicit control over the
value of ``SOURCE_DATE_EPOCH``.
While looking at this, I noticed that ``zipimport`` does not work
with hash-based .pycs _at all_, though I left the fixes for
subsequent commits.
(cherry picked from commit a6b3ec5b6d)
Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
I'll watch for 404 on the old URL and will setup an HTTP redirection if needed.
(cherry picked from commit 361e8683e7)
Co-authored-by: Zhiming Wang <github@zmwang.pw>
locale.localeconv() now sets temporarily the LC_CTYPE locale to the
LC_MONETARY locale if the two locales are different and monetary
strings are non-ASCII. This temporary change affects other threads.
Changes:
* locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode
monetary fields.
* Add LocaleInfo.grouping_buffer: copy localeconv() grouping string
since it can be replaced anytime if a different thread calls
localeconv().
(cherry picked from commit 02e6bf7f20)
Remove an unnecessary "that":
... will execute that the body ... -> ... will execute the body ...
(cherry picked from commit 25221b3283)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
reproduciblity -> reproducibility
PyPA are the group -> PyPA is the group
(cherry picked from commit 0dc1e45dfd)
Co-authored-by: Windson yang <wiwindson@outlook.com>
* universal_newlines defaulting to False would suggest, that not
specifying universal_newlines explicitly and setting text to True
should cause an error, which is not the case.
* The run function didn't have the universal_newlines parameter
documented
* The check_output function didn't have its text parameter documented
(cherry picked from commit 7432f0929f)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
The documentation was not covering multiple targets enclosed by
parenthesis nor multiple targets enclosed by brackets, adding them all
would be heavy, an else cover them all and is lighter to read.
(cherry picked from commit 082875dcd6)
Co-authored-by: Julien Palard <julien@palard.fr>
The System Preferences Dock "prefer tabs always" setting disables some
IDLE features. Menus are a bit different than as described for Windows
and Linux.
(cherry picked from commit 50ff02b431)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1) Convert weird field name "typ" to the more standard "type".
2) For the NUMBER type, convert the value to an int() or float().
3) Simplify ``group(kind)`` to the shorter and faster ``group()`` call.
4) Simplify logic go a single if-elif chain to make this easier to extend.
5) Reorder the tests to match the order the tokens are specified.
This isn't necessary for correctness but does make the example
easier to follow.
6) Move the "column" calculation before the if-elif chain so that
users have the option of using this value in error messages.
(cherry picked from commit b83942c755)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
The section is renamed from "IDLE -- console differences". It mostly
covers the implications of using custom sys.stdxxx objects.
(cherry picked from commit 5e79090324)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
§31.5.6.3. Importing a source file directly: `module_from_spec` is new in Python 3.5.
(cherry picked from commit 16c8a53490)
Co-authored-by: E Kawashima <e-kwsm@users.noreply.github.com>