#76 [DON'T MERGE] Update to 3.7.2rc1
Closed 5 years ago by churchyard. Opened 5 years ago by churchyard.
rpms/ churchyard/python3 372rc1  into  master

file modified
+2 -2
@@ -16,9 +16,9 @@ 

   

  +_WHEEL_DIR = "/usr/share/python-wheels/"

   

- -_SETUPTOOLS_VERSION = "39.0.1"

+ -_SETUPTOOLS_VERSION = "40.6.2"

   

- -_PIP_VERSION = "10.0.1"

+ -_PIP_VERSION = "18.1"

  +def _get_most_recent_wheel_version(pkg):

  +    prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg))

  +    suffix = "-py2.py3-none-any.whl"

@@ -1,106 +0,0 @@ 

- diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst

- index 847b50140a6..570dc3ed6fe 100644

- --- a/Doc/whatsnew/3.6.rst

- +++ b/Doc/whatsnew/3.6.rst

- @@ -1852,10 +1852,10 @@ Build and C API Changes

-  * The :c:func:`PyUnicode_FSConverter` and :c:func:`PyUnicode_FSDecoder`

-    functions will now accept :term:`path-like objects <path-like object>`.

-  

- -* The ``PyExc_RecursionErrorInst`` singleton that was part of the public API

- -  has been removed as its members being never cleared may cause a segfault

- -  during finalization of the interpreter. Contributed by Xavier de Gaye in

- -  :issue:`22898` and :issue:`30697`.

- +* The ``PyExc_RecursionErrorInst`` singleton is not used anymore as its members

- +  being never cleared may cause a segfault during finalization of the

- +  interpreter. Contributed by Xavier de Gaye in :issue:`22898` and

- +  :issue:`30697`.

-  

-  

-  Other Improvements

- diff --git a/Include/pyerrors.h b/Include/pyerrors.h

- index c28c1373f82..8c1dbc5047b 100644

- --- a/Include/pyerrors.h

- +++ b/Include/pyerrors.h

- @@ -219,6 +219,8 @@ PyAPI_DATA(PyObject *) PyExc_IOError;

-  PyAPI_DATA(PyObject *) PyExc_WindowsError;

-  #endif

-  

- +PyAPI_DATA(PyObject *) PyExc_RecursionErrorInst;

- +

-  /* Predefined warning categories */

-  PyAPI_DATA(PyObject *) PyExc_Warning;

-  PyAPI_DATA(PyObject *) PyExc_UserWarning;

- diff --git a/Misc/NEWS.d/next/C API/2017-12-20-15-23-06.bpo-30697.v9FmgG.rst b/Misc/NEWS.d/next/C API/2017-12-20-15-23-06.bpo-30697.v9FmgG.rst

- new file mode 100644

- index 00000000000..28f74ad4f30

- --- /dev/null

- +++ b/Misc/NEWS.d/next/C API/2017-12-20-15-23-06.bpo-30697.v9FmgG.rst	

- @@ -0,0 +1 @@

- +Restore PyExc_RecursionErrorInst in 3.6

- diff --git a/Objects/exceptions.c b/Objects/exceptions.c

- index df4899372a5..271e293e325 100644

- --- a/Objects/exceptions.c

- +++ b/Objects/exceptions.c

