commit python-portpicker for openSUSE:Factory

2020-05-19 Thread root
Hello community,

here is the log from the commit of package python-portpicker for 
openSUSE:Factory checked in at 2020-05-19 14:49:19

Comparing /work/SRC/openSUSE:Factory/python-portpicker (Old)
 and  /work/SRC/openSUSE:Factory/.python-portpicker.new.2738 (New)


Package is "python-portpicker"

Tue May 19 14:49:19 2020 rev:3 rq:807043 version:1.3.1

Changes:

--- /work/SRC/openSUSE:Factory/python-portpicker/python-portpicker.changes  
2019-05-22 15:42:02.318427055 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-portpicker.new.2738/python-portpicker.changes
2020-05-19 14:49:21.976187444 +0200
@@ -1,0 +2,5 @@
+Mon May 18 20:33:40 UTC 2020 - Matej Cepl 
+
+- Don't use %python3_only command, but properly use alternatives.
+
+---



Other differences:
--
++ python-portpicker.spec ++
--- /var/tmp/diff_new_pack.dZr9bm/_old  2020-05-19 14:49:22.924189546 +0200
+++ /var/tmp/diff_new_pack.dZr9bm/_new  2020-05-19 14:49:22.932189565 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-portpicker
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,6 +27,8 @@
 Source0:
https://files.pythonhosted.org/packages/source/p/portpicker/portpicker-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 BuildArch:  noarch
 # SECTION test requirements
 BuildRequires:  %{python_module mock}
@@ -46,16 +48,23 @@
 
 %install
 %python_install
+%python_clone -a %{buildroot}%{_bindir}/portserver.py
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
 %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python 
src/tests/portpicker_test.py
 
+%post
+%python_install_alternative portserver.py
+
+%postun
+%python_uninstall_alternative portserver.py
+
 %files %{python_files}
 %license LICENSE
 %doc CONTRIBUTING.md README.md
 %{python_sitelib}/*
 # import asyncio
-%python3_only %{_bindir}/portserver.py
+%python_alternative %{_bindir}/portserver.py
 
 %changelog




commit python-portpicker for openSUSE:Factory

2019-05-22 Thread root
Hello community,

here is the log from the commit of package python-portpicker for 
openSUSE:Factory checked in at 2019-05-22 15:41:09

Comparing /work/SRC/openSUSE:Factory/python-portpicker (Old)
 and  /work/SRC/openSUSE:Factory/.python-portpicker.new.5148 (New)


Package is "python-portpicker"

Wed May 22 15:41:09 2019 rev:2 rq:704702 version:1.3.1

Changes:

--- /work/SRC/openSUSE:Factory/python-portpicker/python-portpicker.changes  
2015-12-09 22:31:35.0 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-portpicker.new.5148/python-portpicker.changes
2019-05-22 15:42:02.318427055 +0200
@@ -1,0 +2,18 @@
+Mon May 20 15:18:38 UTC 2019 - pgaj...@suse.com
+
+- version update to 1.3.1
+  * Fix a race condition in `pick_unused_port()` involving the free ports set.
+  * Adds an optional `portserver_address` parameter to `pick_unused_port()` so
+that callers can specify their own regardless of `os.environ`.
+  * `pick_unused_port()` now raises `NoFreePortFoundError` when no available 
port
+could be found rather than spinning in a loop trying forever.
+  * Fall back to `socket.AF_INET` when `socket.AF_UNIX` support is not 
available
+to communicate with a portserver.
+  * Introduced `add_reserved_port()` and `return_port()` APIs to allow ports to
+be recycled and allow users to bring ports of their own.
+  * Changed default port range to 15000-24999 to avoid ephemeral ports.
+  * Portserver bugfix.
+- convert to single spec
+- run test
+
+---

Old:

  portpicker-1.1.0.tar.gz

New:

  portpicker-1.3.1.tar.gz



Other differences:
--
++ python-portpicker.spec ++
--- /var/tmp/diff_new_pack.gyRcto/_old  2019-05-22 15:42:04.218427047 +0200
+++ /var/tmp/diff_new_pack.gyRcto/_new  2019-05-22 15:42:04.234427047 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-portpicker
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,28 +12,26 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
-%define upstream_name portpicker
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:   python-portpicker
-Version:1.1.0
+Version:1.3.1
 Release:0
 Summary:A library to choose unique available network ports
 License:Apache-2.0
 Group:  Development/Libraries/Python
-Url:https://github.com/google/python_portpicker
-Source0:%{upstream_name}-%{version}.tar.gz
-Requires:   python
-BuildRequires:  python-setuptools
-BuildRoot:  %{_tmppath}/%{name}-%{version}-build
-
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
+URL:https://github.com/google/python_portpicker
+Source0:
https://files.pythonhosted.org/packages/source/p/portpicker/portpicker-%{version}.tar.gz
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
 BuildArch:  noarch
-%endif
+# SECTION test requirements
+BuildRequires:  %{python_module mock}
+# /SECTION
+%python_subpackages
 
 %description
 Portpicker provides an API to find and return an available network port for
@@ -41,17 +39,23 @@
 harnesses that launch local servers.
 
 %prep
-%setup -q -n %{upstream_name}-%{version}
+%setup -q -n portpicker-%{version}
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
-%files
-%defattr(-,root,root,-)
-%doc CONTRIBUTING.md LICENSE README.md
-%{python_sitelib}/%{upstream_name}*
+%check
+%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python 
src/tests/portpicker_test.py
+
+%files %{python_files}
+%license LICENSE
+%doc CONTRIBUTING.md README.md
+%{python_sitelib}/*
+# import asyncio
+%python3_only %{_bindir}/portserver.py
 
 %changelog

++ portpicker-1.1.0.tar.gz -> portpicker-1.3.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/portpicker-1.1.0/ChangeLog.md 
new/portpicker-1.3.1/ChangeLog.md
--- old/portpicker-1.1.0/ChangeLog.md   1970-01-01 01:00:00.0 +0100
+++ new/portpicker-1.3.1/ChangeLog.md