[13/35] python3-daemon: Update to version 2.3.0 and python-3.10

Message ID 20220124161656.71960-13-adolf.belka@ipfire.org
State Accepted
Commit 81c5597cc909de8f7abd0fc2fb649c8cc7e407a5
Headers
Series [01/35] python3: Update to version 3.10.1 |

Commit Message

Adolf Belka Jan. 24, 2022, 4:16 p.m. UTC
  - Update from 2.1.1 (2016) to 2.3.0 (2021)
- Update of rootfile
- A build dependency has been added for twine. As this is to support the upload of
   packages to PyPI it will not be used for IPFire. The changelog just notes the addition
   of twine as a build dependency without any explanation. See entry in version 2.2.4
   No other change was made when this dependency was added to setup.py
  Adding twine added 9 further dependencies some of which caused further dependencies and
   so on. 19 additional new packages were reached and the system was still coming up with
   more.
  Created a patch to remove the twine build dependency from setup.py
  Subsequently found other people had done the same thing as there was no response to
   requests from other people to not have it as a build dependency for situations where
   packages were not going to be uploaded to PyPI.
- Changelog
Version 2.3.0
:Released: 2021-02-21
:Maintainer: Ben Finney <ben+python@benfinney.id.au>
Removed:
* Remove support for Python versions older than Python 3.
  Python 2 has been unsupported by the Python project since 2020.
* Remove dependency on back-ported `unittest2` and `mock`.
  Depend instead on standard library `unittest` and `unittest.mock`.
  Thanks to Michał Górny for the merge requests.
Version 2.2.4
:Released: 2019-10-27
:Maintainer: Ben Finney <ben+python@benfinney.id.au>
Bugs Fixed:
* Run the Setuptools `egg-info` command as part of the `build`
  command.
  Closes: Pagure #31. Thanks to Stanislav Levin for the bug report and
  diagnosis.
* Create the socket and catch “non-socket” errors.
  Closes: Pagure #34. Thanks to Miro Hrončok for the bug report and
  patch.
* Only deal with a range of file descriptors if the range is not empty.
  Closes: Pagure #39. Thanks to Alex Pyrgiotis for the test scenario.
* Declare Twine as a build dependency.
* Reformat the change log entries with keepachangelog.com sub-sections.
Changed:
* Upgrade Tox dependency to version “3.7.0”.
  Thanks to Miro Hrončok for the contribution.
* Significant speed-up to discovery of file descriptors to close.
  By using a native `tuple` for the heavily-used file descriptor range
  representation, this gives approximately 5× faster calls to
  `close_all_open_files` in the typical case. This partially addresses
  Pagure #40.
  Thanks to Alex Pyrgiotis for testing various alternative proposals.
* Refactor the build system to use Makefile modules for each topic.
Version 2.2.3
:Released: 2019-01-21
:Maintainer: Ben Finney <ben+python@benfinney.id.au>
Bugs Fixed:
* Use custom fake file type for testing `fileno` behaviour.
  This works around an incompatibility in Python 2.7 `file` type that
  caused test cases to fail.
Deprecated:
* Promote the warning for `runner` module to a `DeprecationWarning`.
  This has been an unofficial example module from the beginning, and
  it will be removed in a future version.
Version 2.2.2
:Released: 2019-01-19
:Maintainer: Ben Finney <ben+python@benfinney.id.au>
Bugs Fixed:
* Remove from the build system specification a white space character
  not permitted in TOML format.
Added:
* Implement test suite automation in virtualenvs, using Tox.
Version 2.2.1
:Released: 2019-01-18
:Maintainer: Ben Finney <ben+python@benfinney.id.au>
Added:
* Add a :PEP:`518` conformant build system specification (the
  ``pyproject.toml`` file).
Version 2.2.0
:Released: 2018-08-15
:Maintainer: Ben Finney <ben+python@benfinney.id.au>
Bugs Fixed:
* Correct the description of the return value for
  `daemon.is_detach_process_context_required`.
  Closes: Pagure #6.
* Set a sensible default for `Distribution.script_name`.
  This works around a bug in Setuptools which calls commands before
  the `Distribution` is initialised.
  Closes: Pagure #2.
Changed:
* The test suite now relies on the test discovery feature in
  ‘unittest’. This feature is in Python version 2.7 and later.