- @@ -2430,6 +2430,12 @@ SimpleExtendsException(PyExc_Warning, ResourceWarning,

-  

-  

-  

- +/* Pre-computed RecursionError instance for when recursion depth is reached.

- +   Meant to be used when normalizing the exception for exceeding the recursion

- +   depth will cause its own infinite recursion.

- +*/

- +PyObject *PyExc_RecursionErrorInst = NULL;

- +

-  #define PRE_INIT(TYPE) \

-      if (!(_PyExc_ ## TYPE.tp_flags & Py_TPFLAGS_READY)) { \

-          if (PyType_Ready(&_PyExc_ ## TYPE) < 0) \

- @@ -2691,11 +2697,37 @@ _PyExc_Init(PyObject *bltinmod)

-      ADD_ERRNO(TimeoutError, ETIMEDOUT);

-  

-      preallocate_memerrors();

- +

- +    if (!PyExc_RecursionErrorInst) {

- +        PyExc_RecursionErrorInst = BaseException_new(&_PyExc_RecursionError, NULL, NULL);

- +        if (!PyExc_RecursionErrorInst)

- +            Py_FatalError("Cannot pre-allocate RecursionError instance for "

- +                            "recursion errors");

- +        else {

- +            PyBaseExceptionObject *err_inst =

- +                (PyBaseExceptionObject *)PyExc_RecursionErrorInst;

- +            PyObject *args_tuple;

- +            PyObject *exc_message;

- +            exc_message = PyUnicode_FromString("maximum recursion depth exceeded");

- +            if (!exc_message)

- +                Py_FatalError("cannot allocate argument for RecursionError "

- +                                "pre-allocation");

- +            args_tuple = PyTuple_Pack(1, exc_message);

- +            if (!args_tuple)

- +                Py_FatalError("cannot allocate tuple for RecursionError "

- +                                "pre-allocation");

- +            Py_DECREF(exc_message);

- +            if (BaseException_init(err_inst, args_tuple, NULL))

- +                Py_FatalError("init of pre-allocated RecursionError failed");

- +            Py_DECREF(args_tuple);

- +        }

- +    }

-  }

-  

-  void

-  _PyExc_Fini(void)

-  {

- +    Py_CLEAR(PyExc_RecursionErrorInst);

-      free_preallocated_memerrors();

-      Py_CLEAR(errnomap);

-  }

- diff --git a/PC/python3.def b/PC/python3.def

- index 4fc4a6814ee..ff70718fc37 100644

- --- a/PC/python3.def

- +++ b/PC/python3.def

- @@ -224,6 +224,7 @@ EXPORTS

-    PyExc_PermissionError=python36.PyExc_PermissionError DATA

-    PyExc_ProcessLookupError=python36.PyExc_ProcessLookupError DATA

-    PyExc_RecursionError=python36.PyExc_RecursionError DATA

- +  PyExc_RecursionErrorInst=python36.PyExc_RecursionErrorInst DATA

-    PyExc_ReferenceError=python36.PyExc_ReferenceError DATA

-    PyExc_ResourceWarning=python36.PyExc_ResourceWarning DATA

-    PyExc_RuntimeError=python36.PyExc_RuntimeError DATA

@@ -1,228 +0,0 @@ 

- diff --git a/Lib/ssl.py b/Lib/ssl.py

- index 1f3a31a..b54a684 100644

- --- a/Lib/ssl.py

- +++ b/Lib/ssl.py

- @@ -116,6 +116,7 @@ except ImportError:

-  

-  

-  from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN, HAS_TLSv1_3

- +from _ssl import _DEFAULT_CIPHERS

-  from _ssl import _OPENSSL_API_VERSION

-  

-  

- @@ -174,48 +175,7 @@ else:

-      CHANNEL_BINDING_TYPES = []

-  

-  

- -# Disable weak or insecure ciphers by default

- -# (OpenSSL's default setting is 'DEFAULT:!aNULL:!eNULL')

- -# Enable a better set of ciphers by default

- -# This list has been explicitly chosen to:

- -#   * TLS 1.3 ChaCha20 and AES-GCM cipher suites

- -#   * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)

- -#   * Prefer ECDHE over DHE for better performance

- -#   * Prefer AEAD over CBC for better performance and security

- -#   * Prefer AES-GCM over ChaCha20 because most platforms have AES-NI

- -#     (ChaCha20 needs OpenSSL 1.1.0 or patched 1.0.2)

- -#   * Prefer any AES-GCM and ChaCha20 over any AES-CBC for better

- -#     performance and security

- -#   * Then Use HIGH cipher suites as a fallback

- -#   * Disable NULL authentication, NULL encryption, 3DES and MD5 MACs

- -#     for security reasons

- -_DEFAULT_CIPHERS = (

- -    'TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:'

- -    'TLS13-AES-128-GCM-SHA256:'

- -    'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:'

- -    'ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:RSA+AESGCM:RSA+AES:RSA+HIGH:'

- -    '!aNULL:!eNULL:!MD5:!3DES'

- -    )

- -

- -# Restricted and more secure ciphers for the server side

- -# This list has been explicitly chosen to:

- -#   * TLS 1.3 ChaCha20 and AES-GCM cipher suites

- -#   * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)

- -#   * Prefer ECDHE over DHE for better performance

- -#   * Prefer AEAD over CBC for better performance and security

- -#   * Prefer AES-GCM over ChaCha20 because most platforms have AES-NI

- -#   * Prefer any AES-GCM and ChaCha20 over any AES-CBC for better

- -#     performance and security

- -#   * Then Use HIGH cipher suites as a fallback

- -#   * Disable NULL authentication, NULL encryption, MD5 MACs, DSS, RC4, and

- -#     3DES for security reasons

- -_RESTRICTED_SERVER_CIPHERS = (

- -    'TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:'

- -    'TLS13-AES-128-GCM-SHA256:'

- -    'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:'

- -    'ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:RSA+AESGCM:RSA+AES:RSA+HIGH:'

- -    '!aNULL:!eNULL:!MD5:!DSS:!RC4:!3DES'

- -)

- +_RESTRICTED_SERVER_CIPHERS = _DEFAULT_CIPHERS

-  

-  

-  class CertificateError(ValueError):

- @@ -389,8 +349,6 @@ class SSLContext(_SSLContext):

-  

-      def __new__(cls, protocol=PROTOCOL_TLS, *args, **kwargs):

-          self = _SSLContext.__new__(cls, protocol)

- -        if protocol != _SSLv2_IF_EXISTS:

- -            self.set_ciphers(_DEFAULT_CIPHERS)

-          return self

-  

-      def __init__(self, protocol=PROTOCOL_TLS):

- @@ -505,8 +463,6 @@ def create_default_context(purpose=Purpose.SERVER_AUTH, *, cafile=None,

-          # verify certs and host name in client mode

-          context.verify_mode = CERT_REQUIRED

-          context.check_hostname = True

- -    elif purpose == Purpose.CLIENT_AUTH:

- -        context.set_ciphers(_RESTRICTED_SERVER_CIPHERS)

-  

-      if cafile or capath or cadata:

-          context.load_verify_locations(cafile, capath, cadata)

- diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py

- index 54644e1..799100c 100644

- --- a/Lib/test/test_ssl.py

- +++ b/Lib/test/test_ssl.py

- @@ -18,6 +18,7 @@ import asyncore

-  import weakref

-  import platform

-  import functools

- +import sysconfig

-  try:

-      import ctypes

-  except ImportError:

- @@ -36,7 +37,7 @@ PROTOCOLS = sorted(ssl._PROTOCOL_NAMES)

-  HOST = support.HOST

-  IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL')

-  IS_OPENSSL_1_1 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0)

- -

- +PY_SSL_DEFAULT_CIPHERS = sysconfig.get_config_var('PY_SSL_DEFAULT_CIPHERS')

-  

-  def data_file(*name):

-      return os.path.join(os.path.dirname(__file__), *name)

- @@ -889,6 +890,19 @@ class ContextTests(unittest.TestCase):

-          with self.assertRaisesRegex(ssl.SSLError, "No cipher can be selected"):

-              ctx.set_ciphers("^$:,;?*'dorothyx")

-  

- +    @unittest.skipUnless(PY_SSL_DEFAULT_CIPHERS == 1,

- +                         "Test applies only to Python default ciphers")

- +    def test_python_ciphers(self):

- +        ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)

- +        ciphers = ctx.get_ciphers()

- +        for suite in ciphers:

- +            name = suite['name']

- +            self.assertNotIn("PSK", name)

- +            self.assertNotIn("SRP", name)

- +            self.assertNotIn("MD5", name)

- +            self.assertNotIn("RC4", name)

- +            self.assertNotIn("3DES", name)

- +

-      @unittest.skipIf(ssl.OPENSSL_VERSION_INFO < (1, 0, 2, 0, 0), 'OpenSSL too old')

-      def test_get_ciphers(self):

-          ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)

- diff --git a/Modules/_ssl.c b/Modules/_ssl.c

- index df8c6a7..e23a569 100644

- --- a/Modules/_ssl.c

- +++ b/Modules/_ssl.c

- @@ -206,6 +206,31 @@ SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s)

-  

-  #endif /* OpenSSL < 1.1.0 or LibreSSL */

-  

- +/* Default cipher suites */

- +#ifndef PY_SSL_DEFAULT_CIPHERS

- +#define PY_SSL_DEFAULT_CIPHERS 1

- +#endif

- +

- +#if PY_SSL_DEFAULT_CIPHERS == 0

- +  #ifndef PY_SSL_DEFAULT_CIPHER_STRING

- +     #error "Py_SSL_DEFAULT_CIPHERS 0 needs Py_SSL_DEFAULT_CIPHER_STRING"

- +  #endif

- +#elif PY_SSL_DEFAULT_CIPHERS == 1

- +/* Python custom selection of sensible ciper suites

- + * DEFAULT: OpenSSL's default cipher list. Since 1.0.2 the list is in sensible order.

- + * !aNULL:!eNULL: really no NULL ciphers

- + * !MD5:!3DES:!DES:!RC4:!IDEA:!SEED: no weak or broken algorithms on old OpenSSL versions.

- + * !aDSS: no authentication with discrete logarithm DSA algorithm

- + * !SRP:!PSK: no secure remote password or pre-shared key authentication

- + */

- +  #define PY_SSL_DEFAULT_CIPHER_STRING "DEFAULT:!aNULL:!eNULL:!MD5:!3DES:!DES:!RC4:!IDEA:!SEED:!aDSS:!SRP:!PSK"

- +#elif PY_SSL_DEFAULT_CIPHERS == 2

- +/* Ignored in SSLContext constructor, only used to as _ssl.DEFAULT_CIPHER_STRING */

- +  #define PY_SSL_DEFAULT_CIPHER_STRING SSL_DEFAULT_CIPHER_LIST

- +#else

- +  #error "Unsupported PY_SSL_DEFAULT_CIPHERS"

- +#endif

- +

-  

-  enum py_ssl_error {

-      /* these mirror ssl.h */

- @@ -2739,7 +2764,12 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)

-      /* A bare minimum cipher list without completely broken cipher suites.

-       * It's far from perfect but gives users a better head start. */

-      if (proto_version != PY_SSL_VERSION_SSL2) {

- -        result = SSL_CTX_set_cipher_list(ctx, "HIGH:!aNULL:!eNULL:!MD5");

- +#if PY_SSL_DEFAULT_CIPHERS == 2

- +        /* stick to OpenSSL's default settings */

- +        result = 1;

- +#else

- +        result = SSL_CTX_set_cipher_list(ctx, PY_SSL_DEFAULT_CIPHER_STRING);

- +#endif

-      } else {

-          /* SSLv2 needs MD5 */

-          result = SSL_CTX_set_cipher_list(ctx, "HIGH:!aNULL:!eNULL");

- @@ -5279,6 +5309,9 @@ PyInit__ssl(void)

-                               (PyObject *)&PySSLSession_Type) != 0)

