#50 F31: Python 2.7.17
Merged 2 months ago by churchyard. Opened 2 months ago by churchyard.
rpms/ churchyard/python2 f31-2.7.17  into  f31

@@ -1,49 +0,0 @@ 

- diff -up Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows Python-2.7.3/Lib/test/test_os.py

- --- Python-2.7.3/Lib/test/test_os.py.uid-gid-overflows	2012-04-09 19:07:32.000000000 -0400

- +++ Python-2.7.3/Lib/test/test_os.py	2012-06-26 14:51:36.000817929 -0400

- @@ -677,30 +677,36 @@ if sys.platform != 'win32':

-      def test_setuid(self):

-          if os.getuid() != 0:

-              self.assertRaises(os.error, os.setuid, 0)

- +        self.assertRaises(TypeError, os.setuid, 'not an int')

-          self.assertRaises(OverflowError, os.setuid, 1<<32)

-  

-      @unittest.skipUnless(hasattr(os, 'setgid'), 'test needs os.setgid()')

-      def test_setgid(self):

-          if os.getuid() != 0:

-              self.assertRaises(os.error, os.setgid, 0)

- +        self.assertRaises(TypeError, os.setgid, 'not an int')

-          self.assertRaises(OverflowError, os.setgid, 1<<32)

-  

-      @unittest.skipUnless(hasattr(os, 'seteuid'), 'test needs os.seteuid()')

-      def test_seteuid(self):

-          if os.getuid() != 0:

-              self.assertRaises(os.error, os.seteuid, 0)

- +        self.assertRaises(TypeError, os.seteuid, 'not an int')

-          self.assertRaises(OverflowError, os.seteuid, 1<<32)

-  

-      @unittest.skipUnless(hasattr(os, 'setegid'), 'test needs os.setegid()')

-      def test_setegid(self):

-          if os.getuid() != 0:

-              self.assertRaises(os.error, os.setegid, 0)

- +        self.assertRaises(TypeError, os.setegid, 'not an int')

-          self.assertRaises(OverflowError, os.setegid, 1<<32)

-  

-      @unittest.skipUnless(hasattr(os, 'setreuid'), 'test needs os.setreuid()')

-      def test_setreuid(self):

-          if os.getuid() != 0:

-              self.assertRaises(os.error, os.setreuid, 0, 0)

- +        self.assertRaises(TypeError, os.setreuid, 'not an int', 0)

- +        self.assertRaises(TypeError, os.setreuid, 0, 'not an int')

-          self.assertRaises(OverflowError, os.setreuid, 1<<32, 0)

-          self.assertRaises(OverflowError, os.setreuid, 0, 1<<32)

-  

- @@ -715,6 +721,8 @@ if sys.platform != 'win32':

-      def test_setregid(self):

-          if os.getuid() != 0:

-              self.assertRaises(os.error, os.setregid, 0, 0)

- +        self.assertRaises(TypeError, os.setregid, 'not an int', 0)

- +        self.assertRaises(TypeError, os.setregid, 0, 'not an int')

-          self.assertRaises(OverflowError, os.setregid, 1<<32, 0)

-          self.assertRaises(OverflowError, os.setregid, 0, 1<<32)

-  

@@ -1,12 +0,0 @@ 

- diff -up Python-2.6.6/Lib/distutils/sysconfig.py.distutils-cflags Python-2.6.6/Lib/distutils/sysconfig.py

- --- Python-2.6.6/Lib/distutils/sysconfig.py.distutils-cflags	2011-08-12 17:18:17.833091153 -0400

- +++ Python-2.6.6/Lib/distutils/sysconfig.py	2011-08-12 17:18:27.449106938 -0400

- @@ -187,7 +187,7 @@ def customize_compiler(compiler):

-          if 'LDFLAGS' in os.environ:

-              ldshared = ldshared + ' ' + os.environ['LDFLAGS']

-          if 'CFLAGS' in os.environ:

- -            cflags = opt + ' ' + os.environ['CFLAGS']

- +            cflags = cflags + ' ' + os.environ['CFLAGS']