* Improve performance of `daemon.close_all_open_files`.
  Thanks to Darek Działak for the implementation.
  Closes: Pagure #10.
Version 2.1.2
:Released: 2016-10-26
:Maintainer: Ben Finney <ben+python@benfinney.id.au>
Added:
* Add a README document for the code base.
Changed:
* Migrate code project hosting to Pagure.
  Record the change of homepage URL in PyPI metadata.
Deprecated:
* Raise a warning that the ‘runner’ module is pending deprecation.
  This has been an unofficial example module from the beginning, and
  it will be removed in a future version.
Bugs Fixed:
* Ensure custom types are part of the Python type hierarchy.
* Avoid a circular dependency for the version string at install time.
  Thanks to Maarten van Gompel for the reproducible test case.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/common/python3-daemon        | 27 +++++++++----------
 lfs/python3-daemon                            |  5 ++--
 ...move-twine-requirement-from-setup.py.patch | 10 +++++++
 3 files changed, 26 insertions(+), 16 deletions(-)
 create mode 100644 src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch
  

Comments

Peter Müller Jan. 28, 2022, 12:56 p.m. UTC | #1
This one was definitely in need of an update as well...

Reviewed-by: Peter Müller <peter.mueller@ipfire.org>


> - Update from 2.1.1 (2016) to 2.3.0 (2021)
> - Update of rootfile
> - A build dependency has been added for twine. As this is to support the upload of
>    packages to PyPI it will not be used for IPFire. The changelog just notes the addition
>    of twine as a build dependency without any explanation. See entry in version 2.2.4
>    No other change was made when this dependency was added to setup.py
>   Adding twine added 9 further dependencies some of which caused further dependencies and
>    so on. 19 additional new packages were reached and the system was still coming up with
>    more.
>   Created a patch to remove the twine build dependency from setup.py
>   Subsequently found other people had done the same thing as there was no response to
>    requests from other people to not have it as a build dependency for situations where
>    packages were not going to be uploaded to PyPI.
> - Changelog
> Version 2.3.0
> :Released: 2021-02-21
> :Maintainer: Ben Finney <ben+python@benfinney.id.au>
> Removed:
> * Remove support for Python versions older than Python 3.
>   Python 2 has been unsupported by the Python project since 2020.
> * Remove dependency on back-ported `unittest2` and `mock`.
>   Depend instead on standard library `unittest` and `unittest.mock`.
>   Thanks to Michał Górny for the merge requests.
> Version 2.2.4
> :Released: 2019-10-27
> :Maintainer: Ben Finney <ben+python@benfinney.id.au>
> Bugs Fixed:
> * Run the Setuptools `egg-info` command as part of the `build`
>   command.
>   Closes: Pagure #31. Thanks to Stanislav Levin for the bug report and
>   diagnosis.
> * Create the socket and catch “non-socket” errors.
>   Closes: Pagure #34. Thanks to Miro Hrončok for the bug report and
>   patch.
> * Only deal with a range of file descriptors if the range is not empty.
>   Closes: Pagure #39. Thanks to Alex Pyrgiotis for the test scenario.
> * Declare Twine as a build dependency.
> * Reformat the change log entries with keepachangelog.com sub-sections.
> Changed:
> * Upgrade Tox dependency to version “3.7.0”.
>   Thanks to Miro Hrončok for the contribution.
> * Significant speed-up to discovery of file descriptors to close.
>   By using a native `tuple` for the heavily-used file descriptor range
>   representation, this gives approximately 5× faster calls to
>   `close_all_open_files` in the typical case. This partially addresses
>   Pagure #40.
>   Thanks to Alex Pyrgiotis for testing various alternative proposals.
> * Refactor the build system to use Makefile modules for each topic.
> Version 2.2.3
> :Released: 2019-01-21
> :Maintainer: Ben Finney <ben+python@benfinney.id.au>
> Bugs Fixed:
> * Use custom fake file type for testing `fileno` behaviour.
>   This works around an incompatibility in Python 2.7 `file` type that
>   caused test cases to fail.
> Deprecated:
> * Promote the warning for `runner` module to a `DeprecationWarning`.
>   This has been an unofficial example module from the beginning, and
>   it will be removed in a future version.
> Version 2.2.2
> :Released: 2019-01-19
> :Maintainer: Ben Finney <ben+python@benfinney.id.au>
> Bugs Fixed:
> * Remove from the build system specification a white space character
>   not permitted in TOML format.
> Added:
> * Implement test suite automation in virtualenvs, using Tox.
> Version 2.2.1
> :Released: 2019-01-18
> :Maintainer: Ben Finney <ben+python@benfinney.id.au>
> Added:
> * Add a :PEP:`518` conformant build system specification (the
>   ``pyproject.toml`` file).
> Version 2.2.0
> :Released: 2018-08-15
> :Maintainer: Ben Finney <ben+python@benfinney.id.au>
> Bugs Fixed:
> * Correct the description of the return value for
>   `daemon.is_detach_process_context_required`.
>   Closes: Pagure #6.
> * Set a sensible default for `Distribution.script_name`.
>   This works around a bug in Setuptools which calls commands before
>   the `Distribution` is initialised.
>   Closes: Pagure #2.
> Changed:
> * The test suite now relies on the test discovery feature in
>   ‘unittest’. This feature is in Python version 2.7 and later.
> * Improve performance of `daemon.close_all_open_files`.
>   Thanks to Darek Działak for the implementation.
>   Closes: Pagure #10.
> Version 2.1.2
> :Released: 2016-10-26
> :Maintainer: Ben Finney <ben+python@benfinney.id.au>
> Added:
> * Add a README document for the code base.
> Changed:
> * Migrate code project hosting to Pagure.
>   Record the change of homepage URL in PyPI metadata.
> Deprecated:
> * Raise a warning that the ‘runner’ module is pending deprecation.
>   This has been an unofficial example module from the beginning, and
>   it will be removed in a future version.
> Bugs Fixed:
> * Ensure custom types are part of the Python type hierarchy.
> * Avoid a circular dependency for the version string at install time.
>   Thanks to Maarten van Gompel for the reproducible test case.
> 
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
>  config/rootfiles/common/python3-daemon        | 27 +++++++++----------
>  lfs/python3-daemon                            |  5 ++--
>  ...move-twine-requirement-from-setup.py.patch | 10 +++++++
>  3 files changed, 26 insertions(+), 16 deletions(-)
>  create mode 100644 src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch
> 
> diff --git a/config/rootfiles/common/python3-daemon b/config/rootfiles/common/python3-daemon
> index 653dee7d4..24ec26c0b 100644
> --- a/config/rootfiles/common/python3-daemon
> +++ b/config/rootfiles/common/python3-daemon
> @@ -1,14 +1,13 @@
> -#usr/lib/python3.8/site-packages/daemon
> -usr/lib/python3.8/site-packages/daemon/__init__.py
> -usr/lib/python3.8/site-packages/daemon/_metadata.py
> -usr/lib/python3.8/site-packages/daemon/daemon.py
> -usr/lib/python3.8/site-packages/daemon/pidfile.py
> -usr/lib/python3.8/site-packages/daemon/runner.py
> -#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info
> -#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/PKG-INFO
> -#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/SOURCES.txt
> -#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/dependency_links.txt
> -#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/not-zip-safe
> -#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/requires.txt
> -#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/top_level.txt
> -#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/version_info.json
> +#usr/lib/python3.10/site-packages/daemon
> +usr/lib/python3.10/site-packages/daemon/__init__.py
> +usr/lib/python3.10/site-packages/daemon/_metadata.py
> +usr/lib/python3.10/site-packages/daemon/daemon.py
> +usr/lib/python3.10/site-packages/daemon/pidfile.py
> +usr/lib/python3.10/site-packages/daemon/runner.py
> +#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info
> +#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/PKG-INFO
> +#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/SOURCES.txt
> +#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/dependency_links.txt
> +#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/not-zip-safe
> +#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/requires.txt
> +#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/top_level.txt
> diff --git a/lfs/python3-daemon b/lfs/python3-daemon
> index 8f0876ff7..d17b8ac95 100644
> --- a/lfs/python3-daemon
> +++ b/lfs/python3-daemon
> @@ -24,7 +24,7 @@
>  
>  include Config
>  
> -VER        = 2.1.1
> +VER        = 2.3.0
>  
>  THISAPP    = python-daemon-$(VER)
>  DL_FILE    = $(THISAPP).tar.gz
> @@ -40,7 +40,7 @@ objects = $(DL_FILE)
>  
>  $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
>  
> -$(DL_FILE)_MD5 = 72e2acf2c3d69c7fa75a6625d06adfd0
> +$(DL_FILE)_MD5 = 71a7d14d4d698d847dcf53656d9b8b71
>  
>  install : $(TARGET)
>  
> @@ -70,6 +70,7 @@ $(subst %,%_MD5,$(objects)) :
>  $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
>  	@$(PREBUILD)
>  	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
> +	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch
>  	cd $(DIR_APP) && python3 setup.py install --root=/
>  	@rm -rf $(DIR_APP)
>  	@$(POSTBUILD)
> diff --git a/src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch b/src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch
> new file mode 100644
> index 000000000..bbe5196f0
> --- /dev/null
> +++ b/src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch
> @@ -0,0 +1,10 @@
> +--- python-daemon-2.3.0/setup.py_orig	2021-02-21 06:45:31.000000000 +0100
> ++++ python-daemon-2.3.0/setup.py	2022-01-07 14:38:01.612173070 +0100
> +@@ -66,7 +66,6 @@
> +         zip_safe=False,
> +         setup_requires=[
> +             "docutils",
> +-            "twine",
> +             ],
> +         test_suite="setup.test_suite",
> +         tests_require=test_requirements,
  