-          return NULL;

-  

- +    PyModule_AddStringConstant(m, "_DEFAULT_CIPHERS",

- +                               PY_SSL_DEFAULT_CIPHER_STRING);

- +

-      PyModule_AddIntConstant(m, "SSL_ERROR_ZERO_RETURN",

-                              PY_SSL_ERROR_ZERO_RETURN);

-      PyModule_AddIntConstant(m, "SSL_ERROR_WANT_READ",

- diff --git a/configure.ac b/configure.ac

- index 7ea62f8..4b42393 100644

- --- a/configure.ac

- +++ b/configure.ac

- @@ -5555,6 +5555,42 @@ if test "$have_getrandom" = yes; then

-                [Define to 1 if the getrandom() function is available])

-  fi

-  

- +# ssl module default cipher suite string

- +AH_TEMPLATE(PY_SSL_DEFAULT_CIPHERS,

- +  [Default cipher suites list for ssl module.

- +   1: Python's preferred selection, 2: leave OpenSSL defaults untouched, 0: custom string])

- +AH_TEMPLATE(PY_SSL_DEFAULT_CIPHER_STRING,

- +  [Cipher suite string for PY_SSL_DEFAULT_CIPHERS=0]

- +)

- +AC_MSG_CHECKING(for --with-ssl-default-suites)

- +AC_ARG_WITH(ssl-default-suites,

- +            AS_HELP_STRING([--with-ssl-default-suites=@<:@python|openssl|STRING@:>@],

- +                           [Override default cipher suites string,

- +                            python: use Python's preferred selection (default),

- +                            openssl: leave OpenSSL's defaults untouched,

- +                            STRING: use a custom string,

- +                            PROTOCOL_SSLv2 ignores the setting]),

- +[

- +AC_MSG_RESULT($withval)

- +case "$withval" in

- +    python)

- +        AC_DEFINE(PY_SSL_DEFAULT_CIPHERS, 1)

- +        ;;

- +    openssl)

- +        AC_DEFINE(PY_SSL_DEFAULT_CIPHERS, 2)

- +        ;;

- +    *)

- +        AC_DEFINE(PY_SSL_DEFAULT_CIPHERS, 0)

- +        AC_DEFINE_UNQUOTED(PY_SSL_DEFAULT_CIPHER_STRING, "$withval")

- +        ;;

- +esac

- +],

