#2 Upgrade python-docker to 3.4.1
Closed 2 years ago by carlwgeorge. Opened 4 years ago by achichmanian.
rpms/ achichmanian/python3-docker epel7  into  epel7

Adding the patch for environment markers
Alexandre Chichmanian • 4 years ago  
Upgrade to 3.4.1
Alexandre Chichmanian • 4 years ago  
file modified
+3
@@ -1,1 +1,4 @@ 

  /docker-2.6.1.tar.gz

+ /docker-3.4.1.tar.gz

+ /python3-docker-3.4.1-4.el7.src.rpm

+ /results_python3-docker

file modified
+6 -12
@@ -3,8 +3,8 @@ 

  %global srcname docker

  

  Name:           python3-%{srcname}

- Version:        2.6.1

- Release:        3%{?dist}

+ Version:        3.4.1

+ Release:        4%{?dist}

  Summary:        A Python library for the Docker Engine API

  License:        ASL 2.0

  URL:            https://pypi.python.org/pypi/%{srcname}
@@ -14,17 +14,8 @@ 

  # Environment markers were first added in setuptools 20.6.8, so that doesn't

  # work in RHEL.  This patch converts those environment markers into simple if

  # statements.

- Patch2:         remove-environment-markers.patch

+ Patch1:         remove-environment-markers.patch

  

- # Upstream uses pip to check if the older docker-py module is installed.  We

- # handle that with an obsolete.

- Patch3:         remove-pip-dependency.patch

- 

- # Some of the test use pytest.deprecated_call as a context manager.  That

- # capability was added in pytest 2.9.0+, but currently RHEL only ships 2.7.0.

- # This patch reverts the context manager usage to the traditional function

- # call.

- Patch4:         remove-pytest-deprecated_call-context-manager.patch

  

  BuildArch:      noarch

  
@@ -83,6 +74,9 @@ 

  

  

  %changelog

+ * Fri May 08 2020 Alexandre Chichmanian <achichmanian@linagora.com>

+ - Upgrade to python-docker 3.4.1

+ 

  * Thu Mar 07 2019 Carl George <carl@george.computer> - 2.6.1-3

  - Drop backports-ssl_match_hostname requirement for py34->py36 switch

  

@@ -1,12 +1,16 @@ 

- Generate requirements list dynamically instead of using environment markers.

- This allows using versions of setuptools older than 20.6.8.

- 

- diff -Nurp docker-2.5.1.orig/setup.py docker-2.5.1/setup.py

- --- docker-2.5.1.orig/setup.py	2017-08-22 18:44:35.000000000 -0500

- +++ docker-2.5.1/setup.py	2017-09-05 12:06:03.280017598 -0500