-              ldshared = ldshared + ' ' + os.environ['CFLAGS']

-          if 'CPPFLAGS' in os.environ:

-              cpp = cpp + ' ' + os.environ['CPPFLAGS']

file modified
+2 -2

@@ -18,10 +18,10 @@ 

   __all__ = ["version", "bootstrap"]

   

   

- -_SETUPTOOLS_VERSION = "40.6.2"

+ -_SETUPTOOLS_VERSION = "41.2.0"

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

   

- -_PIP_VERSION = "18.1"

+ -_PIP_VERSION = "19.2.3"

  +def _get_most_recent_wheel_version(pkg):

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

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

file modified
+11 -35

@@ -118,11 +118,11 @@ 

  Summary: An interpreted, interactive, object-oriented programming language

  Name: %{python}

  # Remember to also rebase python2-docs when changing this:

- %global general_version %{pybasever}.16

+ %global general_version %{pybasever}.17

  #global prerel ...

  %global upstream_version %{general_version}%{?prerel}

  Version: %{general_version}%{?prerel:~%{prerel}}

- Release: 4%{?dist}

+ Release: 1%{?dist}

  License: Python

  Requires: %{python}-libs%{?_isa} = %{version}-%{release}

  Provides: python(abi) = %{pybasever}

@@ -219,7 +219,7 @@ 

  # Source code and patches

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

  

- Source: https://www.python.org/ftp/python/%{version}/Python-%{upstream_version}.tar.xz

+ Source: https://www.python.org/ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz

  

  # Work around bug 562906 until it's fixed in rpm-build by providing a fixed

  # version of pythondeps.sh:

@@ -624,22 +624,6 @@ 

  # Not yet sent upstream

  Patch156: 00156-gdb-autoload-safepath.patch

  

- # 00157 #

- # Update uid/gid handling throughout the standard library: uid_t and gid_t are

- # unsigned 32-bit values, but existing code often passed them through C long

- # values, which are signed 32-bit values on 32-bit architectures, leading to

- # negative int objects for uid/gid values >= 2^31 on 32-bit architectures.

- #

- # Introduce _PyObject_FromUid/Gid to convert uid_t/gid_t values to python

- # objects, using int objects where the value will fit (long objects otherwise),

- # and _PyArg_ParseUid/Gid to convert int/long to uid_t/gid_t, with -1 allowed

- # as a special case (since this is given special meaning by the chown syscall)

- #

- # Update standard library to use this throughout for uid/gid values, so that

- # very large uid/gid values are round-trippable, and -1 remains usable.

- # (rhbz#697470)

- Patch157: 00157-uid-gid-overflows.patch

- 

  # 00165 #

  # Backport to Python 2 from Python 3.3 of improvements to the "crypt" module

  # adding precanned ways of salting a password (rhbz#835021)

@@ -658,18 +642,6 @@ 

  # Not yet sent upstream

  Patch167: 00167-disable-stack-navigation-tests-when-optimized-in-test_gdb.patch

  

- # 00168 #

- # Update distutils.sysconfig so that if CFLAGS is defined in the environment,

- # when building extension modules, it is appended to the full compilation

- # flags from Python's Makefile, rather than instead reducing the compilation

- # flags to the subset within OPT and adding it to those.

- #

- # In particular, this should ensure that "-fno-strict-aliasing" is used by

- # "python setup.py build" even when CFLAGS is defined in the environment.

- #

- # (rhbz#849994)

- Patch168: 00168-distutils-cflags.patch

- 

  # 00169 #

  # Use SHA-256 rather than implicitly using MD5 within the challenge handling

  # in multiprocessing.connection

@@ -808,8 +780,8 @@ 

  Requires: python-setuptools-wheel

  Requires: python-pip-wheel

  %else

- Provides: bundled(python2-pip) = 18.1

- Provides: bundled(python2-setuptools) = 40.6.2

+ Provides: bundled(python2-pip) = 19.2.3

+ Provides: bundled(python2-setuptools) = 41.2.0

  %endif

  

  %{?python_provide:%python_provide python2-libs}