Patch

diff --git a/config/rootfiles/common/python3-daemon b/config/rootfiles/common/python3-daemon
index 653dee7d4..24ec26c0b 100644
--- a/config/rootfiles/common/python3-daemon
+++ b/config/rootfiles/common/python3-daemon
@@ -1,14 +1,13 @@ 
-#usr/lib/python3.8/site-packages/daemon
-usr/lib/python3.8/site-packages/daemon/__init__.py
-usr/lib/python3.8/site-packages/daemon/_metadata.py
-usr/lib/python3.8/site-packages/daemon/daemon.py
-usr/lib/python3.8/site-packages/daemon/pidfile.py
-usr/lib/python3.8/site-packages/daemon/runner.py
-#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info
-#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/PKG-INFO
-#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/SOURCES.txt
-#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/dependency_links.txt
-#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/not-zip-safe
-#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/requires.txt
-#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/top_level.txt
-#usr/lib/python3.8/site-packages/python_daemon-2.1.1-py3.8.egg-info/version_info.json
+#usr/lib/python3.10/site-packages/daemon
+usr/lib/python3.10/site-packages/daemon/__init__.py
+usr/lib/python3.10/site-packages/daemon/_metadata.py
+usr/lib/python3.10/site-packages/daemon/daemon.py
+usr/lib/python3.10/site-packages/daemon/pidfile.py
+usr/lib/python3.10/site-packages/daemon/runner.py
+#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info
+#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/PKG-INFO
+#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/SOURCES.txt
+#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/dependency_links.txt
+#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/not-zip-safe
+#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/requires.txt
+#usr/lib/python3.10/site-packages/python_daemon-2.3.0-py3.10.egg-info/top_level.txt
diff --git a/lfs/python3-daemon b/lfs/python3-daemon
index 8f0876ff7..d17b8ac95 100644
--- a/lfs/python3-daemon
+++ b/lfs/python3-daemon
@@ -24,7 +24,7 @@ 
 
 include Config
 
-VER        = 2.1.1
+VER        = 2.3.0
 
 THISAPP    = python-daemon-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -40,7 +40,7 @@  objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 72e2acf2c3d69c7fa75a6625d06adfd0
+$(DL_FILE)_MD5 = 71a7d14d4d698d847dcf53656d9b8b71
 
 install : $(TARGET)
 
@@ -70,6 +70,7 @@  $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch
 	cd $(DIR_APP) && python3 setup.py install --root=/
 	@rm -rf $(DIR_APP)
 	@$(POSTBUILD)
diff --git a/src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch b/src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch
new file mode 100644
index 000000000..bbe5196f0
--- /dev/null
+++ b/src/patches/python3-daemon-2.3.0-remove-twine-requirement-from-setup.py.patch
@@ -0,0 +1,10 @@ 
+--- python-daemon-2.3.0/setup.py_orig	2021-02-21 06:45:31.000000000 +0100
++++ python-daemon-2.3.0/setup.py	2022-01-07 14:38:01.612173070 +0100
+@@ -66,7 +66,6 @@
+         zip_safe=False,
+         setup_requires=[
+             "docutils",
+-            "twine",
+             ],
+         test_suite="setup.test_suite",
+         tests_require=test_requirements,