- +[

- +AC_MSG_RESULT(python)

- +AC_DEFINE(PY_SSL_DEFAULT_CIPHERS, 1)

- +])

- +

- +

-  # generate output files

-  AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)

-  AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])

@@ -1,104 +0,0 @@ 

- From 5affd5c29eb1493cb31ef3cfdde15538ac134689 Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

- Date: Tue, 13 Mar 2018 10:56:43 +0100

- Subject: [PATCH] bpo-32885: Tools/scripts/pathfix.py: Add -n option for no

-  backup~ (#5772)

- 

- Creating backup files with ~ suffix can be undesirable in some environment,

- such as when building RPM packages. Instead of requiring the user to remove

- those files manually, option -n was added, that simply disables this feature.

- 

- -n was selected because 2to3 has the same option with this behavior.

- ---

-  Misc/ACKS                                          |  1 +

-  .../2018-02-20-12-16-47.bpo-32885.dL5x7C.rst       |  2 ++

-  Tools/scripts/pathfix.py                           | 28 +++++++++++++++-------

-  3 files changed, 23 insertions(+), 8 deletions(-)

-  create mode 100644 Misc/NEWS.d/next/Tools-Demos/2018-02-20-12-16-47.bpo-32885.dL5x7C.rst

- 

- diff --git a/Misc/ACKS b/Misc/ACKS

- index d8179c8b03ab..d752d8a35434 100644

- --- a/Misc/ACKS

- +++ b/Misc/ACKS

- @@ -687,6 +687,7 @@ Ken Howard

-  Brad Howes

-  Mike Hoy

-  Ben Hoyt

- +Miro Hrončok

-  Chiu-Hsiang Hsu

-  Chih-Hao Huang

-  Christian Hudon

- diff --git a/Misc/NEWS.d/next/Tools-Demos/2018-02-20-12-16-47.bpo-32885.dL5x7C.rst b/Misc/NEWS.d/next/Tools-Demos/2018-02-20-12-16-47.bpo-32885.dL5x7C.rst

- new file mode 100644

- index 000000000000..e003e1d84fd0

- --- /dev/null

- +++ b/Misc/NEWS.d/next/Tools-Demos/2018-02-20-12-16-47.bpo-32885.dL5x7C.rst

- @@ -0,0 +1,2 @@

- +Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disbale automatic

- +backup creation (files with ``~`` suffix).

- diff --git a/Tools/scripts/pathfix.py b/Tools/scripts/pathfix.py

- index 562bbc737812..c5bf984306a3 100755

- --- a/Tools/scripts/pathfix.py

- +++ b/Tools/scripts/pathfix.py

- @@ -7,8 +7,9 @@

-  # Directories are searched recursively for files whose name looks

-  # like a python module.

-  # Symbolic links are always ignored (except as explicit directory

- -# arguments).  Of course, the original file is kept as a back-up

- -# (with a "~" attached to its name).

- +# arguments).

- +# The original file is kept as a back-up (with a "~" attached to its name),

- +# -n flag can be used to disable this.

-  #

-  # Undoubtedly you can do this using find and sed or perl, but this is

-  # a nice example of Python code that recurses down a directory tree

- @@ -31,14 +32,17 @@

-  

-  new_interpreter = None

-  preserve_timestamps = False

- +create_backup = True

- +

-  

-  def main():

-      global new_interpreter

-      global preserve_timestamps

- -    usage = ('usage: %s -i /interpreter -p file-or-directory ...\n' %

- +    global create_backup

- +    usage = ('usage: %s -i /interpreter -p -n file-or-directory ...\n' %

-               sys.argv[0])

-      try:

- -        opts, args = getopt.getopt(sys.argv[1:], 'i:p')

- +        opts, args = getopt.getopt(sys.argv[1:], 'i:pn')

-      except getopt.error as msg:

-          err(str(msg) + '\n')

-          err(usage)

- @@ -48,6 +52,8 @@ def main():

-              new_interpreter = a.encode()

-          if o == '-p':

-              preserve_timestamps = True

- +        if o == '-n':

- +            create_backup = False

-      if not new_interpreter or not new_interpreter.startswith(b'/') or \

-             not args:

-          err('-i option or file-or-directory missing\n')

- @@ -134,10 +140,16 @@ def fix(filename):

-      except OSError as msg:

-          err('%s: warning: chmod failed (%r)\n' % (tempname, msg))

-      # Then make a backup of the original file as filename~

- -    try:

- -        os.rename(filename, filename + '~')

- -    except OSError as msg:

- -        err('%s: warning: backup failed (%r)\n' % (filename, msg))

- +    if create_backup:

- +        try:

- +            os.rename(filename, filename + '~')

- +        except OSError as msg:

- +            err('%s: warning: backup failed (%r)\n' % (filename, msg))

- +    else:

- +        try:

- +            os.remove(filename)

- +        except OSError as msg:

- +            err('%s: warning: removing failed (%r)\n' % (filename, msg))

-      # Now move the temp file to the original file

-      try:

-          os.rename(tempname, filename)

@@ -1,55 +0,0 @@ 

- From a3febe3cba14b89885f42ca2f0224096a52885f6 Mon Sep 17 00:00:00 2001

- From: Antoine Pitrou <antoine@python.org>

- Date: Mon, 23 Apr 2018 13:19:42 +0200

- Subject: [PATCH] bpo-33329: Fix multiprocessing regression on newer glibcs

- 

- Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some

- reserved signal numbers between 1 and NSIG.  The `range(1, NSIG)` idiom

- is commonly used to select all signals for blocking with `pthread_sigmask`.

- So we ignore the sigaddset() return value until we expose sigfillset()

- to provide a better idiom.

- ---

-  .../next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst  |  1 +

-  Modules/signalmodule.c                                     | 14 ++++++++------

-  2 files changed, 9 insertions(+), 6 deletions(-)

-  create mode 100644 Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst

- 

- diff --git a/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst b/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst

- new file mode 100644

- index 000000000000..d1a4e56d04b9

- --- /dev/null

- +++ b/Misc/NEWS.d/next/Library/2018-04-23-13-21-39.bpo-33329.lQ-Eod.rst

- @@ -0,0 +1 @@

- +Fix multiprocessing regression on newer glibcs

- diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c

- index 791616014384..35fd87e2d1e7 100644

- --- a/Modules/signalmodule.c

- +++ b/Modules/signalmodule.c

- @@ -819,7 +819,6 @@ iterable_to_sigset(PyObject *iterable, sigset_t *mask)

-      int result = -1;

-      PyObject *iterator, *item;

-      long signum;

- -    int err;

-  

-      sigemptyset(mask);

-  

- @@ -841,11 +840,14 @@ iterable_to_sigset(PyObject *iterable, sigset_t *mask)

-          Py_DECREF(item);

-          if (signum == -1 && PyErr_Occurred())

-              goto error;

- -        if (0 < signum && signum < NSIG)

- -            err = sigaddset(mask, (int)signum);

- -        else

- -            err = 1;

- -        if (err) {

- +        if (0 < signum && signum < NSIG) {

- +            /* bpo-33329: ignore sigaddset() return value as it can fail

- +             * for some reserved signals, but we want the `range(1, NSIG)`

- +             * idiom to allow selecting all valid signals.

- +             */

- +            (void) sigaddset(mask, (int)signum);

- +        }

- +        else {

-              PyErr_Format(PyExc_ValueError,

-                           "signal number %ld out of range", signum);

-              goto error;

@@ -1,61 +0,0 @@ 

- commit c36e8721f276e7cc09cecdb9c04783630f0ba82a

- Author: Victor Stinner <vstinner@redhat.com>

- Date:   Wed Nov 7 00:34:22 2018 +0100

- 

-     bpo-23420: Verify the value of '-s' when execute the CLI of cProfile

-     

-     Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert

-     Kuska.

-     

-     Resolves: rhbz#1160640

- 

- diff --git a/Lib/cProfile.py b/Lib/cProfile.py

- index c044be8..f6e423b 100755

- --- a/Lib/cProfile.py

- +++ b/Lib/cProfile.py

- @@ -124,6 +124,7 @@ def main():

-      import os

-      import sys

-      import runpy

- +    import pstats

-      from optparse import OptionParser

-      usage = "cProfile.py [-o output_file_path] [-s sort] [-m module | scriptfile] [arg] ..."

-      parser = OptionParser(usage=usage)

- @@ -132,7 +133,8 @@ def main():

-          help="Save stats to <outfile>", default=None)

-      parser.add_option('-s', '--sort', dest="sort",

-          help="Sort order when printing to stdout, based on pstats.Stats class",

- -        default=-1)

- +        default=-1,

- +        choices=sorted(pstats.Stats.sort_arg_dict_default))

-      parser.add_option('-m', dest="module", action="store_true",

-          help="Profile a library module", default=False)

-  

- diff --git a/Lib/test/test_cprofile.py b/Lib/test/test_cprofile.py

- index 1430d22..5c4ec5b 100644

- --- a/Lib/test/test_cprofile.py

- +++ b/Lib/test/test_cprofile.py

- @@ -2,6 +2,7 @@

-  

-  import sys

-  from test.support import run_unittest, TESTFN, unlink

- +import unittest

-  

-  # rip off all interesting stuff from test_profile

-  import cProfile

- @@ -50,8 +51,14 @@ class CProfileTest(ProfileTest):

-          assert_python_ok('-m', 'cProfile', '-m', 'timeit', '-n', '1')

-  

-  

- +class TestCommandLine(unittest.TestCase):

- +    def test_sort(self):

- +        rc, out, err = assert_python_failure('-m', 'cProfile', '-s', 'demo')

- +        self.assertGreater(rc, 0)

- +        self.assertIn(b"option -s: invalid choice: 'demo'", err)

- +

-  def test_main():

- -    run_unittest(CProfileTest)

- +    run_unittest(CProfileTest, TestCommandLine)

-  

-  def main():

-      if '-r' not in sys.argv:

@@ -1,46 +0,0 @@ 

- From 0165caf04ef9c615c8b86dd16f7c201ca7a0befa Mon Sep 17 00:00:00 2001

- From: Victor Stinner <vstinner@redhat.com>

- Date: Tue, 27 Nov 2018 12:40:50 +0100

- Subject: [PATCH] bpo-35317: Fix mktime() error in test_email (GH-10721)

- 

- Fix mktime() overflow error in test_email: run

- test_localtime_daylight_true_dst_true() and

- test_localtime_daylight_false_dst_true() with a specific timezone.

- (cherry picked from commit cfaafda8e3e19764682abb4bd4c574accb784c42)

- 

- Co-authored-by: Victor Stinner <vstinner@redhat.com>

- ---

-  Lib/test/test_email/test_utils.py                              | 2 ++

-  .../NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst | 3 +++

-  2 files changed, 5 insertions(+)

-  create mode 100644 Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst

- 

- diff --git a/Lib/test/test_email/test_utils.py b/Lib/test/test_email/test_utils.py

- index 6dcb3bbe7aab..4e3c3f3a195f 100644

- --- a/Lib/test/test_email/test_utils.py

- +++ b/Lib/test/test_email/test_utils.py

- @@ -75,6 +75,7 @@ def test_localtime_daylight_false_dst_false(self):

-          t2 = utils.localtime(t1)

-          self.assertEqual(t1, t2)

-  

- +    @test.support.run_with_tz('Europe/Minsk')

-      def test_localtime_daylight_true_dst_true(self):

-          test.support.patch(self, time, 'daylight', True)

-          t0 = datetime.datetime(2012, 3, 12, 1, 1)

- @@ -82,6 +83,7 @@ def test_localtime_daylight_true_dst_true(self):

-          t2 = utils.localtime(t1)

-          self.assertEqual(t1, t2)

-  

- +    @test.support.run_with_tz('Europe/Minsk')

-      def test_localtime_daylight_false_dst_true(self):

-          test.support.patch(self, time, 'daylight', False)

-          t0 = datetime.datetime(2012, 3, 12, 1, 1)

- diff --git a/Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst b/Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst

- new file mode 100644

- index 000000000000..73a30f71927f

- --- /dev/null

- +++ b/Misc/NEWS.d/next/Tests/2018-11-26-16-54-21.bpo-35317.jByGP2.rst

- @@ -0,0 +1,3 @@

- +Fix ``mktime()`` overflow error in ``test_email``: run

- +``test_localtime_daylight_true_dst_true()`` and

- +``test_localtime_daylight_false_dst_true()`` with a specific timezone.

file modified
+11 -20
@@ -13,8 +13,9 @@ 

  

  #  WARNING  When rebasing to a new Python version,

  #           remember to update the python3-docs package as well

- Version: %{pybasever}.1

- Release: 4%{?dist}

+ Version: %{pybasever}.2

+ %global prerel rc1

+ Release: 0.1.%{prerel}%{?dist}

  License: Python

  

  
@@ -312,18 +313,6 @@ 

  # See: https://bugzilla.redhat.com/show_bug.cgi?id=1644936

  Patch312: 00312-revert-bpo-6721.patch

  

- # 00313 #

- # Verify the value of '-s' when execute the CLI of cProfile

- # http://bugs.python.org/issue23420

- # https://bugzilla.redhat.com/show_bug.cgi?id=1160640

- Patch313: 00313-cprofile-sort-option.patch

- 

- # 00315 #

- # Fix mktime() error in test_email

- # http://bugs.python.org/issue35317

- # https://bugzilla.redhat.com/show_bug.cgi?id=1652843

- Patch315: 00315-test_email-mktime.patch

- 

  # (New patches go here ^^^)

  #

  # When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@@ -427,8 +416,8 @@ 

  Requires: python-setuptools-wheel

  Requires: python-pip-wheel

  %else

- Provides: bundled(python3-pip) = 10.0.1

- Provides: bundled(python3-setuptools) = 39.0.1

+ Provides: bundled(python3-pip) = 18.1

+ Provides: bundled(python3-setuptools) = 40.6.2

  %endif

  

  # There are files in the standard library that have python shebang.
@@ -605,8 +594,8 @@ 

  Requires: python-setuptools-wheel

  Requires: python-pip-wheel

  %else

- Provides: bundled(python3-pip) = 10.0.1

- Provides: bundled(python3-setuptools) = 39.0.1

+ Provides: bundled(python3-pip) = 18.1

+ Provides: bundled(python3-setuptools) = 40.6.2

  %endif

  

  # The description for the flat package
@@ -656,8 +645,6 @@ 

  %patch274 -p1

  %patch291 -p1

  %patch312 -p1

- %patch313 -p1

- %patch315 -p1

  

  

  # Remove files that should be generated by the build
@@ -1354,6 +1341,7 @@ 

  %endif

  %{pylibdir}/distutils/command/wininst-*.exe

  %{_includedir}/python%{LDVERSION_optimized}/*.h

+ %{_includedir}/python%{LDVERSION_optimized}/internal/

  %doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit

  

  %if %{without flatpackage}
@@ -1574,6 +1562,9 @@ 

  # ======================================================

  

  %changelog

+ * Wed Dec 12 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.2-0.1.rc1

+ - Update to 3.7.2rc1

+ 

  * Wed Nov 21 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-4

  - Make sure the entire test.support module is in python3-libs (#1651245)

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (Python-3.7.1.tar.xz) = 3eb62a0127609b14420a47442727702f396519c649625aca59883d04f4c02e5f37ba1d58ac8e93c49d14a63f17ae7909315c33fc813293dbcdb6127f39a148b0

+ SHA512 (Python-3.7.2rc1.tar.xz) = 3a968a70424c928f1826379764e3d18a0c3367eb73e972b9596e2c94e43aac71a43d770c2da7c17ea2456675b7e018a2c3c4443bb5f6c5d179258dc43579567a

Already upstreamed patches: 313, 315
Patches rebased: 189 (new pip/setuptools versions only)

Metadata Update from @churchyard:
- Pull-request tagged with: blocked, update

5 years ago

This was not tested and waits for the CI. Also, I'd rather not push this to rawhide before 3.7.2 final.

rebased onto b4118b842fbf4bff1df494473cf799d00a211688

5 years ago

rebased onto 145267b

5 years ago

2 new commits added

  • Update to 3.7.2rc1
  • Remove unused patches
5 years ago

Note to self: When doing the final 3.7.2 update, update the docs package!

Pull-Request has been closed by churchyard

5 years ago