@@ -1054,11 +1026,9 @@ 

  %patch147 -p1

  %patch155 -p1

  %patch156 -p1

- %patch157 -p1

  %patch165 -p1

  mv Modules/cryptmodule.c Modules/_cryptmodule.c

  %patch167 -p1

- %patch168 -p1

  %patch169 -p1

  %patch170 -p1

  %patch174 -p1 -b .fix-for-usr-move

@@ -1974,6 +1944,12 @@ 

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

  

  %changelog

+ * Sun Oct 20 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.17-1

+ - Update to 2.7.17

+ 

+ * Wed Oct 09 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.17~rc1-1

+ - Rebase to 2.7.17rc1

+ 

  * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.16-4

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

  

file modified
+1 -1

@@ -1,1 +1,1 @@ 

- SHA512 (Python-2.7.16.tar.xz) = 16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0

+ SHA512 (Python-2.7.17.tar.xz) = 2dc19a0b0d818c71429dae94783e58b2aac0fa31f5faa1e840cac06245a59932ecc4658d913515736601bcf70a78c9ec60367aed75f4567d1e41ff3bb104da9a

LGTM.

It's good to see that we need less downstream patches. For distutils, I put it upstream ;-)

"This bug has been fixed since 2013 in Fedora and RHEL by this patch: (...)"
https://bugs.python.org/issue36235

Pull-Request has been merged by churchyard

2 months ago

Failed i686 job: https://koji.fedoraproject.org/koji/taskinfo?taskID=38423372

I'm unable to reproduce the issue on my laptop on the 2.7 development branch, even with "./python -m test -u all -j100 -W -F test_docxmlrpc" running for 5 minutes. It looks like an unlikely race condition.

If the bug strikes back, we can add -w to EXTRATESTOPTS in CheckPython (of python2.spec).

0:00:47 load avg: 0.92 [115/404] test_docxmlrpc -- test_dl skipped
test_autolink_dotted_methods (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test that selfdot values are made strong automatically in the ... /builddir/build/BUILD/Python-2.7.17/Lib/threading.py:849: DeprecationWarning: sys.exc_clear() not supported in 3.x; use except clauses
  self.__exc_clear()
ok
test_autolinking (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test that the server correctly automatically wraps references to ... ok
test_invalid_get_response (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) ... ok
test_lambda (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test that lambda functionality stays the same.  The output produced ... ERROR
test_server_title_escape (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test that the server title and documentation ... ok
test_system_methods (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test the presence of three consecutive system.* methods. ... ok
test_valid_get_response (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) ... test test_docxmlrpc failed -- Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-2.7.17/Lib/test/test_docxmlrpc.py", line 106, in test_lambda
    response = self.client.getresponse()
  File "/builddir/build/BUILD/Python-2.7.17/Lib/httplib.py", line 1148, in getresponse
    response.begin()
  File "/builddir/build/BUILD/Python-2.7.17/Lib/httplib.py", line 448, in begin
    version, status, reason = self._read_status()
  File "/builddir/build/BUILD/Python-2.7.17/Lib/httplib.py", line 404, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/builddir/build/BUILD/Python-2.7.17/Lib/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer
ok
======================================================================
ERROR: test_lambda (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test that lambda functionality stays the same.  The output produced
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-2.7.17/Lib/test/test_docxmlrpc.py", line 106, in test_lambda
    response = self.client.getresponse()
  File "/builddir/build/BUILD/Python-2.7.17/Lib/httplib.py", line 1148, in getresponse
    response.begin()
  File "/builddir/build/BUILD/Python-2.7.17/Lib/httplib.py", line 448, in begin
    version, status, reason = self._read_status()
  File "/builddir/build/BUILD/Python-2.7.17/Lib/httplib.py", line 404, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/builddir/build/BUILD/Python-2.7.17/Lib/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer
----------------------------------------------------------------------
Ran 7 tests in 3.554s
FAILED (errors=1)

simple koji CI failed on i686. Here is a retest: ...

That's 3 successful i686 jobs so yeah, it's just a race condition in the test itself, not a bug in Python.