- @@ -29,23 +29,14 @@ requirements = [

-  if sys.platform == 'win32':

-      requirements.append('pypiwin32 >= 219')

+ --- docker-3.4.1.orig/setup.py	2020-05-26 10:01:21.780821688 -0400

+ +++ docker-3.4.1/setup.py	2020-05-26 10:26:45.268184688 -0400

+ @@ -3,6 +3,7 @@ from __future__ import print_function

+  

+  import codecs

+  import os

+ +import sys 

+  

+  from setuptools import setup, find_packages

+  

+ @@ -16,29 +17,15 @@ requirements = [

+      'docker-pycreds >= 0.3.0'

+  ]

   

  -extras_require = {

  -    ':python_version < "3.5"': 'backports.ssl_match_hostname >= 3.5',
@@ -15,6 +19,12 @@ 

  -    # ServerAltname: https://pypi.python.org/pypi/backports.ssl_match_hostname

  -    ':python_version < "3.3"': 'ipaddress >= 1.0.16',

  -

+ -    # win32 APIs if on Windows (required for npipe support)

+ -    # Python 3.6 is only compatible with v220 ; Python < 3.5 is not supported

+ -    # on v220 ; ALL versions are broken for v222 (as of 2018-01-26)

+ -    ':sys_platform == "win32" and python_version < "3.6"': 'pypiwin32==219',

+ -    ':sys_platform == "win32" and python_version >= "3.6"': 'pypiwin32==220',

+ -

  -    # If using docker-py over TLS, highly recommend this option is

  -    # pip-installed or pinned.

  -
@@ -33,10 +43,11 @@ 

  +# ServerAltname: https://pypi.python.org/pypi/backports.ssl_match_hostname

  +if sys.version_info[:2] < (3, 3):

  +    requirements.append('ipaddress >= 1.0.16')

+ +

   

   version = None

   exec(open('docker/version.py').read())

- @@ -72,7 +63,6 @@ setup(

+ @@ -65,7 +52,6 @@ setup(

       packages=find_packages(exclude=["tests.*", "tests"]),

       install_requires=requirements,

       tests_require=test_requirements,

@@ -1,21 +0,0 @@ 

- diff -Nurp docker-2.5.1.orig/setup.py docker-2.5.1/setup.py

- --- docker-2.5.1.orig/setup.py	2017-08-22 18:44:35.000000000 -0500

- +++ docker-2.5.1/setup.py	2017-09-05 11:56:27.542146668 -0500

- @@ -5,17 +5,8 @@ import codecs

-  import os

-  import sys

-  

- -import pip

- -

-  from setuptools import setup, find_packages

-  

- -if 'docker-py' in [x.project_name for x in pip.get_installed_distributions()]:

- -    print(

- -        'ERROR: "docker-py" needs to be uninstalled before installing this'

- -        ' package:\npip uninstall docker-py', file=sys.stderr

- -    )

- -    sys.exit(1)

- -

-  ROOT_DIR = os.path.dirname(__file__)

-  SOURCE_DIR = os.path.join(ROOT_DIR)

-  

@@ -1,23 +0,0 @@ 

- diff -Nurp docker-2.6.1.orig/tests/unit/api_container_test.py docker-2.6.1/tests/unit/api_container_test.py

- --- docker-2.6.1.orig/tests/unit/api_container_test.py	2017-10-24 17:14:49.000000000 -0500

- +++ docker-2.6.1/tests/unit/api_container_test.py	2018-01-22 10:11:47.198033614 -0600

- @@ -246,8 +246,7 @@ class CreateContainerTest(BaseAPIClientT

-                           {'Content-Type': 'application/json'})

-  

-      def test_create_container_with_cpu_shares(self):

- -        with pytest.deprecated_call():

- -            self.client.create_container('busybox', 'ls', cpu_shares=5)

- +        pytest.deprecated_call(self.client.create_container, 'busybox', 'ls', cpu_shares=5)

-  

-          args = fake_request.call_args

-          self.assertEqual(args[0][1],

- @@ -292,8 +291,7 @@ class CreateContainerTest(BaseAPIClientT

-                           {'Content-Type': 'application/json'})

-  

-      def test_create_container_with_cpuset(self):

- -        with pytest.deprecated_call():

- -            self.client.create_container('busybox', 'ls', cpuset='0,1')

- +        pytest.deprecated_call(self.client.create_container, 'busybox', 'ls', cpuset='0,1')

-  

-          args = fake_request.call_args

-          self.assertEqual(args[0][1],

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

- SHA512 (docker-2.6.1.tar.gz) = 17a66a0133ca1c13789a9816063570ec77901d6c7a41d819147a4a427fa806f6af6737e506ba3f5b108b7ee2eb150b26fafbbc4e500b097a940ece654d50f29a

+ SHA512 (docker-3.4.1.tar.gz) = 5df4bfb6c171a1b10fbf3d871023e53579ba4977c952db0d8093269da111111584f41d477a350b05523895a5153757f31f39aa50fb4d3c98d3fabd2a9b56019a

Upgrade to python-docker 3.4.1 containing new classes that may be needed by some applications

@achichmanian Can you point the others PR that are needed in order to update this one ?
Can you confirm that the removed patches are indeed obsolete ? (merged upstream somehow ?).

1 new commit added

  • Adding the patch for environment markers
4 years ago

@kwizart I don't think other PR are needed to update this one. I ran a mockbuild on my side and everything worked. I used the genereated package for another component (docker-compose) and it was working.

For the patch I just modified one of the patch and the build worked correctly. Concerning the 2 others they've been modified directly with the new version of python-docker, so no need to keep them.

I meant PR from others packages, indeed.

Thanks for the patch update...

The release should be back to 1 and the first line of the changelog should end with version-release.

@kwizart I have confirmed the patch removals. remove-pip-dependency.patch is no longer needed since version 3.3.0. remove-pytest-deprecated_call-context-manager.patch is no longer needed since version 3.0.0.

@achichmanian Instead of rebasing remove-environment-markers.patch, we can just remove it. It was necessary at the time because EPEL 7 only had python3-setuptools 19.6.2, which didn't support environment markers. RHEL 7 now provides python3-setuptools 39.2.0.

Please also fix the release and changelog as @lbalhar pointed out, and remove the extra (non-tarball) entries in .gitignore.

I just realized that this update will introduce breaking changes. I don't have an issue with that, but you'll need to follow the EPEL incompatible upgrades policy first.

That also makes me wonder, if we're pushing through breaking changes, why not update all the way to the latest version 4.3.1 (which has its own batch of breaking changes)?

Is there any plan to finish this?

Closing due to lack of feedback.

Pull-Request has been closed by carlwgeorge

2 years ago