openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
March 2020
- 1 participants
- 5800 discussions
Hello community,
here is the log from the commit of package python-requests-toolbelt for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-requests-toolbelt (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-requests-toolbelt.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-requests-toolbelt"
Sun Mar 1 08:50:59 2020 rev:11 rq:780503 version:0.9.1
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-requests-toolbelt/python-requests-toolbelt.changes 2020-01-15 15:52:40.215571316 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-requests-toolbelt.new.26092/python-requests-toolbelt.changes 2020-03-01 08:51:03.333235256 +0100
@@ -1,0 +2,30 @@
+Mon May 6 14:06:37 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add patch to fix tests fix-tests.patch
+- Use pytest to execute the tests, same as the upstream
+
+-------------------------------------------------------------------
+Thu Apr 25 19:57:47 UTC 2019 - Dirk Mueller <dmueller(a)suse.com>
+
+- update to 0.9.1:
+ - Fix import of pyOpenSSL shim from urllib3 for PKCS12 adapter
+ - Add X509 Adapter that can handle PKCS12
+ - Add stateless solution for streaming files by MultipartEncoder from one host to another (in chunks)
+ - Update link to example
+ - Move import of ``ABCs`` from collections into version-specific part of
+ _compat module
+ - Fix backwards incompatibility in ``get_encodings_from_content``
+ - Correct callback documentation for ``MultipartEncoderMonitor``
+ - Fix bug when ``MultipartEncoder`` is asked to encode zero parts
+ - Correct the type of non string request body dumps
+ - Removed content from being stored in MultipartDecoder
+ - Fix bug by enabling support for contenttype with capital letters.
+ - Coerce proxy URL to bytes before dumping request
+ - Avoid bailing out with exception upon empty response reason
+ - Corrected Pool documentation
+ - Corrected parentheses match in example usage
+ - Fix "oject" to "object" in ``MultipartEncoder``
+ - Fix URL for the project after the move
+ - Add fix for OSX TCPKeepAliveAdapter
+
+-------------------------------------------------------------------
Old:
----
requests-toolbelt-0.8.0.tar.gz
New:
----
fix-tests.patch
requests-toolbelt-0.9.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-requests-toolbelt.spec ++++++
--- /var/tmp/diff_new_pack.6XGhNn/_old 2020-03-01 08:51:03.841236266 +0100
+++ /var/tmp/diff_new_pack.6XGhNn/_new 2020-03-01 08:51:03.841236266 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-requests-toolbelt
#
-# Copyright (c) 2017 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,31 +12,32 @@
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-requests-toolbelt
-Version: 0.8.0
+Version: 0.9.1
Release: 0
Summary: A utility belt for advanced users of python3-requests
License: Apache-2.0
Group: Development/Languages/Python
-Url: https://toolbelt.readthedocs.org
+URL: https://github.com/requests/toolbelt
Source: https://files.pythonhosted.org/packages/source/r/requests-toolbelt/requests…
-BuildRequires: %{python_module requests >= 2.0.1}
+Patch0: fix-tests.patch
+BuildRequires: %{python_module requests >= 2.12.2}
BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
+BuildRequires: python-rpm-macros
+Requires: python-requests >= 2.12.2
+BuildArch: noarch
# SECTION test requirements
-BuildRequires: %{python_module betamax}
+BuildRequires: %{python_module betamax >= 0.5.0}
BuildRequires: %{python_module mock}
+BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module pytest}
# /SECTION
-BuildRequires: fdupes
-BuildRequires: python-rpm-macros
-Requires: python-requests >= 2.0.1
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildArch: noarch
%python_subpackages
%description
@@ -47,21 +48,24 @@
%prep
%setup -q -n requests-toolbelt-%{version}
+%patch0 -p1
rm -rf requests_toolbelt.egg-info
+# requires network access
+rm -v tests/test_multipart_encoder.py
%build
%python_build
%install
%python_install
-%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_exec setup.py test
+%pytest
%files %{python_files}
-%defattr(-,root,root,-)
-%doc AUTHORS.rst HISTORY.rst LICENSE README.rst
+%license LICENSE
+%doc README.rst
%{python_sitelib}/*
%changelog
++++++ fix-tests.patch ++++++
From c4f918572751151eb3bfc7dfa94580b3e2867a9e Mon Sep 17 00:00:00 2001
From: Jon Dufresne <jon.dufresne(a)gmail.com>
Date: Sun, 3 Feb 2019 09:02:24 -0800
Subject: [PATCH] Fix unhandled exceptions from threads during tests
A queue.Queue() object was not always passed to SessionThread. In this
case, SessionThread._make_request() would raise an exception trying to
call methods on the expected object. Now, always pass a usable object to
SessionThread.
Previously appeared as:
Traceback (most recent call last):
File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "toolbelt/requests_toolbelt/threaded/thread.py", line 41, in _make_request
kwargs = self._jobs.get_nowait()
AttributeError: 'NoneType' object has no attribute 'get_nowait'
Exception in thread cd08fad6-d21d-41b0-921e-737a149b12be:
Traceback (most recent call last):
File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "toolbelt/requests_toolbelt/threaded/thread.py", line 41, in _make_request
kwargs = self._jobs.get_nowait()
AttributeError: 'NoneType' object has no attribute 'get_nowait'
Exception in thread 4fb72f0d-ba1c-4a78-97a2-4a7283ea01fe:
Traceback (most recent call last):
File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "toolbelt/requests_toolbelt/threaded/thread.py", line 41, in _make_request
kwargs = self._jobs.get_nowait()
AttributeError: 'NoneType' object has no attribute 'get_nowait'
Exception in thread 5f3711af-0c01-4821-9e25-8074bbbf769b:
Traceback (most recent call last):
File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "toolbelt/requests_toolbelt/threaded/thread.py", line 41, in _make_request
kwargs = self._jobs.get_nowait()
AttributeError: 'NoneType' object has no attribute 'get_nowait'
---
tests/threaded/test_pool.py | 15 ++++++++++-----
tests/threaded/test_thread.py | 5 ++++-
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/tests/threaded/test_pool.py b/tests/threaded/test_pool.py
index b0653bb..b949dd8 100644
--- a/tests/threaded/test_pool.py
+++ b/tests/threaded/test_pool.py
@@ -26,32 +26,37 @@ def test_requires_positive_number_of_processes(self):
def test_number_of_processes_can_be_arbitrary(self):
"""Show that the number of processes can be set."""
- p = pool.Pool(None, num_processes=100)
+ job_queue = queue.Queue()
+ p = pool.Pool(job_queue, num_processes=100)
assert p._processes == 100
assert len(p._pool) == 100
- p = pool.Pool(None, num_processes=1)
+ job_queue = queue.Queue()
+ p = pool.Pool(job_queue, num_processes=1)
assert p._processes == 1
assert len(p._pool) == 1
def test_initializer_is_called(self):
"""Ensure that the initializer function is called."""
+ job_queue = queue.Queue()
initializer = mock.MagicMock()
- pool.Pool(None, num_processes=1, initializer=initializer)
+ pool.Pool(job_queue, num_processes=1, initializer=initializer)
assert initializer.called is True
initializer.assert_called_once_with(mock.ANY)
def test_auth_generator_is_called(self):
"""Ensure that the auth_generator function is called."""
+ job_queue = queue.Queue()
auth_generator = mock.MagicMock()
- pool.Pool(None, num_processes=1, auth_generator=auth_generator)
+ pool.Pool(job_queue, num_processes=1, auth_generator=auth_generator)
assert auth_generator.called is True
auth_generator.assert_called_once_with(mock.ANY)
def test_session_is_called(self):
"""Ensure that the session function is called."""
+ job_queue = queue.Queue()
session = mock.MagicMock()
- pool.Pool(None, num_processes=1, session=session)
+ pool.Pool(job_queue, num_processes=1, session=session)
assert session.called is True
session.assert_called_once_with()
diff --git a/tests/threaded/test_thread.py b/tests/threaded/test_thread.py
index bb92f7f..fd7e96b 100644
--- a/tests/threaded/test_thread.py
+++ b/tests/threaded/test_thread.py
@@ -19,6 +19,8 @@ def _make_mocks():
def _initialize_a_session_thread(session=None, job_queue=None,
response_queue=None, exception_queue=None):
+ if job_queue is None:
+ job_queue = queue.Queue()
with mock.patch.object(threading, 'Thread') as Thread:
thread_instance = mock.MagicMock()
Thread.return_value = thread_instance
@@ -52,10 +54,11 @@ def test_thread_initialization(self):
def test_is_alive_proxies_to_worker(self):
"""Test that we proxy the is_alive method to the Thread."""
+ job_queue = queue.Queue()
with mock.patch.object(threading, 'Thread') as Thread:
thread_instance = mock.MagicMock()
Thread.return_value = thread_instance
- st = thread.SessionThread(None, None, None, None)
+ st = thread.SessionThread(None, job_queue, None, None)
st.is_alive()
thread_instance.is_alive.assert_called_once_with()
++++++ requests-toolbelt-0.8.0.tar.gz -> requests-toolbelt-0.9.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/AUTHORS.rst new/requests-toolbelt-0.9.1/AUTHORS.rst
--- old/requests-toolbelt-0.8.0/AUTHORS.rst 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/AUTHORS.rst 2019-01-29 18:43:40.000000000 +0100
@@ -41,3 +41,13 @@
- Mike Lambert (@mikelambert)
- Ryan Barrett (https://snarfed.org/)
+
+- Victor Grau Serrat (@lacabra)
+
+- Yorgos Pagles <yorgos(a)pagles.org>
+
+- Thomas Hauk <thauk(a)copperleaf.com>
+
+- Achim Herwig <python(a)wodca.de>
+
+- Ryan Ashley <rashley-iqt>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/HISTORY.rst new/requests-toolbelt-0.9.1/HISTORY.rst
--- old/requests-toolbelt-0.8.0/HISTORY.rst 2017-05-20 23:31:29.000000000 +0200
+++ new/requests-toolbelt-0.9.1/HISTORY.rst 2019-01-30 02:28:28.000000000 +0100
@@ -1,6 +1,48 @@
History
=======
+0.9.1 -- 2019-01-29
+-------------------
+
+Fixed Bugs
+~~~~~~~~~~
+
+- Fix import of pyOpenSSL shim from urllib3 for PKCS12 adapter
+
+0.9.0 -- 2019-01-29
+-------------------
+
+New Features
+~~~~~~~~~~~~
+
+- Add X509 Adapter that can handle PKCS12
+- Add stateless solution for streaming files by MultipartEncoder from one host to another (in chunks)
+
+Fixed Bugs
+~~~~~~~~~~
+
+- Update link to example
+- Move import of ``ABCs`` from collections into version-specific part of
+ _compat module
+- Fix backwards incompatibility in ``get_encodings_from_content``
+- Correct callback documentation for ``MultipartEncoderMonitor``
+- Fix bug when ``MultipartEncoder`` is asked to encode zero parts
+- Correct the type of non string request body dumps
+- Removed content from being stored in MultipartDecoder
+- Fix bug by enabling support for contenttype with capital letters.
+- Coerce proxy URL to bytes before dumping request
+- Avoid bailing out with exception upon empty response reason
+- Corrected Pool documentation
+- Corrected parentheses match in example usage
+- Fix "oject" to "object" in ``MultipartEncoder``
+- Fix URL for the project after the move
+- Add fix for OSX TCPKeepAliveAdapter
+
+Miscellaneous
+~~~~~~~~~~~~~
+
+- Remove py33 from testing and add Python 3.6 and nightly testing to the travis matrix.
+
0.8.0 -- 2017-05-20
-------------------
@@ -20,7 +62,7 @@
- Fix backwards incompatibility in ``get_encodings_from_content``
.. _0.8.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.8.0
+ https://github.com/requests/toolbelt/milestones/0.8.0
0.7.1 -- 2017-02-13
-------------------
@@ -40,7 +82,7 @@
.. links
.. _0.7.1 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestone/9
+ https://github.com/requests/toolbelt/milestone/9
0.7.0 -- 2016-07-21
-------------------
@@ -69,7 +111,7 @@
.. _0.7.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.7.0
+ https://github.com/requests/toolbelt/milestones/0.7.0
0.6.2 -- 2016-05-10
-------------------
@@ -123,7 +165,7 @@
.. _0.6.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.6.0
+ https://github.com/requests/toolbelt/milestones/0.6.0
0.5.1 -- 2015-12-16
-------------------
@@ -138,13 +180,13 @@
.. _0.5.1 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.5.1
+ https://github.com/requests/toolbelt/milestones/0.5.1
0.5.0 -- 2015-11-24
-------------------
More information about this release can be found on the `milestone
-<https://github.com/sigmavirus24/requests-toolbelt/issues?utf8=%E2%9C%93&q=i…>`_
+<https://github.com/requests/toolbelt/issues?utf8=%E2%9C%93&q=is%3Aall+miles…>`_
for 0.5.0.
New Features
@@ -183,7 +225,7 @@
-------------------
For more information about this release, please see `milestone 0.4.0
-<https://github.com/sigmavirus24/requests-toolbelt/issues?q=milestone%3A0.4>`_
+<https://github.com/requests/toolbelt/issues?q=milestone%3A0.4>`_
on the project's page.
New Features
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/PKG-INFO new/requests-toolbelt-0.9.1/PKG-INFO
--- old/requests-toolbelt-0.8.0/PKG-INFO 2017-05-20 23:32:33.000000000 +0200
+++ new/requests-toolbelt-0.9.1/PKG-INFO 2019-01-30 02:29:41.000000000 +0100
@@ -1,13 +1,13 @@
Metadata-Version: 1.1
Name: requests-toolbelt
-Version: 0.8.0
+Version: 0.9.1
Summary: A utility belt for advanced users of python-requests
Home-page: https://toolbelt.readthedocs.org
Author: Ian Cordasco, Cory Benfield
Author-email: graffatcolmingov(a)gmail.com
License: Apache 2.0
-Description: requests toolbelt
- =================
+Description: The Requests Toolbelt
+ =====================
This is just a collection of utilities for `python-requests`_, but don't
really belong in ``requests`` proper. The minimum tested requests version is
@@ -118,13 +118,58 @@
<https://toolbelt.readthedocs.org/en/latest/contributing.html>`_ for
contributing to this project.
+ Please report any bugs on the `issue tracker`_
+
.. _Cory Benfield's blog: https://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/
.. _python-requests: https://github.com/kennethreitz/requests
+ .. _issue tracker: https://github.com/requests/toolbelt/issues
History
=======
+ 0.9.1 -- 2019-01-29
+ -------------------
+
+ Fixed Bugs
+ ~~~~~~~~~~
+
+ - Fix import of pyOpenSSL shim from urllib3 for PKCS12 adapter
+
+ 0.9.0 -- 2019-01-29
+ -------------------
+
+ New Features
+ ~~~~~~~~~~~~
+
+ - Add X509 Adapter that can handle PKCS12
+ - Add stateless solution for streaming files by MultipartEncoder from one host to another (in chunks)
+
+ Fixed Bugs
+ ~~~~~~~~~~
+
+ - Update link to example
+ - Move import of ``ABCs`` from collections into version-specific part of
+ _compat module
+ - Fix backwards incompatibility in ``get_encodings_from_content``
+ - Correct callback documentation for ``MultipartEncoderMonitor``
+ - Fix bug when ``MultipartEncoder`` is asked to encode zero parts
+ - Correct the type of non string request body dumps
+ - Removed content from being stored in MultipartDecoder
+ - Fix bug by enabling support for contenttype with capital letters.
+ - Coerce proxy URL to bytes before dumping request
+ - Avoid bailing out with exception upon empty response reason
+ - Corrected Pool documentation
+ - Corrected parentheses match in example usage
+ - Fix "oject" to "object" in ``MultipartEncoder``
+ - Fix URL for the project after the move
+ - Add fix for OSX TCPKeepAliveAdapter
+
+ Miscellaneous
+ ~~~~~~~~~~~~~
+
+ - Remove py33 from testing and add Python 3.6 and nightly testing to the travis matrix.
+
0.8.0 -- 2017-05-20
-------------------
@@ -144,7 +189,7 @@
- Fix backwards incompatibility in ``get_encodings_from_content``
.. _0.8.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.8.0
+ https://github.com/requests/toolbelt/milestones/0.8.0
0.7.1 -- 2017-02-13
-------------------
@@ -164,7 +209,7 @@
.. links
.. _0.7.1 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestone/9
+ https://github.com/requests/toolbelt/milestone/9
0.7.0 -- 2016-07-21
-------------------
@@ -193,7 +238,7 @@
.. _0.7.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.7.0
+ https://github.com/requests/toolbelt/milestones/0.7.0
0.6.2 -- 2016-05-10
-------------------
@@ -247,7 +292,7 @@
.. _0.6.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.6.0
+ https://github.com/requests/toolbelt/milestones/0.6.0
0.5.1 -- 2015-12-16
-------------------
@@ -262,13 +307,13 @@
.. _0.5.1 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.5.1
+ https://github.com/requests/toolbelt/milestones/0.5.1
0.5.0 -- 2015-11-24
-------------------
More information about this release can be found on the `milestone
- <https://github.com/sigmavirus24/requests-toolbelt/issues?utf8=%E2%9C%93&q=i…>`_
+ <https://github.com/requests/toolbelt/issues?utf8=%E2%9C%93&q=is%3Aall+miles…>`_
for 0.5.0.
New Features
@@ -307,7 +352,7 @@
-------------------
For more information about this release, please see `milestone 0.4.0
- <https://github.com/sigmavirus24/requests-toolbelt/issues?q=milestone%3A0.4>`_
+ <https://github.com/requests/toolbelt/issues?q=milestone%3A0.4>`_
on the project's page.
New Features
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/README.rst new/requests-toolbelt-0.9.1/README.rst
--- old/requests-toolbelt-0.8.0/README.rst 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/README.rst 2017-06-03 02:35:47.000000000 +0200
@@ -1,5 +1,5 @@
-requests toolbelt
-=================
+The Requests Toolbelt
+=====================
This is just a collection of utilities for `python-requests`_, but don't
really belong in ``requests`` proper. The minimum tested requests version is
@@ -110,5 +110,8 @@
<https://toolbelt.readthedocs.org/en/latest/contributing.html>`_ for
contributing to this project.
+Please report any bugs on the `issue tracker`_
+
.. _Cory Benfield's blog: https://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/
.. _python-requests: https://github.com/kennethreitz/requests
+.. _issue tracker: https://github.com/requests/toolbelt/issues
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/dev-requirements.txt new/requests-toolbelt-0.9.1/dev-requirements.txt
--- old/requests-toolbelt-0.8.0/dev-requirements.txt 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/dev-requirements.txt 2019-01-29 18:43:40.000000000 +0100
@@ -1,3 +1,4 @@
pytest
mock
+pyopenssl
git+git://github.com/sigmavirus24/betamax
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/docs/adapters.rst new/requests-toolbelt-0.9.1/docs/adapters.rst
--- old/requests-toolbelt-0.8.0/docs/adapters.rst 2017-03-25 12:07:58.000000000 +0100
+++ new/requests-toolbelt-0.9.1/docs/adapters.rst 2019-01-29 18:43:40.000000000 +0100
@@ -21,6 +21,8 @@
- :class:`requests_toolbelt.adapters.host_header_ssl.HostHeaderSSLAdapter`
+- :class:`requests_toolbelt.adapters.x509.X509Adapter`
+
AppEngineAdapter
----------------
@@ -243,3 +245,25 @@
.. autoclass:: requests_toolbelt.adapters.socket_options.TCPKeepAliveAdapter
+X509Adapter
+-----------
+
+Requests supports SSL Verification using a certificate in .pem format by default.
+In some cases it is necessary to pass a full cert chain as part of a request or it
+is deemed too great a risk to decrypt the certificate into a .pem file.
+
+For such use cases we have created
+:class:`~requests_toolbelt.adapters.x509.X509Adapter`.
+Example usage:
+
+.. code-block:: python
+
+ import requests
+ from requests_toolbelt.adapters.x509 import X509Adapter
+ s = requests.Session()
+ a = X509Adapter(max_retries=3,
+ cert_bytes=b'...', pk_bytes=b'...', encoding='...')
+ s.mount('https://', a)
+
+.. autoclass:: requests_toolbelt.adapters.x509.X509Adapter
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/docs/contributing.rst new/requests-toolbelt-0.9.1/docs/contributing.rst
--- old/requests-toolbelt-0.8.0/docs/contributing.rst 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/docs/contributing.rst 2017-06-03 02:35:47.000000000 +0200
@@ -155,7 +155,7 @@
squash your commits or may squash them for you and perform a manual
merge.
-.. _GitHub: https://github.com/sigmavirus24/requests-toolbelt
+.. _GitHub: https://github.com/requests/toolbelt
.. _GitLab: https://gitlab.com/sigmavirus24/toolbelt
.. _tox: https://tox.readthedocs.org/en/latest/
.. _pytest: http://pytest.org/latest/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/docs/uploading-data.rst new/requests-toolbelt-0.9.1/docs/uploading-data.rst
--- old/requests-toolbelt-0.8.0/docs/uploading-data.rst 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/docs/uploading-data.rst 2019-01-29 18:43:40.000000000 +0100
@@ -109,7 +109,7 @@
.. autoclass:: requests_toolbelt.multipart.encoder.MultipartEncoderMonitor
.. _an example using clint:
- https://gitlab.com/sigmavirus24/toolbelt/blob/master/examples/monitor/progr…
+ https://github.com/requests/toolbelt/blob/master/examples/monitor/progress_…
Streaming Data from a Generator
-------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/__init__.py new/requests-toolbelt-0.9.1/requests_toolbelt/__init__.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/__init__.py 2017-05-20 23:20:06.000000000 +0200
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/__init__.py 2019-01-30 02:27:51.000000000 +0100
@@ -22,7 +22,7 @@
__authors__ = 'Ian Cordasco, Cory Benfield'
__license__ = 'Apache v2.0'
__copyright__ = 'Copyright 2014 Ian Cordasco, Cory Benfield'
-__version__ = '0.8.0'
+__version__ = '0.9.1'
__version_info__ = tuple(int(i) for i in __version__.split('.'))
__all__ = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/_compat.py new/requests-toolbelt-0.9.1/requests_toolbelt/_compat.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/_compat.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/_compat.py 2019-01-30 02:26:45.000000000 +0100
@@ -8,7 +8,6 @@
This module is private. If you use it, and something breaks, you were
warned
"""
-from collections import Mapping, MutableMapping
import sys
import requests
@@ -50,12 +49,26 @@
except ImportError:
from urllib3.contrib import appengine as gaecontrib
+if requests.__build__ < 0x021200:
+ PyOpenSSLContext = None
+else:
+ try:
+ from requests.packages.urllib3.contrib.pyopenssl \
+ import PyOpenSSLContext
+ except ImportError:
+ try:
+ from urllib3.contrib.pyopenssl import PyOpenSSLContext
+ except ImportError:
+ PyOpenSSLContext = None
+
PY3 = sys.version_info > (3, 0)
if PY3:
+ from collections.abc import Mapping, MutableMapping
import queue
from urllib.parse import urlencode, urljoin
else:
+ from collections import Mapping, MutableMapping
import Queue as queue
from urllib import urlencode
from urlparse import urljoin
@@ -307,4 +320,5 @@
'urlencode',
'gaecontrib',
'urljoin',
+ 'PyOpenSSLContext',
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/adapters/socket_options.py new/requests-toolbelt-0.9.1/requests_toolbelt/adapters/socket_options.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/adapters/socket_options.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/adapters/socket_options.py 2017-06-03 02:35:47.000000000 +0200
@@ -2,6 +2,7 @@
"""The implementation of the SocketOptionsAdapter."""
import socket
import warnings
+import sys
import requests
from requests import adapters
@@ -103,13 +104,23 @@
interval = kwargs.pop('interval', 20)
count = kwargs.pop('count', 5)
socket_options = socket_options + [
- (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
- (socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, interval),
- (socket.IPPROTO_TCP, socket.TCP_KEEPCNT, count),
+ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
]
- # NOTE(Ian): Apparently OSX does not have this constant defined, so we
- # set it conditionally.
+ # NOTE(Ian): OSX does not have these constants defined, so we
+ # set them conditionally.
+ if getattr(socket, 'TCP_KEEPINTVL', None) is not None:
+ socket_options += [(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL,
+ interval)]
+ elif sys.platform == 'darwin':
+ # On OSX, TCP_KEEPALIVE from netinet/tcp.h is not exported
+ # by python's socket module
+ TCP_KEEPALIVE = getattr(socket, 'TCP_KEEPALIVE', 0x10)
+ socket_options += [(socket.IPPROTO_TCP, TCP_KEEPALIVE, interval)]
+
+ if getattr(socket, 'TCP_KEEPCNT', None) is not None:
+ socket_options += [(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, count)]
+
if getattr(socket, 'TCP_KEEPIDLE', None) is not None:
socket_options += [(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, idle)]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/adapters/source.py new/requests-toolbelt-0.9.1/requests_toolbelt/adapters/source.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/adapters/source.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/adapters/source.py 2018-01-05 13:36:25.000000000 +0100
@@ -40,7 +40,7 @@
s = requests.Session()
s.mount('http://', SourceAddressAdapter('10.10.10.10'))
- s.mount('https://', SourceAddressAdapter(('10.10.10.10', 8999))
+ s.mount('https://', SourceAddressAdapter(('10.10.10.10', 8999)))
"""
def __init__(self, source_address, **kwargs):
if isinstance(source_address, basestring):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/adapters/x509.py new/requests-toolbelt-0.9.1/requests_toolbelt/adapters/x509.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/adapters/x509.py 1970-01-01 01:00:00.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/adapters/x509.py 2019-01-29 18:43:40.000000000 +0100
@@ -0,0 +1,178 @@
+# -*- coding: utf-8 -*-
+"""A X509Adapter for use with the requests library.
+
+This file contains an implementation of the X509Adapter that will
+allow users to authenticate a request using an arbitrary
+X.509 certificate without needing to convert it to a .pem file
+
+"""
+
+from OpenSSL.crypto import PKey, X509
+from cryptography import x509
+from cryptography.hazmat.primitives.serialization import (load_pem_private_key,
+ load_der_private_key)
+from cryptography.hazmat.primitives.serialization import Encoding
+from cryptography.hazmat.backends import default_backend
+
+from datetime import datetime
+from requests.adapters import HTTPAdapter
+import requests
+
+from .._compat import PyOpenSSLContext
+from .. import exceptions as exc
+
+"""
+importing the protocol constants from _ssl instead of ssl because only the
+constants are needed and to handle issues caused by importing from ssl on
+the 2.7.x line.
+"""
+try:
+ from _ssl import PROTOCOL_TLS as PROTOCOL
+except ImportError:
+ from _ssl import PROTOCOL_SSLv23 as PROTOCOL
+
+
+class X509Adapter(HTTPAdapter):
+ r"""Adapter for use with X.509 certificates.
+
+ Provides an interface for Requests sessions to contact HTTPS urls and
+ authenticate with an X.509 cert by implementing the Transport Adapter
+ interface. This class will need to be manually instantiated and mounted
+ to the session
+
+ :param pool_connections: The number of urllib3 connection pools to
+ cache.
+ :param pool_maxsize: The maximum number of connections to save in the
+ pool.
+ :param max_retries: The maximum number of retries each connection
+ should attempt. Note, this applies only to failed DNS lookups,
+ socket connections and connection timeouts, never to requests where
+ data has made it to the server. By default, Requests does not retry
+ failed connections. If you need granular control over the
+ conditions under which we retry a request, import urllib3's
+ ``Retry`` class and pass that instead.
+ :param pool_block: Whether the connection pool should block for
+ connections.
+
+ :param bytes cert_bytes:
+ bytes object containing contents of a cryptography.x509Certificate
+ object using the encoding specified by the ``encoding`` parameter.
+ :param bytes pk_bytes:
+ bytes object containing contents of a object that implements
+ ``cryptography.hazmat.primitives.serialization.PrivateFormat``
+ using the encoding specified by the ``encoding`` parameter.
+ :param password:
+ string or utf8 encoded bytes containing the passphrase used for the
+ private key. None if unencrypted. Defaults to None.
+ :param encoding:
+ Enumeration detailing the encoding method used on the ``cert_bytes``
+ parameter. Can be either PEM or DER. Defaults to PEM.
+ :type encoding:
+ :class: `cryptography.hazmat.primitives.serialization.Encoding`
+
+ Usage::
+
+ >>> import requests
+ >>> from requests_toolbelt.adapters.x509 import X509Adapter
+ >>> s = requests.Session()
+ >>> a = X509Adapter(max_retries=3,
+ cert_bytes=b'...', pk_bytes=b'...', encoding='...'
+ >>> s.mount('https://', a)
+ """
+
+ def __init__(self, *args, **kwargs):
+ self._check_version()
+ cert_bytes = kwargs.pop('cert_bytes', None)
+ pk_bytes = kwargs.pop('pk_bytes', None)
+ password = kwargs.pop('password', None)
+ encoding = kwargs.pop('encoding', Encoding.PEM)
+
+ password_bytes = None
+
+ if cert_bytes is None or not isinstance(cert_bytes, bytes):
+ raise ValueError('Invalid cert content provided. '
+ 'You must provide an X.509 cert '
+ 'formatted as a byte array.')
+ if pk_bytes is None or not isinstance(pk_bytes, bytes):
+ raise ValueError('Invalid private key content provided. '
+ 'You must provide a private key '
+ 'formatted as a byte array.')
+
+ if isinstance(password, bytes):
+ password_bytes = password
+ elif password:
+ password_bytes = password.encode('utf8')
+
+ self.ssl_context = create_ssl_context(cert_bytes, pk_bytes,
+ password_bytes, encoding)
+
+ super(X509Adapter, self).__init__(*args, **kwargs)
+
+ def init_poolmanager(self, *args, **kwargs):
+ if self.ssl_context:
+ kwargs['ssl_context'] = self.ssl_context
+ return super(X509Adapter, self).init_poolmanager(*args, **kwargs)
+
+ def proxy_manager_for(self, *args, **kwargs):
+ if self.ssl_context:
+ kwargs['ssl_context'] = self.ssl_context
+ return super(X509Adapter, self).proxy_manager_for(*args, **kwargs)
+
+ def _check_version(self):
+ if PyOpenSSLContext is None:
+ raise exc.VersionMismatchError(
+ "The X509Adapter requires at least Requests 2.12.0 to be "
+ "installed. Version {0} was found instead.".format(
+ requests.__version__
+ )
+ )
+
+
+def check_cert_dates(cert):
+ """Verify that the supplied client cert is not invalid."""
+
+ now = datetime.utcnow()
+ if cert.not_valid_after < now or cert.not_valid_before > now:
+ raise ValueError('Client certificate expired: Not After: '
+ '{0:%Y-%m-%d %H:%M:%SZ} '
+ 'Not Before: {1:%Y-%m-%d %H:%M:%SZ}'
+ .format(cert.not_valid_after, cert.not_valid_before))
+
+
+def create_ssl_context(cert_byes, pk_bytes, password=None,
+ encoding=Encoding.PEM):
+ """Create an SSL Context with the supplied cert/password.
+
+ :param cert_bytes array of bytes containing the cert encoded
+ using the method supplied in the ``encoding`` parameter
+ :param pk_bytes array of bytes containing the private key encoded
+ using the method supplied in the ``encoding`` parameter
+ :param password array of bytes containing the passphrase to be used
+ with the supplied private key. None if unencrypted.
+ Defaults to None.
+ :param encoding ``cryptography.hazmat.primitives.serialization.Encoding``
+ details the encoding method used on the ``cert_bytes`` and
+ ``pk_bytes`` parameters. Can be either PEM or DER.
+ Defaults to PEM.
+ """
+ backend = default_backend()
+
+ cert = None
+ key = None
+ if encoding == Encoding.PEM:
+ cert = x509.load_pem_x509_certificate(cert_byes, backend)
+ key = load_pem_private_key(pk_bytes, password, backend)
+ elif encoding == Encoding.DER:
+ cert = x509.load_der_x509_certificate(cert_byes, backend)
+ key = load_der_private_key(pk_bytes, password, backend)
+ else:
+ raise ValueError('Invalid encoding provided: Must be PEM or DER')
+
+ if not (cert and key):
+ raise ValueError('Cert and key could not be parsed from '
+ 'provided data')
+ check_cert_dates(cert)
+ ssl_context = PyOpenSSLContext(PROTOCOL)
+ ssl_context._ctx.use_certificate(X509.from_cryptography(cert))
+ ssl_context._ctx.use_privatekey(PKey.from_cryptography_key(key))
+ return ssl_context
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/multipart/decoder.py new/requests-toolbelt-0.9.1/requests_toolbelt/multipart/decoder.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/multipart/decoder.py 2017-02-10 22:55:25.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/multipart/decoder.py 2018-10-08 13:43:24.000000000 +0200
@@ -45,7 +45,7 @@
subpart of a multipart response. It is expected that these will
generally be created by objects of the ``MultipartDecoder`` class.
- Like ``Response``, there is a ``CaseInsensitiveDict`` object named header,
+ Like ``Response``, there is a ``CaseInsensitiveDict`` object named headers,
``content`` to access bytes, ``text`` to access unicode, and ``encoding``
to access the unicode codec.
@@ -85,7 +85,7 @@
response = request.get(url)
decoder = MultipartDecoder.from_response(response)
for part in decoder.parts:
- print(part.header['content-type'])
+ print(part.headers['content-type'])
If the multipart content is not from a response, basic usage is::
@@ -93,7 +93,7 @@
decoder = MultipartDecoder(content, content_type)
for part in decoder.parts:
- print(part.header['content-type'])
+ print(part.headers['content-type'])
For both these usages, there is an optional ``encoding`` parameter. This is
a string, which is the name of the unicode codec to use (default is
@@ -101,8 +101,6 @@
"""
def __init__(self, content, content_type, encoding='utf-8'):
- #: Original content
- self.content = content
#: Original Content-Type header
self.content_type = content_type
#: Response body encoding
@@ -110,12 +108,12 @@
#: Parsed parts of the multipart response body
self.parts = tuple()
self._find_boundary()
- self._parse_body()
+ self._parse_body(content)
def _find_boundary(self):
ct_info = tuple(x.strip() for x in self.content_type.split(';'))
mimetype = ct_info[0]
- if mimetype.split('/')[0] != 'multipart':
+ if mimetype.split('/')[0].lower() != 'multipart':
raise NonMultipartContentTypeException(
"Unexpected mimetype in content-type: '{0}'".format(mimetype)
)
@@ -135,7 +133,7 @@
else:
return part
- def _parse_body(self):
+ def _parse_body(self, content):
boundary = b''.join((b'--', self.boundary))
def body_part(part):
@@ -148,7 +146,7 @@
part[:4] != b'--\r\n' and
part != b'--')
- parts = self.content.split(b''.join((b'\r\n', boundary)))
+ parts = content.split(b''.join((b'\r\n', boundary)))
self.parts = tuple(body_part(x) for x in parts if test_part(x))
@classmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/multipart/encoder.py new/requests-toolbelt-0.9.1/requests_toolbelt/multipart/encoder.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/multipart/encoder.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/multipart/encoder.py 2018-10-08 13:43:24.000000000 +0200
@@ -12,14 +12,20 @@
import os
from uuid import uuid4
+import requests
+
from .._compat import fields
+class FileNotSupportedError(Exception):
+ """File not supported error."""
+
+
class MultipartEncoder(object):
"""
- The ``MultipartEncoder`` oject is a generic interface to the engine that
+ The ``MultipartEncoder`` object is a generic interface to the engine that
will create a ``multipart/form-data`` body for you.
The basic usage is:
@@ -74,7 +80,7 @@
please weigh in on `this issue`_.
.. _this issue:
- https://github.com/sigmavirus24/requests-toolbelt/issues/75
+ https://github.com/requests/toolbelt/issues/75
"""
@@ -136,7 +142,7 @@
As such, we now calculate the length lazily as a property.
.. _bug #80:
- https://github.com/sigmavirus24/requests-toolbelt/issues/80
+ https://github.com/requests/toolbelt/issues/80
"""
# If _len isn't already calculated, calculate, return, and set it
return self._len or self._calculate_length()
@@ -184,7 +190,7 @@
part = self._current_part or self._next_part()
while amount == -1 or amount > 0:
written = 0
- if not part.bytes_left_to_write():
+ if part and not part.bytes_left_to_write():
written += self._write(b'\r\n')
written += self._write_boundary()
part = self._next_part()
@@ -333,13 +339,13 @@
MultipartEncoderMonitor)
import requests
- def callback(encoder, bytes_read):
+ def callback(monitor):
# Do something with this information
pass
m = MultipartEncoder(fields={'field0': 'value0'})
monitor = MultipartEncoderMonitor(m, callback)
- headers = {'Content-Type': montior.content_type}
+ headers = {'Content-Type': monitor.content_type}
r = requests.post('https://httpbin.org/post', data=monitor,
headers=headers)
@@ -351,7 +357,7 @@
from requests_toolbelt import MultipartEncoderMonitor
import requests
- def callback(encoder, bytes_read):
+ def callback(monitor):
# Do something with this information
pass
@@ -568,3 +574,82 @@
def read(self, length=-1):
return self.fd.read(length)
+
+
+class FileFromURLWrapper(object):
+ """File from URL wrapper.
+
+ The :class:`FileFromURLWrapper` object gives you the ability to stream file
+ from provided URL in chunks by :class:`MultipartEncoder`.
+ Provide a stateless solution for streaming file from one server to another.
+ You can use the :class:`FileFromURLWrapper` without a session or with
+ a session as demonstated by the examples below:
+
+ .. code-block:: python
+ # no session
+
+ import requests
+ from requests_toolbelt import MultipartEncoder, FileFromURLWrapper
+
+ url = 'https://httpbin.org/image/png'
+ streaming_encoder = MultipartEncoder(
+ fields={
+ 'file': FileFromURLWrapper(url)
+ }
+ )
+ r = requests.post(
+ 'https://httpbin.org/post', data=streaming_encoder,
+ headers={'Content-Type': streaming_encoder.content_type}
+ )
+
+ .. code-block:: python
+ # using a session
+
+ import requests
+ from requests_toolbelt import MultipartEncoder, FileFromURLWrapper
+
+ session = requests.Session()
+ url = 'https://httpbin.org/image/png'
+ streaming_encoder = MultipartEncoder(
+ fields={
+ 'file': FileFromURLWrapper(url, session=session)
+ }
+ )
+ r = session.post(
+ 'https://httpbin.org/post', data=streaming_encoder,
+ headers={'Content-Type': streaming_encoder.content_type}
+ )
+
+ """
+
+ def __init__(self, file_url, session=None):
+ self.session = session or requests.Session()
+ requested_file = self._request_for_file(file_url)
+ self.len = int(requested_file.headers['content-length'])
+ self.raw_data = requested_file.raw
+
+ def _request_for_file(self, file_url):
+ """Make call for file under provided URL."""
+ response = self.session.get(file_url, stream=True)
+ content_length = response.headers.get('content-length', None)
+ if content_length is None:
+ error_msg = (
+ "Data from provided URL {url} is not supported. Lack of "
+ "content-length Header in requested file response.".format(
+ url=file_url)
+ )
+ raise FileNotSupportedError(error_msg)
+ elif not content_length.isdigit():
+ error_msg = (
+ "Data from provided URL {url} is not supported. content-length"
+ " header value is not a digit.".format(url=file_url)
+ )
+ raise FileNotSupportedError(error_msg)
+ return response
+
+ def read(self, chunk_size):
+ """Read file in chunks."""
+ chunk_size = chunk_size if chunk_size >= 0 else self.len
+ chunk = self.raw_data.read(chunk_size) or b''
+ self.len -= len(chunk) if chunk else 0 # left to read
+ return chunk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/threaded/__init__.py new/requests-toolbelt-0.9.1/requests_toolbelt/threaded/__init__.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/threaded/__init__.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/threaded/__init__.py 2017-06-03 02:35:47.000000000 +0200
@@ -14,7 +14,7 @@
'url': 'https://api.github.com/users/sigmavirus24',
'method': 'GET',
}, {
- 'url': 'https://api.github.com/repos/sigmavirus24/requests-toolbelt',
+ 'url': 'https://api.github.com/repos/requests/toolbelt',
'method': 'GET',
}, {
'url': 'https://google.com',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/threaded/pool.py new/requests-toolbelt-0.9.1/requests_toolbelt/threaded/pool.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/threaded/pool.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/threaded/pool.py 2018-01-05 13:36:25.000000000 +0100
@@ -18,7 +18,7 @@
:param auth_generator:
Function used to generate new auth credentials for the session.
:type auth_generator: collections.Callable
- :param int num_threads:
+ :param int num_process:
Number of threads to create.
:param session:
:type session: requests.Session
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt/utils/dump.py new/requests-toolbelt-0.9.1/requests_toolbelt/utils/dump.py
--- old/requests-toolbelt-0.8.0/requests_toolbelt/utils/dump.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/requests_toolbelt/utils/dump.py 2019-01-29 18:43:33.000000000 +0100
@@ -44,7 +44,8 @@
uri = compat.urlparse(url)
proxy_url = proxy_info.get('request_path')
if proxy_url is not None:
- return proxy_url, uri
+ request_path = _coerce_to_bytes(proxy_url)
+ return request_path, uri
request_path = _coerce_to_bytes(uri.path)
if uri.query:
@@ -79,7 +80,7 @@
else:
# In the event that the body is a file-like object, let's not try
# to read everything into memory.
- bytearr.extend('<< Request body is not a string-like type >>')
+ bytearr.extend(b'<< Request body is not a string-like type >>')
bytearr.extend(b'\r\n')
@@ -109,7 +110,8 @@
def _coerce_to_bytes(data):
if not isinstance(data, bytes) and hasattr(data, 'encode'):
data = data.encode('utf-8')
- return data
+ # Don't bail out with an exception if data is None
+ return data if data is not None else b''
def dump_response(response, request_prefix=b'< ', response_prefix=b'> ',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt.egg-info/PKG-INFO new/requests-toolbelt-0.9.1/requests_toolbelt.egg-info/PKG-INFO
--- old/requests-toolbelt-0.8.0/requests_toolbelt.egg-info/PKG-INFO 2017-05-20 23:32:32.000000000 +0200
+++ new/requests-toolbelt-0.9.1/requests_toolbelt.egg-info/PKG-INFO 2019-01-30 02:29:41.000000000 +0100
@@ -1,13 +1,13 @@
Metadata-Version: 1.1
Name: requests-toolbelt
-Version: 0.8.0
+Version: 0.9.1
Summary: A utility belt for advanced users of python-requests
Home-page: https://toolbelt.readthedocs.org
Author: Ian Cordasco, Cory Benfield
Author-email: graffatcolmingov(a)gmail.com
License: Apache 2.0
-Description: requests toolbelt
- =================
+Description: The Requests Toolbelt
+ =====================
This is just a collection of utilities for `python-requests`_, but don't
really belong in ``requests`` proper. The minimum tested requests version is
@@ -118,13 +118,58 @@
<https://toolbelt.readthedocs.org/en/latest/contributing.html>`_ for
contributing to this project.
+ Please report any bugs on the `issue tracker`_
+
.. _Cory Benfield's blog: https://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/
.. _python-requests: https://github.com/kennethreitz/requests
+ .. _issue tracker: https://github.com/requests/toolbelt/issues
History
=======
+ 0.9.1 -- 2019-01-29
+ -------------------
+
+ Fixed Bugs
+ ~~~~~~~~~~
+
+ - Fix import of pyOpenSSL shim from urllib3 for PKCS12 adapter
+
+ 0.9.0 -- 2019-01-29
+ -------------------
+
+ New Features
+ ~~~~~~~~~~~~
+
+ - Add X509 Adapter that can handle PKCS12
+ - Add stateless solution for streaming files by MultipartEncoder from one host to another (in chunks)
+
+ Fixed Bugs
+ ~~~~~~~~~~
+
+ - Update link to example
+ - Move import of ``ABCs`` from collections into version-specific part of
+ _compat module
+ - Fix backwards incompatibility in ``get_encodings_from_content``
+ - Correct callback documentation for ``MultipartEncoderMonitor``
+ - Fix bug when ``MultipartEncoder`` is asked to encode zero parts
+ - Correct the type of non string request body dumps
+ - Removed content from being stored in MultipartDecoder
+ - Fix bug by enabling support for contenttype with capital letters.
+ - Coerce proxy URL to bytes before dumping request
+ - Avoid bailing out with exception upon empty response reason
+ - Corrected Pool documentation
+ - Corrected parentheses match in example usage
+ - Fix "oject" to "object" in ``MultipartEncoder``
+ - Fix URL for the project after the move
+ - Add fix for OSX TCPKeepAliveAdapter
+
+ Miscellaneous
+ ~~~~~~~~~~~~~
+
+ - Remove py33 from testing and add Python 3.6 and nightly testing to the travis matrix.
+
0.8.0 -- 2017-05-20
-------------------
@@ -144,7 +189,7 @@
- Fix backwards incompatibility in ``get_encodings_from_content``
.. _0.8.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.8.0
+ https://github.com/requests/toolbelt/milestones/0.8.0
0.7.1 -- 2017-02-13
-------------------
@@ -164,7 +209,7 @@
.. links
.. _0.7.1 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestone/9
+ https://github.com/requests/toolbelt/milestone/9
0.7.0 -- 2016-07-21
-------------------
@@ -193,7 +238,7 @@
.. _0.7.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.7.0
+ https://github.com/requests/toolbelt/milestones/0.7.0
0.6.2 -- 2016-05-10
-------------------
@@ -247,7 +292,7 @@
.. _0.6.0 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.6.0
+ https://github.com/requests/toolbelt/milestones/0.6.0
0.5.1 -- 2015-12-16
-------------------
@@ -262,13 +307,13 @@
.. _0.5.1 milestone:
- https://github.com/sigmavirus24/requests-toolbelt/milestones/0.5.1
+ https://github.com/requests/toolbelt/milestones/0.5.1
0.5.0 -- 2015-11-24
-------------------
More information about this release can be found on the `milestone
- <https://github.com/sigmavirus24/requests-toolbelt/issues?utf8=%E2%9C%93&q=i…>`_
+ <https://github.com/requests/toolbelt/issues?utf8=%E2%9C%93&q=is%3Aall+miles…>`_
for 0.5.0.
New Features
@@ -307,7 +352,7 @@
-------------------
For more information about this release, please see `milestone 0.4.0
- <https://github.com/sigmavirus24/requests-toolbelt/issues?q=milestone%3A0.4>`_
+ <https://github.com/requests/toolbelt/issues?q=milestone%3A0.4>`_
on the project's page.
New Features
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt.egg-info/SOURCES.txt new/requests-toolbelt-0.9.1/requests_toolbelt.egg-info/SOURCES.txt
--- old/requests-toolbelt-0.8.0/requests_toolbelt.egg-info/SOURCES.txt 2017-05-20 23:32:33.000000000 +0200
+++ new/requests-toolbelt-0.9.1/requests_toolbelt.egg-info/SOURCES.txt 2019-01-30 02:29:41.000000000 +0100
@@ -42,6 +42,7 @@
requests_toolbelt/adapters/socket_options.py
requests_toolbelt/adapters/source.py
requests_toolbelt/adapters/ssl.py
+requests_toolbelt/adapters/x509.py
requests_toolbelt/auth/__init__.py
requests_toolbelt/auth/_digest_auth_compat.py
requests_toolbelt/auth/guess.py
@@ -84,6 +85,8 @@
tests/test_ssladapter.py
tests/test_streaming_iterator.py
tests/test_user_agent.py
+tests/test_x509_adapter.py
+tests/cassettes/file_for_download.json
tests/cassettes/http2bin_cookies.json
tests/cassettes/http2bin_fingerprint.json
tests/cassettes/httpbin_guess_auth_basic.json
@@ -93,6 +96,9 @@
tests/cassettes/redirect_request_for_dump_all.json
tests/cassettes/simple_get_request.json
tests/cassettes/stream_response_to_file.json
+tests/cassettes/test_x509_adapter_der.json
+tests/cassettes/test_x509_adapter_pem.json
+tests/certs/test_cert.p12
tests/threaded/__init__.py
tests/threaded/test_api.py
tests/threaded/test_pool.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/requests_toolbelt.egg-info/requires.txt new/requests-toolbelt-0.9.1/requests_toolbelt.egg-info/requires.txt
--- old/requests-toolbelt-0.8.0/requests_toolbelt.egg-info/requires.txt 2017-05-20 23:32:32.000000000 +0200
+++ new/requests-toolbelt-0.9.1/requests_toolbelt.egg-info/requires.txt 2019-01-30 02:29:41.000000000 +0100
@@ -1 +1 @@
-requests>=2.0.1,<3.0.0
+requests<3.0.0,>=2.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/tests/cassettes/file_for_download.json new/requests-toolbelt-0.9.1/tests/cassettes/file_for_download.json
--- old/requests-toolbelt-0.8.0/tests/cassettes/file_for_download.json 1970-01-01 01:00:00.000000000 +0100
+++ new/requests-toolbelt-0.9.1/tests/cassettes/file_for_download.json 2018-10-08 13:43:24.000000000 +0200
@@ -0,0 +1 @@
+{"http_interactions": [{"request": {"uri": "https://stxnext.com/static/img/logo.830ebe551641.svg", "body": {"encoding": "utf-8", "string": ""}, "method": "GET", "headers": {"User-Agent": ["python-requests/2.2.1 CPython/3.5.2 Darwin/17.3.0"], "Accept-Encoding": ["gzip, deflate, compress"], "Accept": ["*/*"]}}, "recorded_at": "2018-01-04T23:00:12", "response": {"url": "https://stxnext.com/static/img/logo.830ebe551641.svg", "status": {"message": "OK", "code": 200}, "body": {"encoding": null, "string": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"-16169 -10492.84 144.98 39.947\"><defs><style>.a{fill:url(#a);}</style><linearGradient id=\"a\" x2=\"1\" y2=\"1\" gradientUnits=\"objectBoundingBox\"><stop offset=\"0\" stop-color=\"#15c9c2\"/><stop offset=\"1\" stop-color=\"#39769b\"/></linearGradient></defs><path class=\"a\" d=\"M88.841,54.948V48.514a3.665,3.665,0,0,1,1.541-.336,2.169,2.169,0,0,1,2.266,2.435A2.182,2.182,0,0,1,90.435,53.1a2.9,2.9,0,0,1-.85-.125v1.974Zm.744-6.019v3.46a2.558,2.558,0,0,0,.8.125c1,0,1.523-.807,1.523-1.9s-.525-1.84-1.506-1.84h-.041A1.986,1.986,0,0,0,89.585,48.929ZM62.838,54.948l.717-1.9-1.788-4.769h.805l1.187,3.472a5.008,5.008,0,0,1,.167.682h.019a5.01,5.01,0,0,1,.167-.682l1.177-3.472h.815l-2.5,6.672Zm-5.749,0V48.514a3.669,3.669,0,0,1,1.541-.336A2.169,2.169,0,0,1,60.9,50.613,2.185,2.185,0,0,1,58.683,53.1a2.9,2.9,0,0,1-.85-.125v1.974Zm.74-6.019v3.46a2.558,2.558,0,0,0,.8.125c1,0,1.523-.807,1.523-1.9s-.529-1.84-1.513-1.84H58.6A1.986,1.986,0,0,0,57.829,48.929Zm79.213,4.213a2.19,2.19,0,0,1-2.282-2.487c0-1.462.788-2.478,2.08-2.478a1.825,1.825,0,0,1,1.9,2.044c0,.1,0,.205-.008.318l-3.257.469a1.5,1.5,0,0,0,1.6,1.532,2.886,2.886,0,0,0,1.3-.292l.23.557a3.431,3.431,0,0,1-1.484.336ZM135.432,50.5l2.6-.366c-.011-.944-.488-1.386-1.2-1.386C135.989,48.744,135.45,49.416,135.432,50.5ZM130.4,52.8l.265-.567a2.665,2.665,0,0,0,1.143.3c.611,0,1.018-.3,1.018-.77,0-.5-.407-.7-.965-.9-.673-.248-1.336-.549-1.336-1.408,0-.744.575-1.279,1.585-1.279a2.6,2.6,0,0,1,1.327.336l-.257.523a2.054,2.054,0,0,0-1-.283c-.576,0-.9.309-.9.707,0,.5.388.682.913.875.708.265,1.4.549,1.4,1.434.006.823-.649,1.372-1.772,1.372A3.261,3.261,0,0,1,130.4,52.8Zm-3.008.34c-1.187,0-1.841-.523-1.841-1.672V48.276h.744v3.2c0,.707.366,1.043,1.1,1.043a2.914,2.914,0,0,0,1.008-.158V48.276h.73V52.8a4.263,4.263,0,0,1-1.664.34Zm-7.256-2.487c0-1.417.708-2.478,2.028-2.478s2.026,1.061,2.026,2.478-.709,2.487-2.026,2.487S120.14,52.071,120.14,50.655Zm.735-.007c0,1.1.424,1.884,1.292,1.884s1.291-.788,1.291-1.884-.425-1.866-1.291-1.866v0C121.3,48.779,120.875,49.549,120.875,50.648Zm-12.187,2.494a2.19,2.19,0,0,1-2.282-2.487c0-1.462.788-2.478,2.08-2.478a1.825,1.825,0,0,1,1.9,2.044c0,.1,0,.205-.009.318l-3.256.469a1.494,1.494,0,0,0,1.6,1.532,2.886,2.886,0,0,0,1.3-.292l.23.557a3.431,3.431,0,0,1-1.484.336ZM107.079,50.5l2.6-.366c-.01-.944-.488-1.386-1.2-1.386C107.636,48.744,107.1,49.416,107.079,50.5Zm-13.249.159c0-1.417.708-2.478,2.028-2.478s2.026,1.061,2.026,2.478-.707,2.487-2.026,2.487S93.83,52.071,93.83,50.655Zm.735-.007c0,1.1.424,1.884,1.292,1.884s1.291-.788,1.291-1.884-.424-1.866-1.291-1.866v0C94.989,48.779,94.565,49.549,94.565,50.648Zm-18.973.007c0-1.417.708-2.478,2.028-2.478s2.032,1.061,2.032,2.478-.715,2.487-2.032,2.487S75.592,52.071,75.592,50.655Zm.735-.007c0,1.1.424,1.884,1.292,1.884s1.292-.788,1.292-1.884-.426-1.866-1.292-1.866v0C76.752,48.779,76.328,49.549,76.328,50.648ZM68.85,53.1a1.149,1.149,0,0,1-1.257-1.292V48.833H66.9v-.557h.688V47.123l.716-.239v1.389h1.027v.557H68.306v2.939a.634.634,0,0,0,.716.673,1.006,1.006,0,0,0,.309-.044v.619a1.308,1.308,0,0,1-.453.081Zm15.078-.053V49.823c0-.638-.39-1.044-1.158-1.044a2.968,2.968,0,0,0-1.018.169v4.1h-.745V48.513a4.5,4.5,0,0,1,1.753-.336c1.257,0,1.9.584,1.9,1.585v3.289Zm34.114-3.212c0-.7-.461-1.037-1.187-1.037a2.036,2.036,0,0,0-.989.265v3.983h-.744V46.1h.744v2.376A2.616,2.616,0,0,1,117,48.191c1.1,0,1.778.557,1.778,1.585v3.265l-.734,0Zm-6.285,3.212V48.513a4.493,4.493,0,0,1,1.743-.336,3.273,3.273,0,0,1,.47.034l-.143.621a2.031,2.031,0,0,0-.424-.034,2.461,2.461,0,0,0-.9.15v4.1Zm-8.485,0-.974-3.327a5.884,5.884,0,0,1-.14-.654h-.019s-.062.354-.15.654l-.974,3.327h-.753l-1.45-4.769h.744l.93,3.371a7.42,7.42,0,0,1,.15.732h.019s.07-.407.158-.732l.974-3.371h.709l.966,3.371c.088.318.167.732.167.732h.019a6.418,6.418,0,0,1,.143-.732l.947-3.371h.731l-1.442,4.769ZM73.5,49.833c0-.7-.461-1.037-1.187-1.037a2.044,2.044,0,0,0-.991.265v3.983h-.744V46.1h.744v2.376a2.612,2.612,0,0,1,1.133-.283c1.1,0,1.778.557,1.778,1.585v3.265l-.734,0Zm-27.141-6,8.837-14.534L46.91,15.475h7.926l7.925,13.819L54.32,43.828Zm-15.478,0V21.688H23.911V15.474H44.819v6.213H37.846V43.828ZM0,40.086l4.455-4.463c1.473,1.473,4.064,1.99,6.331,1.99,2.741,0,4.062-.913,4.062-2.548a2.4,2.4,0,0,0-.548-1.671,3.133,3.133,0,0,0-1.872-.757L9,32.158A9.631,9.631,0,0,1,3.31,29.651a7.847,7.847,0,0,1-1.953-5.7C1.358,18.778,5.26,15,11.712,15c4.06,0,7.127.956,9.558,3.385l-4.387,4.385C15.092,20.98,12.742,21.1,11.506,21.1c-2.429,0-3.424,1.394-3.424,2.63a1.868,1.868,0,0,0,.557,1.315,3.179,3.179,0,0,0,1.952.836l3.426.48a9.569,9.569,0,0,1,5.576,2.348c1.513,1.473,2.111,3.584,2.111,6.213,0,5.761-4.982,8.907-10.95,8.907C6.412,43.828,2.866,43.031,0,40.086Zm111.6,3.73,6.958-11.665-6.518-11.076h2.81l5.048,8.975,5.046-8.975h2.812L121.2,32.15l7.027,11.658-2.812.006L119.9,34.265l-5.558,9.55Zm24.376,0V23.245h-6.579V21.074h15.588v2.171H138.4V43.814ZM95.878,21.074H109.99v2.173h-11.7v8.018h9.966v2.165H98.3v8.21H110v2.173l-14.123,0ZM90.192,43.814,78.12,25.571V43.808H75.692V21.074h2.3L90.069,39.247V21.074H92.5V43.814ZM63.528,43.8l-2.683-5.029,3.7-6.344,6.611,11.379Zm-2.7-24.291,2.094-4.046h7.919L64.668,26.125Z\" transform=\"translate(-16169 -10507.84)\"/></svg>"}, "headers": {"date": ["Thu, 04 Jan 2018 23:00:15 GMT"], "strict-transport-security": ["max-age=0; includeSubdomains; preload"], "last-modified": ["Wed, 22 Nov 2017 09:22:00 GMT"], "content-type": ["image/svg+xml"], "content-length": ["5177"]}}}], "recorded_with": "betamax/0.8.0"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/tests/cassettes/test_x509_adapter_der.json new/requests-toolbelt-0.9.1/tests/cassettes/test_x509_adapter_der.json
--- old/requests-toolbelt-0.8.0/tests/cassettes/test_x509_adapter_der.json 1970-01-01 01:00:00.000000000 +0100
+++ new/requests-toolbelt-0.9.1/tests/cassettes/test_x509_adapter_der.json 2019-01-29 18:43:40.000000000 +0100
@@ -0,0 +1 @@
+{"http_interactions": [{"request": {"body": {"encoding": "utf-8", "string": ""}, "headers": {"User-Agent": ["python-requests/2.21.0"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "Connection": ["keep-alive"]}, "method": "GET", "uri": "https://pkiprojecttest01.dev.labs.internal/"}, "response": {"body": {"encoding": "ISO-8859-1", "base64_string": "H4sIAAAAAAAAA7NRdPF3DokMcFXIKMnNseOygVJJ+SmVdlxArqFdSGpxiY0+kAHkFoB5CsGlycmpxcU2+gUgQX2IYqAasBEAYvDs5FMAAAA=", "string": ""}, "headers": {"Server": ["nginx/1.10.3 (Ubuntu)"], "Date": ["Thu, 20 Dec 2018 20:02:30 GMT"], "Content-Type": ["text/html"], "Last-Modified": ["Mon, 19 Nov 2018 20:48:30 GMT"], "Transfer-Encoding": ["chunked"], "Connection": ["keep-alive"], "ETag": ["W/\"5bf3219e-53\""], "Content-Encoding": ["gzip"]}, "status": {"code": 200, "message": "OK"}, "url": "https://pkiprojecttest01.dev.labs.internal/"}, "recorded_at": "2018-12-20T20:02:30"}], "recorded_with": "betamax/0.8.1"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/tests/cassettes/test_x509_adapter_pem.json new/requests-toolbelt-0.9.1/tests/cassettes/test_x509_adapter_pem.json
--- old/requests-toolbelt-0.8.0/tests/cassettes/test_x509_adapter_pem.json 1970-01-01 01:00:00.000000000 +0100
+++ new/requests-toolbelt-0.9.1/tests/cassettes/test_x509_adapter_pem.json 2019-01-29 18:43:40.000000000 +0100
@@ -0,0 +1 @@
+{"http_interactions": [{"request": {"body": {"encoding": "utf-8", "string": ""}, "headers": {"User-Agent": ["python-requests/2.21.0"], "Accept-Encoding": ["gzip, deflate"], "Accept": ["*/*"], "Connection": ["keep-alive"]}, "method": "GET", "uri": "https://pkiprojecttest01.dev.labs.internal/"}, "response": {"body": {"encoding": "ISO-8859-1", "base64_string": "H4sIAAAAAAAAA7NRdPF3DokMcFXIKMnNseOygVJJ+SmVdlxArqFdSGpxiY0+kAHkFoB5CsGlycmpxcU2+gUgQX2IYqAasBEAYvDs5FMAAAA=", "string": ""}, "headers": {"Server": ["nginx/1.10.3 (Ubuntu)"], "Date": ["Thu, 20 Dec 2018 20:02:30 GMT"], "Content-Type": ["text/html"], "Last-Modified": ["Mon, 19 Nov 2018 20:48:30 GMT"], "Transfer-Encoding": ["chunked"], "Connection": ["keep-alive"], "ETag": ["W/\"5bf3219e-53\""], "Content-Encoding": ["gzip"]}, "status": {"code": 200, "message": "OK"}, "url": "https://pkiprojecttest01.dev.labs.internal/"}, "recorded_at": "2018-12-20T20:02:30"}], "recorded_with": "betamax/0.8.1"}
\ No newline at end of file
Binary files old/requests-toolbelt-0.8.0/tests/certs/test_cert.p12 and new/requests-toolbelt-0.9.1/tests/certs/test_cert.p12 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/tests/test_dump.py new/requests-toolbelt-0.9.1/tests/test_dump.py
--- old/requests-toolbelt-0.8.0/tests/test_dump.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/tests/test_dump.py 2019-01-29 18:43:33.000000000 +0100
@@ -211,6 +211,26 @@
assert b'request:GET / HTTP/1.1\r\n' in array
assert b'request:Host: example.com\r\n' in array
+ def test_dump_non_string_request_data(self):
+ """Build up the request data into a bytearray."""
+ self.configure_request(
+ url='http://example.com/',
+ method='POST',
+ body=1
+ )
+
+ array = bytearray()
+ prefixes = dump.PrefixSettings('request:', 'response:')
+ dump._dump_request_data(
+ request=self.request,
+ prefixes=prefixes,
+ bytearr=array,
+ proxy_info={},
+ )
+ assert b'request:POST / HTTP/1.1\r\n' in array
+ assert b'request:Host: example.com\r\n' in array
+ assert b'<< Request body is not a string-like type >>\r\n' in array
+
def test_dump_request_data_with_proxy_info(self):
"""Build up the request data into a bytearray."""
self.configure_request(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/tests/test_multipart_decoder.py new/requests-toolbelt-0.9.1/tests/test_multipart_decoder.py
--- old/requests-toolbelt-0.8.0/tests/test_multipart_decoder.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/tests/test_multipart_decoder.py 2018-01-05 13:36:25.000000000 +0100
@@ -162,3 +162,30 @@
assert decoder_2.parts[0].headers[b'Header-1'] == b'Header-Value-1'
assert len(decoder_2.parts[1].headers) == 0
assert decoder_2.parts[1].content == b'Body 2, Line 1'
+
+ def test_from_responsecaplarge(self):
+ response = mock.NonCallableMagicMock(spec=requests.Response)
+ response.headers = {
+ 'content-type': 'Multipart/Related; boundary="samp1"'
+ }
+ cnt = io.BytesIO()
+ cnt.write(b'\r\n--samp1\r\n')
+ cnt.write(b'Header-1: Header-Value-1\r\n')
+ cnt.write(b'Header-2: Header-Value-2\r\n')
+ cnt.write(b'\r\n')
+ cnt.write(b'Body 1, Line 1\r\n')
+ cnt.write(b'Body 1, Line 2\r\n')
+ cnt.write(b'--samp1\r\n')
+ cnt.write(b'\r\n')
+ cnt.write(b'Body 2, Line 1\r\n')
+ cnt.write(b'--samp1--\r\n')
+ response.content = cnt.getvalue()
+ decoder_2 = MultipartDecoder.from_response(response)
+ assert decoder_2.content_type == response.headers['content-type']
+ assert (
+ decoder_2.parts[0].content == b'Body 1, Line 1\r\nBody 1, Line 2'
+ )
+ assert decoder_2.parts[0].headers[b'Header-1'] == b'Header-Value-1'
+ assert len(decoder_2.parts[1].headers) == 0
+ assert decoder_2.parts[1].content == b'Body 2, Line 1'
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/tests/test_multipart_encoder.py new/requests-toolbelt-0.9.1/tests/test_multipart_encoder.py
--- old/requests-toolbelt-0.8.0/tests/test_multipart_encoder.py 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/tests/test_multipart_encoder.py 2018-10-08 13:43:24.000000000 +0200
@@ -1,8 +1,16 @@
# -*- coding: utf-8 -*-
import unittest
import io
-from requests_toolbelt.multipart.encoder import CustomBytesIO, MultipartEncoder
+
+import requests
+
+from requests_toolbelt.multipart.encoder import (
+ CustomBytesIO, MultipartEncoder, FileFromURLWrapper, FileNotSupportedError)
from requests_toolbelt._compat import filepost
+from . import get_betamax
+
+
+preserve_bytes = {'preserve_exact_body_bytes': True}
class LargeFileMock(object):
@@ -81,6 +89,44 @@
assert self.instance.read() == s
+class TestFileFromURLWrapper(unittest.TestCase):
+ def setUp(self):
+ s = requests.Session()
+ self.recorder = get_betamax(s)
+
+ def test_read_file(self):
+ url = ('https://stxnext.com/static/img/logo.830ebe551641.svg')
+ with self.recorder.use_cassette(
+ 'file_for_download', **preserve_bytes):
+ self.instance = FileFromURLWrapper(url)
+ assert self.instance.len == 5177
+ chunk = self.instance.read(20)
+ assert chunk == b'<svg xmlns="http://w'
+ assert self.instance.len == 5157
+ chunk = self.instance.read(0)
+ assert chunk == b''
+ assert self.instance.len == 5157
+ chunk = self.instance.read(10)
+ assert chunk == b'ww.w3.org/'
+ assert self.instance.len == 5147
+
+ def test_no_content_length_header(self):
+ url = (
+ 'https://api.github.com/repos/sigmavirus24/github3.py/releases/'
+ 'assets/37944'
+ )
+ with self.recorder.use_cassette(
+ 'stream_response_to_file', **preserve_bytes):
+ with self.assertRaises(FileNotSupportedError) as context:
+ FileFromURLWrapper(url)
+ assert context.exception.__str__() == (
+ 'Data from provided URL https://api.github.com/repos/s'
+ 'igmavirus24/github3.py/releases/assets/37944 is not '
+ 'supported. Lack of content-length Header in requested'
+ ' file response.'
+ )
+
+
class TestMultipartEncoder(unittest.TestCase):
def setUp(self):
self.parts = [('field', 'value'), ('other_field', 'other_value')]
@@ -145,6 +191,16 @@
m = MultipartEncoder([('field', 'foo'), ('file', fd)])
assert m.read() is not None
+ def test_reads_file_from_url_wrapper(self):
+ s = requests.Session()
+ recorder = get_betamax(s)
+ url = ('https://stxnext.com/static/img/logo.830ebe551641.svg')
+ with recorder.use_cassette(
+ 'file_for_download'):
+ m = MultipartEncoder(
+ [('field', 'foo'), ('file', FileFromURLWrapper(url))])
+ assert m.read() is not None
+
def test_reads_open_file_objects_with_a_specified_filename(self):
with open('setup.py', 'rb') as fd:
m = MultipartEncoder(
@@ -219,7 +275,7 @@
def test_handles_empty_unicode_values(self):
"""Verify that the Encoder can handle empty unicode strings.
- See https://github.com/sigmavirus24/requests-toolbelt/issues/46 for
+ See https://github.com/requests/toolbelt/issues/46 for
more context.
"""
fields = [(b'test'.decode('utf-8'), b''.decode('utf-8'))]
@@ -229,7 +285,7 @@
def test_accepts_custom_content_type(self):
"""Verify that the Encoder handles custom content-types.
- See https://github.com/sigmavirus24/requests-toolbelt/issues/52
+ See https://github.com/requests/toolbelt/issues/52
"""
fields = [
(b'test'.decode('utf-8'), (b'filename'.decode('utf-8'),
@@ -243,7 +299,7 @@
def test_accepts_custom_headers(self):
"""Verify that the Encoder handles custom headers.
- See https://github.com/sigmavirus24/requests-toolbelt/issues/52
+ See https://github.com/requests/toolbelt/issues/52
"""
fields = [
(b'test'.decode('utf-8'), (b'filename'.decode('utf-8'),
@@ -255,6 +311,12 @@
output = m.read().decode('utf-8')
assert output.index('X-My-Header: my-value\r\n') > 0
+ def test_no_parts(self):
+ fields = []
+ boundary = '--90967316f8404798963cce746a4f4ef9'
+ m = MultipartEncoder(fields=fields, boundary=boundary)
+ output = m.read().decode('utf-8')
+ assert output == '----90967316f8404798963cce746a4f4ef9--\r\n'
if __name__ == '__main__':
unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/tests/test_x509_adapter.py new/requests-toolbelt-0.9.1/tests/test_x509_adapter.py
--- old/requests-toolbelt-0.8.0/tests/test_x509_adapter.py 1970-01-01 01:00:00.000000000 +0100
+++ new/requests-toolbelt-0.9.1/tests/test_x509_adapter.py 2019-01-29 18:43:40.000000000 +0100
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+import requests
+import unittest
+import pytest
+
+from OpenSSL.crypto import load_pkcs12
+from cryptography.hazmat.primitives.serialization import (Encoding,
+ PrivateFormat,
+ NoEncryption,
+ BestAvailableEncryption)
+
+from requests_toolbelt import exceptions as exc
+from requests_toolbelt.adapters.x509 import X509Adapter
+from . import get_betamax
+
+REQUESTS_SUPPORTS_SSL_CONTEXT = requests.__build__ >= 0x021200
+
+
+class TestX509Adapter(unittest.TestCase):
+ """Tests a simple requests.get() call using a .p12 cert.
+ """
+ def setUp(self):
+ with open('./tests/certs/test_cert.p12', 'rb') as pkcs12_file:
+ self.pkcs12_data = pkcs12_file.read()
+
+ self.pkcs12_password_bytes = "test".encode('utf8')
+ self.session = requests.Session()
+
+ @pytest.mark.skipif(not REQUESTS_SUPPORTS_SSL_CONTEXT,
+ reason="Requires Requests v2.12.0 or later")
+ def test_x509_pem(self):
+ p12 = load_pkcs12(self.pkcs12_data, self.pkcs12_password_bytes)
+ cert_bytes = p12.get_certificate().to_cryptography().public_bytes(Encoding.PEM)
+ pk_bytes = p12.get_privatekey().\
+ to_cryptography_key().\
+ private_bytes(Encoding.PEM, PrivateFormat.PKCS8,
+ BestAvailableEncryption(self.pkcs12_password_bytes))
+
+ adapter = X509Adapter(max_retries=3, cert_bytes=cert_bytes,
+ pk_bytes=pk_bytes, password=self.pkcs12_password_bytes)
+ self.session.mount('https://', adapter)
+ recorder = get_betamax(self.session)
+ with recorder.use_cassette('test_x509_adapter_pem'):
+ r = self.session.get('https://pkiprojecttest01.dev.labs.internal/', verify=False)
+
+ assert r.status_code == 200
+ assert r.text
+
+ @pytest.mark.skipif(not REQUESTS_SUPPORTS_SSL_CONTEXT,
+ reason="Requires Requests v2.12.0 or later")
+ def test_x509_der(self):
+ p12 = load_pkcs12(self.pkcs12_data, self.pkcs12_password_bytes)
+ cert_bytes = p12.get_certificate().to_cryptography().public_bytes(Encoding.DER)
+ pk_bytes = p12.get_privatekey().to_cryptography_key().private_bytes(Encoding.DER, PrivateFormat.PKCS8, NoEncryption())
+ adapter = X509Adapter(max_retries=3, cert_bytes=cert_bytes, pk_bytes=pk_bytes, encoding=Encoding.DER)
+ self.session.mount('https://', adapter)
+ recorder = get_betamax(self.session)
+ with recorder.use_cassette('test_x509_adapter_der'):
+ r = self.session.get('https://pkiprojecttest01.dev.labs.internal/', verify=False)
+
+ assert r.status_code == 200
+ assert r.text
+
+ @pytest.mark.skipif(REQUESTS_SUPPORTS_SSL_CONTEXT, reason="Will not raise exc")
+ def test_requires_new_enough_requests(self):
+ with pytest.raises(exc.VersionMismatchError):
+ X509Adapter()
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-toolbelt-0.8.0/tox.ini new/requests-toolbelt-0.9.1/tox.ini
--- old/requests-toolbelt-0.8.0/tox.ini 2017-01-19 15:23:03.000000000 +0100
+++ new/requests-toolbelt-0.9.1/tox.ini 2019-01-30 02:28:21.000000000 +0100
@@ -1,5 +1,5 @@
[tox]
-envlist = py27,py33,py34,py35,pypy,{py27,py34}-flake8,docstrings
+envlist = py27,py34,py35,py36,pypy,{py27,py34}-flake8,docstrings
[testenv]
pip_pre = False
@@ -7,8 +7,11 @@
requests{env:REQUESTS_VERSION:>=2.0.1,<3.0.0}
pytest
mock
+ pyopenssl
+ ndg-httpsclient
betamax>0.5.0
-commands = py.test {posargs}
+commands =
+ py.test {posargs}
[testenv:py27-flake8]
basepython = python2.7
@@ -32,6 +35,7 @@
deps =
sphinx>=1.3.0
sphinx_rtd_theme
+ pyopenssl
.
commands =
sphinx-build -E -c docs -b html docs/ docs/_build/html
1
0
Hello community,
here is the log from the commit of package python-cffi for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-cffi (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-cffi.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cffi"
Sun Mar 1 08:50:56 2020 rev:28 rq:780302 version:1.13.2
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-cffi/python-cffi.changes 2020-01-15 15:47:51.619406085 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-cffi.new.26092/python-cffi.changes 2020-03-01 08:51:01.601231811 +0100
@@ -2 +2 @@
-Tue Oct 30 11:58:50 CET 2018 - mcepl(a)suse.com
+Mon Nov 18 20:21:04 UTC 2019 - Todd R <toddrme2178(a)gmail.com>
@@ -4,2 +4,132 @@
-- Add dont-corrupt-memory.patch to fix boo#1111657 (originally
- from https://bitbucket.org/cffi/cffi/commits/7a76a3815340)
+- Update to 1.13.2:
+ * re-release because the Linux wheels came with an attached version of libffi that was very old and buggy
+- Update to 1.13.1:
+ * deprecate the way to declare in cdef() a global variable with only void *foo;. You should always use a storage class, like extern void *foo; or maybe static void *foo;. These are all equivalent for the purposes of cdef(), but the reason for deprecating the bare version is that (as far as I know) it would always be mistake in a real C header.
+ * fix the regression RuntimeError: found a situation in which we try to build a type recursively.
+ * fixed issue #427 where a multithreading mistake in the embedding logic initialization code would cause deadlocks on CPython 3.7.
+
+-------------------------------------------------------------------
+Tue Oct 15 10:39:50 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.13.0:
+ * No changelog provided upstream
+
+-------------------------------------------------------------------
+Tue Apr 30 19:42:59 UTC 2019 - Todd R <toddrme2178(a)gmail.com>
+
+- Update to 1.12.3
+ * Fix for nested struct types that end in a var-sized array (#405).
+ * Add support for using U and L characters at the end of integer constants in ffi.cdef() (thanks Guillaume).
+ * More 3.8 fixes.
+
+-------------------------------------------------------------------
+Thu Mar 7 14:10:49 UTC 2019 - John Vandenberg <jayvdb(a)gmail.com>
+
+- Remove test suite exception which was fixed by 7a76a38153*.patch
+- Add doc/*/*.rst to %doc
+
+-------------------------------------------------------------------
+Sat Mar 2 10:39:31 UTC 2019 - Ondřej Súkup <mimi.vx(a)gmail.com>
+
+- update to 1.12.3
+- drop patches: 3184b0a675fc425b821b528d7fdf744b2f08dadf.patch
+ 7a76a381534012af4790e815140d1538510b7d93.patch
+ e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch
+ * Direct support for pkg-config.
+ * ffi.from_buffer() takes a new optional first argument that gives the array
+ type of the result. It also takes an optional keyword argument require_writable
+ to refuse read-only Python buffers.
+ * ffi.new(), ffi.gc() or ffi.from_buffer() cdata objects can now be released
+ at known times, either by using the with keyword or by calling the new ffi.release().
+ * Accept an expression like ffi.new("int[4]", p) if p is itself another cdata int[4].
+ * CPython 2.x: ffi.dlopen() failed with non-ascii file names on Posix
+ * CPython: if a thread is started from C and then runs Python code
+ (with callbacks or with the embedding solution), then previous versions of cffi
+ would contain possible crashes and/or memory leaks.
+ * Support for ffi.cdef(..., pack=N) where N is a power of two.
+
+-------------------------------------------------------------------
+Mon Oct 29 16:10:03 CET 2018 - mcepl(a)suse.com
+
+- Add 7a76a381534012af4790e815140d1538510b7d93.patch to fix
+ bsc#1111657 (we need use to proper void returning function not
+ to corrupt memory in tests).
+
+-------------------------------------------------------------------
+Wed Oct 17 18:53:19 CEST 2018 - mcepl(a)suse.com
+
+- Fix calling of py.test executor.
+
+-------------------------------------------------------------------
+Fri Sep 21 07:24:58 CEST 2018 - mcepl(a)suse.com
+
+- Add 3184b0a675fc425b821b528d7fdf744b2f08dadf.patch as
+ a workaround against
+ https://bitbucket.org/cffi/cffi/issues/378/ (possible bug in
+ GCC, see https://bugzilla.redhat.com/1552724)
+
+-------------------------------------------------------------------
+Wed Sep 19 20:43:08 CEST 2018 - mcepl(a)suse.com
+
+- Remove ignore-tests.patch -- testing what will happen
+- Add e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch from
+ upstream to remove some warnings.
+
+-------------------------------------------------------------------
+Tue Sep 18 15:51:02 UTC 2018 - Matěj Cepl <mcepl(a)suse.com>
+
+- Switch off falling tests with new patch
+ ignore-tests.patch instead of -k parameter for py.test.
+ https://bitbucket.org/cffi/cffi/issues/384/
+
+-------------------------------------------------------------------
+Fri Mar 2 23:14:41 UTC 2018 - arun(a)gmx.de
+
+- update to version 1.11.5:
+ * Issue #357: fix ffi.emit_python_code() which generated a buggy
+ Python file if you are using a struct with an anonymous union
+ field or vice-versa.
+ * Windows: ffi.dlopen() should now handle unicode filenames.
+ * ABI mode: implemented ffi.dlclose() for the in-line case (it used
+ to be present only in the out-of-line case).
+ * Fixed a corner case for setup.py install --record=xx --root=yy
+ with an out-of-line ABI module. Also fixed Issue #345.
+ * More hacks on Windows for running CFFI’s own setup.py.
+ * Issue #358: in embedding, to protect against (the rare case of)
+ Python initialization from several threads in parallel, we have to
+ use a spin-lock. On CPython 3 it is worse because it might
+ spin-lock for a long time (execution of Py_InitializeEx()). Sadly,
+ recent changes to CPython make that solution needed on CPython 2
+ too.
+ * CPython 3 on Windows: we no longer compile with Py_LIMITED_API by
+ default because such modules cannot be used with virtualenv. Issue
+ #350 mentions a workaround if you still want that and are not
+ concerned about virtualenv: pass a
+ define_macros=[("Py_LIMITED_API", None)] to the
+ ffibuilder.set_source() call.
+
+-------------------------------------------------------------------
+Tue Feb 20 00:23:55 UTC 2018 - arun(a)gmx.de
+
+- specfile:
+ * delete patch cffi-loader.patch; included upstream
+
+- update to version 1.11.4:
+ * Windows: reverted linking with python3.dll, because virtualenv
+ does not make this DLL available to virtual environments for
+ now. See Issue #355. On Windows only, the C extension modules
+ created by cffi follow for now the standard naming scheme
+ foo.cp36-win32.pyd, to make it clear that they are regular CPython
+ modules depending on python36.dll.
+
+- changes from version 1.11.3:
+ * Fix on CPython 3.x: reading the attributes __loader__ or __spec__
+ from the cffi-generated lib modules gave a buggy
+ SystemError. (These attributes are always None, and provided only
+ to help compatibility with tools that expect them in all modules.)
+ * More Windows fixes: workaround for MSVC not supporting large
+ literal strings in C code (from
+ ffi.embedding_init_code(large_string)); and an issue with
+ Py_LIMITED_API linking with python35.dll/python36.dll instead of
+ python3.dll.
+ * Small documentation improvements.
Old:
----
cffi-1.11.2.tar.gz
cffi-loader.patch
dont-corrupt-memory.patch
New:
----
cffi-1.13.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cffi.spec ++++++
--- /var/tmp/diff_new_pack.sbudOH/_old 2020-03-01 08:51:02.025232654 +0100
+++ /var/tmp/diff_new_pack.sbudOH/_new 2020-03-01 08:51:02.029232662 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-cffi
#
-# Copyright (c) 2018 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,31 +12,28 @@
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define modname cffi
-Name: python-%{modname}
-Version: 1.11.2
+Name: python-cffi
+Version: 1.13.2
Release: 0
Summary: Foreign Function Interface for Python calling C code
License: MIT
Group: Development/Languages/Python
-Url: http://%{modname}.readthedocs.org
-Source0: https://files.pythonhosted.org/packages/source/c/cffi/%{modname}-%{version}…
+URL: http://cffi.readthedocs.org
+Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
Source1: python-cffi-rpmlintrc
-Patch0: cffi-loader.patch
-Patch1: dont-corrupt-memory.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pycparser}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
-BuildRequires: fdupes
BuildRequires: pkgconfig(libffi)
Requires: python-pycparser
%python_subpackages
@@ -46,8 +43,7 @@
is to provide a convenient and reliable way of calling C code from Python.
%prep
-%setup -q -n %{modname}-%{version}
-%autopatch -p1
+%setup -q -n cffi-%{version}
%build
export CFLAGS="%{optflags}"
@@ -55,15 +51,16 @@
%install
%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
-# py.test-%%$python_bin_suffix -k "not test_init_once_multithread" c/ testing/
-py.test-%$python_bin_suffix c/ testing/
+py.test-%$python_bin_suffix -v -W ignore::UserWarning c/ testing/
}
%files %{python_files}
%license LICENSE
+%doc README.md doc/source/*.rst doc/misc/*.rst
%{python_sitearch}/*
%changelog
++++++ cffi-1.11.2.tar.gz -> cffi-1.13.2.tar.gz ++++++
++++ 8934 lines of diff (skipped)
++++++ python-cffi-rpmlintrc ++++++
--- /var/tmp/diff_new_pack.sbudOH/_old 2020-03-01 08:51:02.165232933 +0100
+++ /var/tmp/diff_new_pack.sbudOH/_new 2020-03-01 08:51:02.165232933 +0100
@@ -1,4 +1,4 @@
# cffi specifically installs C headers in site-packages, so :
addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/parse_c_type.h")
-addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/_cffi_include.h")
+addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/_cffi_(include|errors).h")
addFilter("devel-file-in-non-devel-package .*/site-packages/cffi/_embedding.h")
1
0
Hello community,
here is the log from the commit of package python-portend for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-portend (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-portend.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-portend"
Sun Mar 1 08:50:57 2020 rev:11 rq:780304 version:2.5
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-portend/python-portend.changes 2020-01-15 15:51:39.087536278 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-portend.new.26092/python-portend.changes 2020-03-01 08:51:02.305233212 +0100
@@ -1,0 +2,27 @@
+Mon Feb 24 11:13:56 UTC 2020 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Fix up dependencies to match requirements
+
+-------------------------------------------------------------------
+Tue Jun 18 12:46:11 UTC 2019 - pgajdos(a)suse.com
+
+- version update to 2.5
+ * #10: Fix race condition in ``occupied`` and ``free``
+
+-------------------------------------------------------------------
+Fri Apr 5 07:03:43 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 2.4:
+ * find_available_local_port now relies on socket.getaddrinfo to
+ find a suitable address family.
+
+-------------------------------------------------------------------
+Tue Mar 5 12:56:25 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 2.3:
+ * Fix README rendering.
+ * Merge with skeleton, including embedded license file.
+ * #1: Removed portend._getaddrinfo and its usage in Checker.assert_free.
+ * #5: Restored use of portend.client_host during assert_free check on Windows, fixing check when the bind address is *ADDR_ANY.
+
+-------------------------------------------------------------------
Old:
----
portend-1.8.tar.gz
New:
----
portend-2.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-portend.spec ++++++
--- /var/tmp/diff_new_pack.QUYdWo/_old 2020-03-01 08:51:02.617233832 +0100
+++ /var/tmp/diff_new_pack.QUYdWo/_new 2020-03-01 08:51:02.617233832 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-portend
#
-# Copyright (c) 2017 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
@@ -12,27 +12,27 @@
# 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/
+#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-portend
-Version: 1.8
+Version: 2.5
Release: 0
-License: MIT
Summary: TCP port monitoring utilities
-Url: https://github.com/jaraco/portend
+License: MIT
Group: Development/Languages/Python
+URL: https://github.com/jaraco/portend
Source: https://files.pythonhosted.org/packages/source/p/portend/portend-%{version}…
-BuildRequires: python-rpm-macros
-BuildRequires: %{python_module setuptools}
-BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module pytest}
-BuildRequires: %{python_module tempora}
-Requires: python-tempora
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: %{python_module setuptools_scm >= 1.15.0}
+BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module tempora >= 1.8}
+BuildRequires: fdupes
+BuildRequires: python-rpm-macros
+Requires: python-tempora >= 1.8
BuildArch: noarch
-
%python_subpackages
%description
@@ -47,18 +47,22 @@
%prep
%setup -q -n portend-%{version}
+# do not require cov/xdist/etc
+sed -i -e '/addopts/d' pytest.ini
%build
%python_build
%install
%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec -m pytest test_portend.py
%files %{python_files}
-%defattr(-,root,root,-)
+%license LICENSE
+%doc CHANGES.rst README.rst
%{python_sitelib}/*
%changelog
++++++ portend-1.8.tar.gz -> portend-2.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/.flake8 new/portend-2.5/.flake8
--- old/portend-1.8/.flake8 1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/.flake8 2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,9 @@
+[flake8]
+max-line-length = 88
+ignore =
+ # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513
+ W503
+ # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545
+ W504
+ # Black creates whitespace before colon
+ E203
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/.pre-commit-config.yaml new/portend-2.5/.pre-commit-config.yaml
--- old/portend-1.8/.pre-commit-config.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/.pre-commit-config.yaml 2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,5 @@
+repos:
+- repo: https://github.com/ambv/black
+ rev: 18.9b0
+ hooks:
+ - id: black
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/.readthedocs.yml new/portend-2.5/.readthedocs.yml
--- old/portend-1.8/.readthedocs.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/.readthedocs.yml 2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,5 @@
+python:
+ version: 3
+ extra_requirements:
+ - docs
+ pip_install: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/.travis.yml new/portend-2.5/.travis.yml
--- old/portend-1.8/.travis.yml 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/.travis.yml 2019-06-11 02:56:58.000000000 +0200
@@ -1,25 +1,33 @@
-sudo: false
+dist: xenial
language: python
+
python:
-- 2.6
- 2.7
- 3.6
+- &latest_py3 3.7
+
+jobs:
+ fast_finish: true
+ include:
+ - stage: deploy
+ if: tag IS present
+ python: *latest_py3
+ before_script: skip
+ env:
+ - TWINE_USERNAME=jaraco
+ # TWINE_PASSWORD
+ - secure: I9gYsaelJuAp9MzZCQnw5cVfaZxjNtf1MarEv94oh7tW73Y0i+VYVTa5r2NDqbX9r4W+rFxuSKKgcuKbOxk39DJL5Yy5EjTm0SkmIjdGQuxIiAseWbMKfnoIv14J6ebwnKN+fUIYum8G8UJD4uOUiDbjxhL/m7pUcNjtxP3NLxWyITk9XyTS+3pQDL2XB0/bNMEMgfXenHiW6H+u2piWTXxQfPV/JmdkU3upQ5bkkIXP3njyirif2e2kC974Zbs3ajxVQGpgqKZ/3dirzH834UhzTHzhY7KTSdMh2IVyZJG5rEnDDrry63G3zKbphtsg7z/7K5uu8Lnx/O+vh7FDQCIkfJ7oKXU6fBFTFlRvnOFRy43qBor7EbmJi5GEWKvFzz/7hahR667OdHdyiPn1CCtXUpAApZJS+SgOhHkMvpn+mY3u8L1e7cS+RbsJkbY94Gll1vcgn5JQAMVwdiOtyWi4xqOlu1OEPe12/yVGVPhUe/FlNRRw30JY6MT4bd2Y+vo3yW4Aur69QfIiRzND0aAG9z55WmzP+zw/R68jjxXO5O7pNUoxoxUSJ6ay+oTAOEc+WCP8dGzG32CUDabgcRJg0NJhQMF/aYb6pAleNvuCK+zVGUAEui7Vdc7A0IMJ3eGWjJ4hEao8PtkdmhVQJ6CuHlYhHle5mi1DTAFYOVU=
+ - TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
+ script: tox -e release
+
+cache: pip
+
install:
-- pip install tox "setuptools>=28.2"
-script:
-- tox
-branches:
- except:
- - skeleton
-deploy:
- provider: pypi
- server: https://upload.pypi.org/legacy/
- on:
- tags: true
- all_branches: true
- python: 3.6
- user: jaraco
- distributions: dists
- skip_upload_docs: true
- password:
- secure: vdFaBpjDV3pL+wS+uBguSyrWzIMYI238bovE6TFeEbCeXkAFpoS+Po+HKw76dpcVN4eTRwOqYuw9kZ+4spnl1RmgeTEsT8VwJQQTkpRmQ6KzikTMXya2KI3wFuKpB1x7ZFVaLasxtZ4+MULwgH5tE31YDulLWKPIJ6mn5sYcL0d3BbbKS7QPalF3KhJatWHEXjpj7j0XzW9wkjmeY1cmaVj+YQxNk5wMJQtFnrzS6Q0VI3ju+2RSRQUjXvnTPkK9bR0HUAJQOG9BWfNjcSGkPLvSp5BqAUiER8WYP7EAxjy51GHJZnXl95LGd1i9rJX3S3fN/e7QrYcGsmXA/jNK9qJ3C+QBhF70DqgZn2m9t8bmTWIQexV2DLNTZydU6VfrLvXUUiudXmQV6wk5/yhiR9jAKY2cJAsbTZ8wtsjAqQybEJBDZGyMRiUhTpUXBxYI9v5kpdvPVNe/gmGRCjwMmzwvwdcVBGSkVqfWoijvIRiE5+5fqEn2WnfLc8r4aFIvf0kusS1ZgSy9tt9UKQIPPNt9s12BfKx/vobDrEbFLZvDR6Cxyucq4znR12LWijosZINWVwSOpTXfgGJpFbDHwWzI8Z7/xfeSYoWjg8XJl2yeiXG+jCKKvYjpOU3e2Pw5d+MvhIyJJnRFBb7+kDyZktGqECVsIUfWrrlkFXuVfAQ=
+- pip install tox tox-venv
+
+before_script:
+ # Disable IPv6. Ref travis-ci/travis-ci#8361
+ - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
+ sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
+ fi
+script: tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/CHANGES.rst new/portend-2.5/CHANGES.rst
--- old/portend-1.8/CHANGES.rst 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/CHANGES.rst 2019-06-11 02:56:58.000000000 +0200
@@ -1,3 +1,48 @@
+2.5
+===
+
+#10: Fix race condition in ``occupied`` and ``free``.
+
+2.4
+===
+
+#6: ``find_available_local_port`` now relies on
+ ``socket.getaddrinfo`` to find a suitable address
+ family.
+
+2.3
+===
+
+Package refresh.
+
+2.2
+===
+
+Merge with skeleton, including embedded license file.
+
+2.1.2
+=====
+
+Fix README rendering.
+
+2.1.1
+=====
+
+#5: Restored use of ``portend.client_host`` during
+ ``assert_free`` check on Windows, fixing check
+ when the bind address is *ADDR_ANY.
+
+2.1
+===
+
+Use tempora.timing.Timer from tempora 1.8, replacing
+boilerplate code in occupied and free functions.
+
+#1: Removed ``portend._getaddrinfo`` and its usage in
+ ``Checker.assert_free``.
+
+Dropped support for Python 2.6.
+
1.8
===
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/LICENSE new/portend-2.5/LICENSE
--- old/portend-1.8/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/LICENSE 2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,7 @@
+Copyright Jason R. Coombs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/PKG-INFO new/portend-2.5/PKG-INFO
--- old/portend-1.8/PKG-INFO 2017-01-23 15:32:47.000000000 +0100
+++ new/portend-2.5/PKG-INFO 2019-06-11 02:57:16.000000000 +0200
@@ -1,7 +1,7 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: portend
-Version: 1.8
-Summary: TCP port monitoring utilities
+Version: 2.5
+Summary: TCP port monitoring and discovery
Home-page: https://github.com/jaraco/portend
Author: Jason R. Coombs
Author-email: jaraco(a)jaraco.com
@@ -11,10 +11,18 @@
.. image:: https://img.shields.io/pypi/pyversions/portend.svg
- .. image:: https://img.shields.io/pypi/dm/portend.svg
-
.. image:: https://img.shields.io/travis/jaraco/portend/master.svg
- :target: http://travis-ci.org/jaraco/portend
+ :target: https://travis-ci.org/jaraco/portend
+
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/ambv/black
+ :alt: Code style: Black
+
+ .. image:: https://img.shields.io/appveyor/ci/jaraco/portend/master.svg
+ :target: https://ci.appveyor.com/project/jaraco/portend/branch/master
+
+ .. image:: https://readthedocs.org/projects/portend/badge/?version=latest
+ :target: https://portend.readthedocs.io/en/latest/?badge=latest
por·tend
pôrˈtend/
@@ -22,13 +30,6 @@
be a sign or warning that (something, especially something momentous or calamitous) is likely to happen.
- License
- =======
-
- License is indicated in the project metadata (typically one or more
- of the Trove classifiers). For more details, see `this explanation
- <https://github.com/jaraco/skeleton/issues/1>`_.
-
Usage
=====
@@ -60,19 +61,21 @@
print(port, "is available for binding")
Portend additionally exposes the lower-level port checking functionality
- in the :class:`Checker` class, which currently exposes only one public
- method, ``assert_free``.
+ in the ``Checker`` class, which currently exposes only one public
+ method, ``assert_free``::
portend.Checker().assert_free('localhost', 31923)
If assert_free is passed a host/port combination that is occupied by
a bound listener (i.e. a TCP connection is established to that host/port),
- assert_free will raise a :class:`PortNotFree` exception.
+ assert_free will raise a ``PortNotFree`` exception.
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Requires-Python: >=2.7
+Provides-Extra: docs
+Provides-Extra: testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/README.rst new/portend-2.5/README.rst
--- old/portend-1.8/README.rst 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/README.rst 2019-06-11 02:56:58.000000000 +0200
@@ -3,10 +3,18 @@
.. image:: https://img.shields.io/pypi/pyversions/portend.svg
-.. image:: https://img.shields.io/pypi/dm/portend.svg
-
.. image:: https://img.shields.io/travis/jaraco/portend/master.svg
- :target: http://travis-ci.org/jaraco/portend
+ :target: https://travis-ci.org/jaraco/portend
+
+.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/ambv/black
+ :alt: Code style: Black
+
+.. image:: https://img.shields.io/appveyor/ci/jaraco/portend/master.svg
+ :target: https://ci.appveyor.com/project/jaraco/portend/branch/master
+
+.. image:: https://readthedocs.org/projects/portend/badge/?version=latest
+ :target: https://portend.readthedocs.io/en/latest/?badge=latest
por·tend
pôrˈtend/
@@ -14,13 +22,6 @@
be a sign or warning that (something, especially something momentous or calamitous) is likely to happen.
-License
-=======
-
-License is indicated in the project metadata (typically one or more
-of the Trove classifiers). For more details, see `this explanation
-<https://github.com/jaraco/skeleton/issues/1>`_.
-
Usage
=====
@@ -52,11 +53,11 @@
print(port, "is available for binding")
Portend additionally exposes the lower-level port checking functionality
-in the :class:`Checker` class, which currently exposes only one public
-method, ``assert_free``.
+in the ``Checker`` class, which currently exposes only one public
+method, ``assert_free``::
portend.Checker().assert_free('localhost', 31923)
If assert_free is passed a host/port combination that is occupied by
a bound listener (i.e. a TCP connection is established to that host/port),
-assert_free will raise a :class:`PortNotFree` exception.
+assert_free will raise a ``PortNotFree`` exception.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/appveyor.yml new/portend-2.5/appveyor.yml
--- old/portend-1.8/appveyor.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/appveyor.yml 2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,24 @@
+environment:
+
+ APPVEYOR: true
+
+ matrix:
+ - PYTHON: "C:\\Python36-x64"
+ - PYTHON: "C:\\Python27-x64"
+
+install:
+ # symlink python from a directory with a space
+ - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%"
+ - "SET PYTHON=\"C:\\Program Files\\Python\""
+ - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
+
+build: off
+
+cache:
+ - '%LOCALAPPDATA%\pip\Cache'
+
+test_script:
+ - "python -m pip install tox tox-venv"
+ - "tox"
+
+version: '{build}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/docs/conf.py new/portend-2.5/docs/conf.py
--- old/portend-1.8/docs/conf.py 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/docs/conf.py 2019-06-11 02:56:58.000000000 +0200
@@ -1,47 +1,26 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-import os
-import sys
-import subprocess
+extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
-extensions = [
- 'sphinx.ext.autodoc',
- 'rst.linker',
-]
-
-# General information about the project.
-
-root = os.path.join(os.path.dirname(__file__), '..')
-setup_script = os.path.join(root, 'setup.py')
-fields = ['--name', '--version', '--url', '--author']
-dist_info_cmd = [sys.executable, setup_script] + fields
-output_bytes = subprocess.check_output(dist_info_cmd, cwd=root)
-project, version, url, author = output_bytes.decode('utf-8').strip().split('\n')
-
-copyright = '2014-2017 ' + author
-
-# The full version, including alpha/beta/rc tags.
-release = version
-
-master_doc = 'index'
+master_doc = "index"
link_files = {
- '../CHANGES.rst': dict(
- using=dict(
- GH='https://github.com',
- project=project,
- url=url,
- ),
- replace=[
- dict(
- pattern=r"(Issue )?#(?P<issue>\d+)",
- url='{url}/issues/{issue}',
- ),
- dict(
- pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
- with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
- ),
- ],
- ),
+ '../CHANGES.rst': dict(
+ using=dict(GH='https://github.com'),
+ replace=[
+ dict(
+ pattern=r'(Issue #|\B#)(?P<issue>\d+)',
+ url='{package_url}/issues/{issue}',
+ ),
+ dict(
+ pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
+ with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
+ ),
+ dict(
+ pattern=r'PEP[- ](?P<pep_number>\d+)',
+ url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
+ ),
+ ],
+ )
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/docs/requirements.txt new/portend-2.5/docs/requirements.txt
--- old/portend-1.8/docs/requirements.txt 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/docs/requirements.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-rst.linker
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/portend.egg-info/PKG-INFO new/portend-2.5/portend.egg-info/PKG-INFO
--- old/portend-1.8/portend.egg-info/PKG-INFO 2017-01-23 15:32:47.000000000 +0100
+++ new/portend-2.5/portend.egg-info/PKG-INFO 2019-06-11 02:57:16.000000000 +0200
@@ -1,7 +1,7 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: portend
-Version: 1.8
-Summary: TCP port monitoring utilities
+Version: 2.5
+Summary: TCP port monitoring and discovery
Home-page: https://github.com/jaraco/portend
Author: Jason R. Coombs
Author-email: jaraco(a)jaraco.com
@@ -11,10 +11,18 @@
.. image:: https://img.shields.io/pypi/pyversions/portend.svg
- .. image:: https://img.shields.io/pypi/dm/portend.svg
-
.. image:: https://img.shields.io/travis/jaraco/portend/master.svg
- :target: http://travis-ci.org/jaraco/portend
+ :target: https://travis-ci.org/jaraco/portend
+
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/ambv/black
+ :alt: Code style: Black
+
+ .. image:: https://img.shields.io/appveyor/ci/jaraco/portend/master.svg
+ :target: https://ci.appveyor.com/project/jaraco/portend/branch/master
+
+ .. image:: https://readthedocs.org/projects/portend/badge/?version=latest
+ :target: https://portend.readthedocs.io/en/latest/?badge=latest
por·tend
pôrˈtend/
@@ -22,13 +30,6 @@
be a sign or warning that (something, especially something momentous or calamitous) is likely to happen.
- License
- =======
-
- License is indicated in the project metadata (typically one or more
- of the Trove classifiers). For more details, see `this explanation
- <https://github.com/jaraco/skeleton/issues/1>`_.
-
Usage
=====
@@ -60,19 +61,21 @@
print(port, "is available for binding")
Portend additionally exposes the lower-level port checking functionality
- in the :class:`Checker` class, which currently exposes only one public
- method, ``assert_free``.
+ in the ``Checker`` class, which currently exposes only one public
+ method, ``assert_free``::
portend.Checker().assert_free('localhost', 31923)
If assert_free is passed a host/port combination that is occupied by
a bound listener (i.e. a TCP connection is established to that host/port),
- assert_free will raise a :class:`PortNotFree` exception.
+ assert_free will raise a ``PortNotFree`` exception.
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Requires-Python: >=2.7
+Provides-Extra: docs
+Provides-Extra: testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/portend.egg-info/SOURCES.txt new/portend-2.5/portend.egg-info/SOURCES.txt
--- old/portend-1.8/portend.egg-info/SOURCES.txt 2017-01-23 15:32:47.000000000 +0100
+++ new/portend-2.5/portend.egg-info/SOURCES.txt 2019-06-11 02:57:16.000000000 +0200
@@ -1,20 +1,24 @@
+.flake8
+.pre-commit-config.yaml
+.readthedocs.yml
.travis.yml
CHANGES.rst
+LICENSE
README.rst
+appveyor.yml
portend.py
+pyproject.toml
pytest.ini
setup.cfg
setup.py
+skeleton.md
test_portend.py
tox.ini
docs/conf.py
docs/history.rst
docs/index.rst
-docs/requirements.txt
portend.egg-info/PKG-INFO
portend.egg-info/SOURCES.txt
portend.egg-info/dependency_links.txt
-portend.egg-info/namespace_packages.txt
portend.egg-info/requires.txt
-portend.egg-info/top_level.txt
-tests/requirements.txt
\ No newline at end of file
+portend.egg-info/top_level.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/portend.egg-info/namespace_packages.txt new/portend-2.5/portend.egg-info/namespace_packages.txt
--- old/portend-1.8/portend.egg-info/namespace_packages.txt 2017-01-23 15:32:47.000000000 +0100
+++ new/portend-2.5/portend.egg-info/namespace_packages.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/portend.egg-info/requires.txt new/portend-2.5/portend.egg-info/requires.txt
--- old/portend-1.8/portend.egg-info/requires.txt 2017-01-23 15:32:47.000000000 +0100
+++ new/portend-2.5/portend.egg-info/requires.txt 2019-06-11 02:57:16.000000000 +0200
@@ -1,4 +1,12 @@
-tempora
+tempora>=1.8
-[:python_version == "2.6"]
-argparse
+[docs]
+sphinx
+jaraco.packaging>=3.2
+rst.linker>=1.9
+
+[testing]
+pytest!=3.7.3,>=3.5
+pytest-checkdocs
+pytest-flake8
+pytest-black-multipy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/portend.py new/portend-2.5/portend.py
--- old/portend-1.8/portend.py 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/portend.py 2019-06-11 02:56:58.000000000 +0200
@@ -8,249 +8,215 @@
import time
import socket
-import datetime
import argparse
import sys
import itertools
import contextlib
-import collections
-import textwrap
-import warnings
+import platform
+
+try:
+ from collections import abc
+except ImportError:
+ import collections as abc
from tempora import timing
def client_host(server_host):
- """Return the host on which a client can connect to the given listener."""
- if server_host == '0.0.0.0':
- # 0.0.0.0 is INADDR_ANY, which should answer on localhost.
- return '127.0.0.1'
- if server_host in ('::', '::0', '::0.0.0.0'):
- # :: is IN6ADDR_ANY, which should answer on localhost.
- # ::0 and ::0.0.0.0 are non-canonical but common
- # ways to write IN6ADDR_ANY.
- return '::1'
- return server_host
-
-
-def _getaddrinfo(host, port, *args, **kwargs):
- """
- Provide a fallback when getaddrinfo fails.
- """
- try:
- return socket.getaddrinfo(host, port, *args, **kwargs)
- except socket.gaierror:
- msg = textwrap.dedent("""
- This functionality is being considered for removal. If you
- encounter this message, please describe your use-case
- at https://github.com/jaraco/portend/issues/1.
- """).lstrip()
- warnings.warn(msg)
- host = client_host(host)
- if ':' in host:
- family = socket.AF_INET6
- addr = host, port, 0, 0
- else:
- family = socket.AF_INET
- addr = host, port
- item = family, socket.SOCK_STREAM, 0, "", addr
- return [item]
+ """Return the host on which a client can connect to the given listener."""
+ if server_host == '0.0.0.0':
+ # 0.0.0.0 is INADDR_ANY, which should answer on localhost.
+ return '127.0.0.1'
+ if server_host in ('::', '::0', '::0.0.0.0'):
+ # :: is IN6ADDR_ANY, which should answer on localhost.
+ # ::0 and ::0.0.0.0 are non-canonical but common
+ # ways to write IN6ADDR_ANY.
+ return '::1'
+ return server_host
class Checker(object):
- def __init__(self, timeout=1.0):
- self.timeout = timeout
+ def __init__(self, timeout=1.0):
+ self.timeout = timeout
- def assert_free(self, host, port=None):
- """
- Assert that the given addr is free
- in that all attempts to connect fail within the timeout
- or raise a PortNotFree exception.
-
- >>> free_port = find_available_local_port()
-
- >>> Checker().assert_free('localhost', free_port)
- >>> Checker().assert_free('127.0.0.1', free_port)
- >>> Checker().assert_free('::1', free_port)
-
- Also accepts an addr tuple
-
- >>> addr = '::1', free_port, 0, 0
- >>> Checker().assert_free(addr)
- """
- if port is None and isinstance(host, collections.Sequence):
- host, port = host[:2]
- info = _getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
- list(itertools.starmap(self._connect, info))
-
- def _connect(self, af, socktype, proto, canonname, sa):
- s = socket.socket(af, socktype, proto)
- # fail fast with a small timeout
- s.settimeout(self.timeout)
-
- with contextlib.closing(s):
- try:
- s.connect(sa)
- except socket.error:
- return
-
- # the connect succeeded, so the port isn't free
- port, host = sa[:2]
- tmpl = "Port {port} is in use on {host}."
- raise PortNotFree(tmpl.format(**locals()))
+ def assert_free(self, host, port=None):
+ """
+ Assert that the given addr is free
+ in that all attempts to connect fail within the timeout
+ or raise a PortNotFree exception.
+
+ >>> free_port = find_available_local_port()
+
+ >>> Checker().assert_free('localhost', free_port)
+ >>> Checker().assert_free('127.0.0.1', free_port)
+ >>> Checker().assert_free('::1', free_port)
+
+ Also accepts an addr tuple
+
+ >>> addr = '::1', free_port, 0, 0
+ >>> Checker().assert_free(addr)
+
+ Host might refer to a server bind address like '::', which
+ should use localhost to perform the check.
+
+ >>> Checker().assert_free('::', free_port)
+ """
+ if port is None and isinstance(host, abc.Sequence):
+ host, port = host[:2]
+ if platform.system() == 'Windows':
+ host = client_host(host)
+ info = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
+ list(itertools.starmap(self._connect, info))
+
+ def _connect(self, af, socktype, proto, canonname, sa):
+ s = socket.socket(af, socktype, proto)
+ # fail fast with a small timeout
+ s.settimeout(self.timeout)
+
+ with contextlib.closing(s):
+ try:
+ s.connect(sa)
+ except socket.error:
+ return
+
+ # the connect succeeded, so the port isn't free
+ port, host = sa[:2]
+ tmpl = "Port {port} is in use on {host}."
+ raise PortNotFree(tmpl.format(**locals()))
class Timeout(IOError):
- pass
+ pass
class PortNotFree(IOError):
- pass
+ pass
def free(host, port, timeout=float('Inf')):
- """
- Wait for the specified port to become free (dropping or rejecting
- requests). Return when the port is free or raise a Timeout if timeout has
- elapsed.
-
- Timeout may be specified in seconds or as a timedelta.
- If timeout is None or ∞, the routine will run indefinitely.
-
- >>> free('localhost', find_available_local_port())
- """
- if not host:
- raise ValueError("Host values of '' or None are not allowed.")
-
- if isinstance(timeout, datetime.timedelta):
- timeout = timeout.total_seconds()
-
- if timeout is None:
- # treat None as infinite timeout
- timeout = float('Inf')
-
- watch = timing.Stopwatch()
-
- while total_seconds(watch.split()) < timeout:
- try:
- # Expect a free port, so use a small timeout
- Checker(timeout=0.1).assert_free(host, port)
- return
- except PortNotFree:
- # Politely wait.
- time.sleep(0.1)
+ """
+ Wait for the specified port to become free (dropping or rejecting
+ requests). Return when the port is free or raise a Timeout if timeout has
+ elapsed.
+
+ Timeout may be specified in seconds or as a timedelta.
+ If timeout is None or ∞, the routine will run indefinitely.
+
+ >>> free('localhost', find_available_local_port())
+ """
+ if not host:
+ raise ValueError("Host values of '' or None are not allowed.")
+
+ timer = timing.Timer(timeout)
+
+ while True:
+ try:
+ # Expect a free port, so use a small timeout
+ Checker(timeout=0.1).assert_free(host, port)
+ return
+ except PortNotFree:
+ if timer.expired():
+ raise Timeout("Port {port} not free on {host}.".format(**locals()))
+ # Politely wait.
+ time.sleep(0.1)
+
- raise Timeout("Port {port} not free on {host}.".format(**locals()))
wait_for_free_port = free
def occupied(host, port, timeout=float('Inf')):
- """
- Wait for the specified port to become occupied (accepting requests).
- Return when the port is occupied or raise a Timeout if timeout has
- elapsed.
-
- Timeout may be specified in seconds or as a timedelta.
- If timeout is None or ∞, the routine will run indefinitely.
-
- >>> occupied('localhost', find_available_local_port(), .1) # doctest: +IGNORE_EXCEPTION_DETAIL
- Traceback (most recent call last):
- ...
- Timeout: Port ... not bound on localhost.
- """
- if not host:
- raise ValueError("Host values of '' or None are not allowed.")
-
- if isinstance(timeout, datetime.timedelta):
- timeout = timeout.total_seconds()
-
- if timeout is None:
- # treat None as infinite timeout
- timeout = float('Inf')
-
- watch = timing.Stopwatch()
-
- while total_seconds(watch.split()) < timeout:
- try:
- Checker(timeout=.5).assert_free(host, port)
- # Politely wait
- time.sleep(0.1)
- except PortNotFree:
- # port is occupied
- return
+ """
+ Wait for the specified port to become occupied (accepting requests).
+ Return when the port is occupied or raise a Timeout if timeout has
+ elapsed.
+
+ Timeout may be specified in seconds or as a timedelta.
+ If timeout is None or ∞, the routine will run indefinitely.
+
+ >>> occupied('localhost', find_available_local_port(), .1)
+ Traceback (most recent call last):
+ ...
+ Timeout: Port ... not bound on localhost.
+ """
+ if not host:
+ raise ValueError("Host values of '' or None are not allowed.")
+
+ timer = timing.Timer(timeout)
+
+ while True:
+ try:
+ Checker(timeout=0.5).assert_free(host, port)
+ if timer.expired():
+ raise Timeout("Port {port} not bound on {host}.".format(**locals()))
+ # Politely wait
+ time.sleep(0.1)
+ except PortNotFree:
+ # port is occupied
+ return
+
- raise Timeout("Port {port} not bound on {host}.".format(**locals()))
wait_for_occupied_port = occupied
def find_available_local_port():
- """
- Find a free port on localhost.
+ """
+ Find a free port on localhost.
- >>> 0 < find_available_local_port() < 65536
- True
- """
- sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
- addr = '', 0
- sock.bind(addr)
- addr, port = sock.getsockname()[:2]
- sock.close()
- return port
+ >>> 0 < find_available_local_port() < 65536
+ True
+ """
+ infos = socket.getaddrinfo(None, 0, socket.AF_UNSPEC, socket.SOCK_STREAM)
+ family, proto, _, _, addr = next(iter(infos))
+ sock = socket.socket(family, proto)
+ sock.bind(addr)
+ addr, port = sock.getsockname()[:2]
+ sock.close()
+ return port
class HostPort(str):
- """
- A simple representation of a host/port pair as a string
+ """
+ A simple representation of a host/port pair as a string
- >>> hp = HostPort('localhost:32768')
+ >>> hp = HostPort('localhost:32768')
- >>> hp.host
- 'localhost'
+ >>> hp.host
+ 'localhost'
- >>> hp.port
- 32768
-
- >>> len(hp)
- 15
- """
-
- @property
- def host(self):
- host, sep, port = self.partition(':')
- return host
-
- @property
- def port(self):
- host, sep, port = self.partition(':')
- return int(port)
+ >>> hp.port
+ 32768
+
+ >>> len(hp)
+ 15
+ """
+
+ @property
+ def host(self):
+ host, sep, port = self.partition(':')
+ return host
+
+ @property
+ def port(self):
+ host, sep, port = self.partition(':')
+ return int(port)
def _main():
- parser = argparse.ArgumentParser()
- global_lookup = lambda key: globals()[key]
- parser.add_argument('target', metavar='host:port', type=HostPort)
- parser.add_argument('func', metavar='state', type=global_lookup)
- parser.add_argument('-t', '--timeout', default=None, type=float)
- args = parser.parse_args()
- try:
- args.func(args.target.host, args.target.port, timeout=args.timeout)
- except Timeout as timeout:
- print(timeout, file=sys.stderr)
- raise SystemExit(1)
-
-
-# from jaraco.compat
-def total_seconds(td):
- """
- Python 2.7 adds a total_seconds method to timedelta objects.
- See http://docs.python.org/library/datetime.html#datetime.timedelta.total_secon…
- """
- try:
- result = td.total_seconds()
- except AttributeError:
- result = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
- return result
+ parser = argparse.ArgumentParser()
+
+ def global_lookup(key):
+ return globals()[key]
+
+ parser.add_argument('target', metavar='host:port', type=HostPort)
+ parser.add_argument('func', metavar='state', type=global_lookup)
+ parser.add_argument('-t', '--timeout', default=None, type=float)
+ args = parser.parse_args()
+ try:
+ args.func(args.target.host, args.target.port, timeout=args.timeout)
+ except Timeout as timeout:
+ print(timeout, file=sys.stderr)
+ raise SystemExit(1)
if __name__ == '__main__':
- _main()
+ _main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/pyproject.toml new/portend-2.5/pyproject.toml
--- old/portend-1.8/pyproject.toml 1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/pyproject.toml 2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,6 @@
+[build-system]
+requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"]
+build-backend = "setuptools.build_meta"
+
+[tool.black]
+skip-string-normalization = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/pytest.ini new/portend-2.5/pytest.ini
--- old/portend-1.8/pytest.ini 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/pytest.ini 2019-06-11 02:56:58.000000000 +0200
@@ -1,4 +1,11 @@
[pytest]
-norecursedirs=dist build .tox docs
-addopts=--doctest-modules
-doctest_optionflags=ALLOW_UNICODE ELLIPSIS
+norecursedirs=dist build .tox .eggs
+addopts=--doctest-modules --flake8 --black
+doctest_optionflags=ALLOW_UNICODE ELLIPSIS IGNORE_EXCEPTION_DETAIL
+filterwarnings=
+ ignore:Possible nested set::pycodestyle:113
+ ignore:Using or importing the ABCs::flake8:410
+ # workaround for https://sourceforge.net/p/docutils/bugs/348/
+ ignore:'U' mode is deprecated::docutils.io
+ # workaround for https://gitlab.com/pycqa/flake8/issues/275
+ ignore:You passed a bytestring as `filenames`.::flake8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/setup.cfg new/portend-2.5/setup.cfg
--- old/portend-1.8/setup.cfg 2017-01-23 15:32:47.000000000 +0100
+++ new/portend-2.5/setup.cfg 2019-06-11 02:57:16.000000000 +0200
@@ -1,12 +1,43 @@
-[aliases]
-release = dists upload
-dists = clean --all sdist bdist_wheel
-
-[wheel]
+[bdist_wheel]
universal = 1
+[metadata]
+license_file = LICENSE
+name = portend
+author = Jason R. Coombs
+author_email = jaraco(a)jaraco.com
+description = TCP port monitoring and discovery
+long_description = file:README.rst
+url = https://github.com/jaraco/portend
+classifiers =
+ Development Status :: 5 - Production/Stable
+ Intended Audience :: Developers
+ License :: OSI Approved :: MIT License
+ Programming Language :: Python :: 2.7
+ Programming Language :: Python :: 3
+
+[options]
+py_modules = portend
+include_package_data = true
+python_requires = >=2.7
+install_requires =
+ tempora>=1.8
+setup_requires = setuptools_scm >= 1.15.0
+
+[options.extras_require]
+testing =
+ pytest >= 3.5, !=3.7.3
+ pytest-checkdocs
+ pytest-flake8
+ pytest-black-multipy
+docs =
+ sphinx
+ jaraco.packaging >= 3.2
+ rst.linker >= 1.9
+
+[options.entry_points]
+
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/setup.py new/portend-2.5/setup.py
--- old/portend-1.8/setup.py 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/setup.py 2019-06-11 02:56:58.000000000 +0200
@@ -1,50 +1,6 @@
#!/usr/bin/env python
-# Project skeleton maintained at https://github.com/jaraco/skeleton
-
-import io
-
import setuptools
-with io.open('README.rst', encoding='utf-8') as readme:
- long_description = readme.read()
-
-name = 'portend'
-description = 'TCP port monitoring utilities'
-
-params = dict(
- name=name,
- use_scm_version=True,
- author="Jason R. Coombs",
- author_email="jaraco(a)jaraco.com",
- description=description or name,
- long_description=long_description,
- url="https://github.com/jaraco/" + name,
- packages=setuptools.find_packages(),
- include_package_data=True,
- py_modules=['portend'],
- namespace_packages=name.split('.')[:-1],
- install_requires=[
- 'tempora',
- ],
- extras_require={
- ':python_version == "2.6"': [
- 'argparse',
- ],
- },
- setup_requires=[
- 'setuptools_scm>=1.15.0',
- ],
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: MIT License",
- "Programming Language :: Python :: 2.6",
- "Programming Language :: Python :: 2.7",
- "Programming Language :: Python :: 3",
- ],
- entry_points={
- },
-)
-if __name__ == '__main__':
- setuptools.setup(**params)
+if __name__ == "__main__":
+ setuptools.setup(use_scm_version=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/skeleton.md new/portend-2.5/skeleton.md
--- old/portend-1.8/skeleton.md 1970-01-01 01:00:00.000000000 +0100
+++ new/portend-2.5/skeleton.md 2019-06-11 02:56:58.000000000 +0200
@@ -0,0 +1,129 @@
+# Overview
+
+This project is merged with [skeleton](https://github.com/jaraco/skeleton). What is skeleton? It's the scaffolding of a Python project jaraco [introduced in his blog](https://blog.jaraco.com/a-project-skeleton-for-python-projects/). It seeks to provide a means to re-use techniques and inherit advances when managing projects for distribution.
+
+## An SCM Managed Approach
+
+While maintaining dozens of projects in PyPI, jaraco derives best practices for project distribution and publishes them in the [skeleton repo](https://github.com/jaraco/skeleton), a git repo capturing the evolution and culmination of these best practices.
+
+It's intended to be used by a new or existing project to adopt these practices and honed and proven techniques. Adopters are encouraged to use the project directly and maintain a small deviation from the technique, make their own fork for more substantial changes unique to their environment or preferences, or simply adopt the skeleton once and abandon it thereafter.
+
+The primary advantage to using an SCM for maintaining these techniques is that those tools help facilitate the merge between the template and its adopting projects.
+
+Another advantage to using an SCM-managed approach is that tools like GitHub recognize that a change in the skeleton is the _same change_ across all projects that merge with that skeleton. Without the ancestry, with a traditional copy/paste approach, a [commit like this](https://github.com/jaraco/skeleton/commit/12eed1326e1bc26ce256e7b3f8c… would produce notifications in the upstream project issue for each and every application, but because it's centralized, GitHub provides just the one notification when the change is added to the skeleton.
+
+# Usage
+
+## new projects
+
+To use skeleton for a new project, simply pull the skeleton into a new project:
+
+```
+$ git init my-new-project
+$ cd my-new-project
+$ git pull gh://jaraco/skeleton
+```
+
+Now customize the project to suit your individual project needs.
+
+## existing projects
+
+If you have an existing project, you can still incorporate the skeleton by merging it into the codebase.
+
+```
+$ git merge skeleton --allow-unrelated-histories
+```
+
+The `--allow-unrelated-histories` is necessary because the history from the skeleton was previously unrelated to the existing codebase. Resolve any merge conflicts and commit to the master, and now the project is based on the shared skeleton.
+
+## Updating
+
+Whenever a change is needed or desired for the general technique for packaging, it can be made in the skeleton project and then merged into each of the derived projects as needed, recommended before each release. As a result, features and best practices for packaging are centrally maintained and readily trickle into a whole suite of packages. This technique lowers the amount of tedious work necessary to create or maintain a project, and coupled with other techniques like continuous integration and deployment, lowers the cost of creating and maintaining refined Python projects to just a few, familiar git operations.
+
+Thereafter, the target project can make whatever customizations it deems relevant to the scaffolding. The project may even at some point decide that the divergence is too great to merit renewed merging with the original skeleton. This approach applies maximal guidance while creating minimal constraints.
+
+# Features
+
+The features/techniques employed by the skeleton include:
+
+- PEP 517/518 based build relying on setuptools as the build tool
+- setuptools declarative configuration using setup.cfg
+- tox for running tests
+- A README.rst as reStructuredText with some popular badges, but with readthedocs and appveyor badges commented out
+- A CHANGES.rst file intended for publishing release notes about the project
+- Use of [black](https://black.readthedocs.io/en/stable/) for code formatting (disabled on unsupported Python 3.5 and earlier)
+
+## Packaging Conventions
+
+A pyproject.toml is included to enable PEP 517 and PEP 518 compatibility and declares the requirements necessary to build the project on setuptools (a minimum version compatible with setup.cfg declarative config).
+
+The setup.cfg file implements the following features:
+
+- Assumes universal wheel for release
+- Advertises the project's LICENSE file (MIT by default)
+- Reads the README.rst file into the long description
+- Some common Trove classifiers
+- Includes all packages discovered in the repo
+- Data files in the package are also included (not just Python files)
+- Declares the required Python versions
+- Declares install requirements (empty by default)
+- Declares setup requirements for legacy environments
+- Supplies two 'extras':
+ - testing: requirements for running tests
+ - docs: requirements for building docs
+ - these extras split the declaration into "upstream" (requirements as declared by the skeleton) and "local" (those specific to the local project); these markers help avoid merge conflicts
+- Placeholder for defining entry points
+
+Additionally, the setup.py file declares `use_scm_version` which relies on [setuptools_scm](https://pypi.org/project/setuptools_scm) to do two things:
+
+- derive the project version from SCM tags
+- ensure that all files committed to the repo are automatically included in releases
+
+## Running Tests
+
+The skeleton assumes the developer has [tox](https://pypi.org/project/tox) installed. The developer is expected to run `tox` to run tests on the current Python version using [pytest](https://pypi.org/project/pytest).
+
+Other environments (invoked with `tox -e {name}`) supplied include:
+
+ - a `build-docs` environment to build the documentation
+ - a `release` environment to publish the package to PyPI
+
+A pytest.ini is included to define common options around running tests. In particular:
+
+- rely on default test discovery in the current directory
+- avoid recursing into common directories not containing tests
+- run doctests on modules and invoke flake8 tests
+- in doctests, allow unicode literals and regular literals to match, allowing for doctests to run on Python 2 and 3. Also enable ELLIPSES, a default that would be undone by supplying the prior option.
+- filters out known warnings caused by libraries/functionality included by the skeleton
+
+Relies a .flake8 file to correct some default behaviors:
+
+- disable mutually incompatible rules W503 and W504
+- support for black format
+
+## Continuous Integration
+
+The project is pre-configured to run tests in [Travis-CI](https://travis-ci.org) (.travis.yml). Any new project must be enabled either through their web site or with the `travis enable` command. In addition to running tests, an additional deploy stage is configured to automatically release tagged commits. The username and password for PyPI must be configured for each project using the `travis` command and only after the travis project is created. As releases are cut with [twine](https://pypi.org/project/twine), the two values are supplied through the `TWINE_USERNAME` and `TWINE_PASSWORD`. To configure the latter as a secret, run the following command:
+
+```
+echo "TWINE_PASSWORD={password}" | travis encrypt
+```
+
+Or disable it in the CI definition and configure it through the web UI.
+
+Features include:
+- test against Python 2 and 3
+- run on Ubuntu Xenial
+- correct for broken IPv6
+
+Also provided is a minimal template for running under Appveyor (Windows).
+
+## Building Documentation
+
+Documentation is automatically built by [Read the Docs](https://readthedocs.org) when the project is registered with it, by way of the .readthedocs.yml file. To test the docs build manually, a tox env may be invoked as `tox -e build-docs`. Both techniques rely on the dependencies declared in `setup.cfg/options.extras_require.docs`.
+
+In addition to building the sphinx docs scaffolded in `docs/`, the docs build a `history.html` file that first injects release dates and hyperlinks into the CHANGES.rst before incorporating it as history in the docs.
+
+## Cutting releases
+
+By default, tagged commits are released through the continuous integration deploy stage.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/test_portend.py new/portend-2.5/test_portend.py
--- old/portend-1.8/test_portend.py 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/test_portend.py 2019-06-11 02:56:58.000000000 +0200
@@ -2,53 +2,68 @@
import contextlib
import pytest
+from tempora import timing
import portend
def socket_infos():
- """
- Generate addr infos for connections to localhost
- """
- host = None # all available interfaces
- port = portend.find_available_local_port()
- family = socket.AF_UNSPEC
- socktype = socket.SOCK_STREAM
- proto = 0
- flags = socket.AI_PASSIVE
- return socket.getaddrinfo(host, port, family, socktype, proto, flags)
+ """
+ Generate addr infos for connections to localhost
+ """
+ host = None # all available interfaces
+ port = portend.find_available_local_port()
+ family = socket.AF_UNSPEC
+ socktype = socket.SOCK_STREAM
+ proto = 0
+ flags = socket.AI_PASSIVE
+ return socket.getaddrinfo(host, port, family, socktype, proto, flags)
def id_for_info(info):
- af, = info[:1]
- return str(af)
+ af, = info[:1]
+ return str(af)
+
def build_addr_infos():
- params = list(socket_infos())
- ids = list(map(id_for_info, params))
- return locals()
+ params = list(socket_infos())
+ ids = list(map(id_for_info, params))
+ return locals()
@pytest.fixture(**build_addr_infos())
def listening_addr(request):
- af, socktype, proto, canonname, sa = request.param
- sock = socket.socket(af, socktype, proto)
- sock.bind(sa)
- sock.listen(5)
- with contextlib.closing(sock):
- yield sa
+ af, socktype, proto, canonname, sa = request.param
+ sock = socket.socket(af, socktype, proto)
+ sock.bind(sa)
+ sock.listen(5)
+ with contextlib.closing(sock):
+ yield sa
@pytest.fixture(**build_addr_infos())
def nonlistening_addr(request):
- af, socktype, proto, canonname, sa = request.param
- return sa
+ af, socktype, proto, canonname, sa = request.param
+ return sa
-class TestChecker:
- def test_check_port_listening(self, listening_addr):
- with pytest.raises(portend.PortNotFree):
- portend.Checker().assert_free(listening_addr)
+(a)pytest.fixture
+def immediate_timeout(monkeypatch):
+ monkeypatch.setattr(timing.Timer, 'expired', lambda: True)
- def test_check_port_nonlistening(self, nonlistening_addr):
- portend.Checker().assert_free(nonlistening_addr)
+
+class TestChecker:
+ def test_check_port_listening(self, listening_addr):
+ with pytest.raises(portend.PortNotFree):
+ portend.Checker().assert_free(listening_addr)
+
+ def test_check_port_nonlistening(self, nonlistening_addr):
+ portend.Checker().assert_free(nonlistening_addr)
+
+ def test_free_with_immediate_timeout(self, nonlistening_addr, immediate_timeout):
+ host, port = nonlistening_addr[:2]
+ portend.free(host, port, timeout=1.0)
+
+ def test_occupied_with_immediate_timeout(self, listening_addr, immediate_timeout):
+ host, port = listening_addr[:2]
+ portend.occupied(host, port, timeout=1.0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/tests/requirements.txt new/portend-2.5/tests/requirements.txt
--- old/portend-1.8/tests/requirements.txt 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/tests/requirements.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-pytest >= 2.8
-pytest-warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/portend-1.8/tox.ini new/portend-2.5/tox.ini
--- old/portend-1.8/tox.ini 2017-01-23 15:32:22.000000000 +0100
+++ new/portend-2.5/tox.ini 2019-06-11 02:56:58.000000000 +0200
@@ -1,6 +1,32 @@
+[tox]
+envlist = python
+minversion = 3.2
+# https://github.com/jaraco/skeleton/issues/6
+tox_pip_extensions_ext_venv_update = true
+
[testenv]
deps =
- -rtests/requirements.txt
-
-commands = py.test {posargs}
+ setuptools>=31.0.1
+commands =
+ pytest {posargs}
usedevelop = True
+extras = testing
+
+[testenv:build-docs]
+extras =
+ docs
+ testing
+changedir = docs
+commands =
+ python -m sphinx . {toxinidir}/build/html
+
+[testenv:release]
+skip_install = True
+deps =
+ pep517>=0.5
+ twine>=1.13
+ path.py
+commands =
+ python -c "import path; path.Path('dist').rmtree_p()"
+ python -m pep517.build .
+ python -m twine upload dist/*
1
0
Hello community,
here is the log from the commit of package python for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python (Old)
and /work/SRC/openSUSE:Leap:15.2/.python.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python"
Sun Mar 1 08:50:54 2020 rev:51 rq:780274 version:2.7.17
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python/python-base.changes 2020-01-15 15:45:48.231335758 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python.new.26092/python-base.changes 2020-03-01 08:50:59.721228071 +0100
@@ -1,0 +2,77 @@
+Sat Feb 8 23:29:28 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Add CVE-2019-9674-zip-bomb.patch to improve documentation
+ warning about dangers of zip-bombs and other security problems
+ with zipfile library. (bsc#1162825 CVE-2019-9674)
+
+-------------------------------------------------------------------
+Sat Feb 8 22:30:51 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Change to Requires: libpython%{so_version} == %{version}-%{release}
+ to python-base to keep both packages always synchronized (add
+ %{so_version}) (bsc#1162224).
+
+-------------------------------------------------------------------
+Thu Feb 6 23:14:47 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Add CVE-2020-8492-urllib-ReDoS.patch fixing the security bug
+ "Python urrlib allowed an HTTP server to conduct Regular
+ Expression Denial of Service (ReDoS)" (bsc#1162367)
+
+-------------------------------------------------------------------
+Mon Feb 3 19:30:31 UTC 2020 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Provide python-testsuite from devel subkg to ease py2->py3
+ dependencies
+
+-------------------------------------------------------------------
+Mon Jan 27 16:47:56 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Add python-2.7.17-switch-off-failing-SSL-tests.patch to switch
+ off tests coliding with the combination of modern Python and
+ ancient OpenSSL on SLE-12.
+
+-------------------------------------------------------------------
+Fri Jan 10 16:01:57 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- libnsl is required only on more recent SLEs and openSUSE, older
+ glibc supported NIS on its own.
+
+-------------------------------------------------------------------
+Thu Jan 2 10:34:17 UTC 2020 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add provides in gdbm subpackage to provide dbm symbols. This
+ allows us to use %%{python_module dbm} as a dependency and have
+ it properly resolved for both python2 and python3
+
+-------------------------------------------------------------------
+Thu Dec 19 08:47:01 UTC 2019 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Drop appstream-glib BuildRequires and no longer call
+ appstream-util validate-relax: eliminate a build cycle between
+ as-glib and python. The only thing would would gain by calling
+ as-uril is catching if upstream breaks the appdata.xml file in a
+ future release. Considering py2 is dying, chances for a new
+ release, let alone one breaking the xml file, are slim.
+
+-------------------------------------------------------------------
+Wed Dec 11 14:35:46 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Unify packages among openSUSE:Factory and SLE versions.
+ (bsc#1159035) ; add missing records to this changelog.
+- Add idle.desktop and idle.appdata.xml to provide IDLE in menus
+ (bsc#1153830)
+
+-------------------------------------------------------------------
+Wed Dec 4 18:12:17 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add python2_split_startup Provide to make it possible to
+ conflict older packages by shared-python-startup.
+
+-------------------------------------------------------------------
+Fri Nov 22 13:10:03 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Move /etc/pythonstart script to shared-python-startup
+ package.
+
+-------------------------------------------------------------------
@@ -8,0 +86,24 @@
+Tue Nov 5 04:24:05 UTC 2019 - Steve Kowalik <steven.kowalik(a)suse.com>
+
+- Add adapted-from-F00251-change-user-install-location.patch fixing
+ pip/distutils to install into /usr/local.
+
+-------------------------------------------------------------------
+Thu Oct 24 14:40:39 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Update to 2.7.17:
+ - a bug fix release in the Python 2.7.x series. It is expected
+ to be the penultimate release for Python 2.7.
+- Removed patches included upstream:
+ - CVE-2018-20852-cookie-domain-check.patch
+ - CVE-2019-16935-xmlrpc-doc-server_title.patch
+ - CVE-2019-9636-netloc-no-decompose-characters.patch
+ - CVE-2019-9947-no-ctrl-char-http.patch
+ - CVE-2019-9948-avoid_local-file.patch
+ - python-2.7.14-CVE-2018-1000030-1.patch
+ - python-2.7.14-CVE-2018-1000030-2.patch
+- Renamed remove-static-libpython.diff and python-bsddb6.diff to
+ remove-static-libpython.patch and python-bsddb6.patch to unify
+ filenames.
+
+-------------------------------------------------------------------
@@ -16 +117 @@
-Wed Sep 25 11:42:32 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+Wed Sep 25 13:25:33 UTC 2019 - Bernhard Wiedemann <bwiedemann(a)suse.com>
@@ -18,5 +119 @@
-- bsc#1130840 (CVE-2019-9947): add CVE-2019-9947-no-ctrl-char-http.patch
- Address the issue by disallowing URL paths with embedded
- whitespace or control characters through into the underlying
- http client request. Such potentially malicious header
- injection URLs now cause a ValueError to be raised.
+- Add bpo36302-sort-module-sources.patch (boo#1041090)
@@ -32 +129 @@
-Thu Jul 25 18:31:45 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+Thu Jul 25 19:31:47 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
@@ -40,0 +138,5 @@
+Fri Jul 19 11:19:42 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Skip test_urllib2_localnet that randomly fails in OBS
+
+-------------------------------------------------------------------
@@ -45,2 +147 @@
- (CVE-2019-10160) and getting Lib/urlparse.py and tests in sync
- with the latest upstream state.
+ (CVE-2019-10160)
@@ -50 +151,16 @@
-Mon Apr 8 23:16:54 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+Wed May 29 08:58:16 UTC 2019 - Martin Liška <mliska(a)suse.cz>
+
+- Set _lto_cflags to nil as it will prevent to propage LTO
+ for Python modules that are built in a separate package.
+
+-------------------------------------------------------------------
+Thu May 2 08:40:33 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1130840 (CVE-2019-9947): add CVE-2019-9947-no-ctrl-char-http.patch
+ Address the issue by disallowing URL paths with embedded
+ whitespace or control characters through into the underlying
+ http client request. Such potentially malicious header
+ injection URLs now cause a ValueError to be raised.
+
+-------------------------------------------------------------------
+Mon Apr 8 22:40:01 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
@@ -57 +173 @@
-Fri Mar 29 17:12:43 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+Mon Apr 8 21:13:48 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
@@ -64 +180 @@
- no error will be raised.
+ no error will be raised (CVE-2019-9636).
@@ -67,0 +184,45 @@
+Thu Apr 4 22:28:24 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- (bsc#1111793) Update to 2.7.16:
+ * bugfix-only release: complete list of changes on
+ https://github.com/python/cpython/blob/2.7/Misc/NEWS.d/2.7.16rc1.rst
+ * Removed openssl-111.patch and CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch
+ which are fully included in the tarball.
+ * Updated patches to apply cleanly:
+ CVE-2019-5010-null-defer-x509-cert-DOS.patch
+ bpo36160-init-sysconfig_vars.patch
+ do-not-use-non-ascii-in-test_ssl.patch
+ openssl-111-middlebox-compat.patch
+ openssl-111-ssl_options.patch
+ python-2.5.1-sqlite.patch
+ python-2.6-gettext-plurals.patch
+ python-2.7-dirs.patch
+ python-2.7.2-fix_date_time_compiler.patch
+ python-2.7.4-canonicalize2.patch
+ python-2.7.5-multilib.patch
+ python-2.7.9-ssl_ca_path.patch
+ python-bsddb6.diff
+ remove-static-libpython.patch
+ * Update python-2.7.5-multilib.patch to pass with new platlib
+ regime.
+
+-------------------------------------------------------------------
+Fri Jan 25 16:53:50 CET 2019 - mcepl(a)suse.com
+
+- bsc#1109847: add CVE-2018-14647_XML_SetHashSalt-in_elementtree.patch
+ fixing bpo-34623.
+
+-------------------------------------------------------------------
+Fri Jan 25 16:02:21 CET 2019 - mcepl(a)suse.com
+
+- bsc#1073748: add bpo-29347-dereferencing-undefined-pointers.patch
+ PyWeakref_NewProxy(a)Objects/weakrefobject.c creates new isntance
+ of PyWeakReference struct and does not intialize wr_prev and
+ wr_next of new isntance. These pointers can have garbage and
+ point to random memory locations.
+ Python should not crash while destroying the isntance created
+ in the same interpreter function. As per my understanding, both
+ wr_prev and wr_next of PyWeakReference instance should be
+ initialized to NULL to avoid segfault.
+
+-------------------------------------------------------------------
@@ -79,0 +241,12 @@
+Wed Dec 19 19:29:44 UTC 2018 - Todd R <toddrme2178(a)gmail.com>
++++ 1362 more lines (skipped)
++++ between /work/SRC/openSUSE:Leap:15.2/python/python-base.changes
++++ and /work/SRC/openSUSE:Leap:15.2/.python.new.26092/python-base.changes
--- /work/SRC/openSUSE:Leap:15.2/python/python-doc.changes 2020-01-15 15:45:48.311335803 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python.new.26092/python-doc.changes 2020-03-01 08:50:59.793228214 +0100
@@ -1,0 +2,244 @@
+Sat Feb 8 22:30:51 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Change to Requires: libpython%{so_version} == %{version}-%{release}
+ to python-base to keep both packages always synchronized (add
+ %{so_version}) (bsc#1162224).
+
+-------------------------------------------------------------------
+Thu Feb 6 23:14:47 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Add CVE-2020-8492-urllib-ReDoS.patch fixing the security bug
+ "Python urrlib allowed an HTTP server to conduct Regular
+ Expression Denial of Service (ReDoS)" (bsc#1162367)
+
+-------------------------------------------------------------------
+Mon Feb 3 19:30:31 UTC 2020 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Provide python-testsuite from devel subkg to ease py2->py3
+ dependencies
+
+-------------------------------------------------------------------
+Mon Jan 27 16:47:56 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Add python-2.7.17-switch-off-failing-SSL-tests.patch to switch
+ off tests coliding with the combination of modern Python and
+ ancient OpenSSL on SLE-12.
+
+-------------------------------------------------------------------
+Fri Jan 10 16:01:57 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- libnsl is required only on more recent SLEs and openSUSE, older
+ glibc supported NIS on its own.
+
+-------------------------------------------------------------------
+Thu Jan 2 10:34:17 UTC 2020 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add provides in gdbm subpackage to provide dbm symbols. This
+ allows us to use %%{python_module dbm} as a dependency and have
+ it properly resolved for both python2 and python3
+
+-------------------------------------------------------------------
+Thu Dec 19 08:47:01 UTC 2019 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Drop appstream-glib BuildRequires and no longer call
+ appstream-util validate-relax: eliminate a build cycle between
+ as-glib and python. The only thing would would gain by calling
+ as-uril is catching if upstream breaks the appdata.xml file in a
+ future release. Considering py2 is dying, chances for a new
+ release, let alone one breaking the xml file, are slim.
+
+-------------------------------------------------------------------
+Wed Dec 11 14:35:46 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Unify packages among openSUSE:Factory and SLE versions.
+ (bsc#1159035) ; add missing records to this changelog.
+- Add idle.desktop and idle.appdata.xml to provide IDLE in menus
+ (bsc#1153830)
+
+-------------------------------------------------------------------
+Wed Dec 4 18:12:17 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add python2_split_startup Provide to make it possible to
+ conflict older packages by shared-python-startup.
+
+-------------------------------------------------------------------
+Fri Nov 22 13:10:03 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Move /etc/pythonstart script to shared-python-startup
+ package.
+
+-------------------------------------------------------------------
+Tue Nov 5 11:41:40 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add bpo-36576-skip_tests_for_OpenSSL-111.patch (originally from
+ bpo#36576) skipping tests failing with OpenSSL 1.1.1. Fixes
+ bsc#1149792
+
+-------------------------------------------------------------------
+Tue Nov 5 04:24:05 UTC 2019 - Steve Kowalik <steven.kowalik(a)suse.com>
+
+- Add adapted-from-F00251-change-user-install-location.patch fixing
+ pip/distutils to install into /usr/local.
+
+-------------------------------------------------------------------
+Thu Oct 24 14:40:39 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Update to 2.7.17:
+ - a bug fix release in the Python 2.7.x series. It is expected
+ to be the penultimate release for Python 2.7.
+- Removed patches included upstream:
+ - CVE-2018-20852-cookie-domain-check.patch
+ - CVE-2019-16935-xmlrpc-doc-server_title.patch
+ - CVE-2019-9636-netloc-no-decompose-characters.patch
+ - CVE-2019-9947-no-ctrl-char-http.patch
+ - CVE-2019-9948-avoid_local-file.patch
+ - python-2.7.14-CVE-2018-1000030-1.patch
+ - python-2.7.14-CVE-2018-1000030-2.patch
+- Renamed remove-static-libpython.diff and python-bsddb6.diff to
+ remove-static-libpython.patch and python-bsddb6.patch to unify
+ filenames.
+
+-------------------------------------------------------------------
+Tue Oct 8 19:46:52 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add CVE-2019-16935-xmlrpc-doc-server_title.patch fixing
+ bsc#1153238 (aka CVE-2019-16935) fixing a reflected XSS in
+ python/Lib/DocXMLRPCServer.py
+
+-------------------------------------------------------------------
+Wed Sep 25 13:25:33 UTC 2019 - Bernhard Wiedemann <bwiedemann(a)suse.com>
+
+- Add bpo36302-sort-module-sources.patch (boo#1041090)
+
+-------------------------------------------------------------------
+Mon Sep 16 15:57:54 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add CVE-2019-16056-email-parse-addr.patch fixing the email
+ module wrongly parses email addresses [bsc#1149955,
+ CVE-2019-16056]
+
+-------------------------------------------------------------------
+Thu Jul 25 19:31:47 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- boo#1141853 (CVE-2018-20852) add
+ CVE-2018-20852-cookie-domain-check.patch fixing
+ http.cookiejar.DefaultPolicy.domain_return_ok which did not
+ correctly validate the domain: it could be tricked into sending
+ cookies to the wrong server.
+
+-------------------------------------------------------------------
+Fri Jul 19 11:19:42 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Skip test_urllib2_localnet that randomly fails in OBS
+
+-------------------------------------------------------------------
+Wed Jul 3 21:02:00 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1138459: add CVE-2019-10160-netloc-port-regression.patch
+ which fixes regression introduced by the previous patch.
+ (CVE-2019-10160)
+ Upstream gh#python/cpython#13812
+
+-------------------------------------------------------------------
+Wed May 29 08:58:16 UTC 2019 - Martin Liška <mliska(a)suse.cz>
+
+- Set _lto_cflags to nil as it will prevent to propage LTO
+ for Python modules that are built in a separate package.
+
+-------------------------------------------------------------------
+Thu May 2 08:40:33 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1130840 (CVE-2019-9947): add CVE-2019-9947-no-ctrl-char-http.patch
+ Address the issue by disallowing URL paths with embedded
+ whitespace or control characters through into the underlying
+ http client request. Such potentially malicious header
+ injection URLs now cause a ValueError to be raised.
+
+-------------------------------------------------------------------
+Mon Apr 8 22:40:01 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1130847 (CVE-2019-9948) add CVE-2019-9948-avoid_local-file.patch
+ removing unnecessary (and potentially harmful) URL scheme
+ local-file://.
+
+-------------------------------------------------------------------
+Mon Apr 8 21:13:48 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1129346: add CVE-2019-9636-netloc-no-decompose-characters.patch
+ Characters in the netloc attribute that decompose under NFKC
+ normalization (as used by the IDNA encoding) into any of ``/``,
+ ``?``, ``#``, ``@``, or ``:`` will raise a ValueError. If the
+ URL is decomposed before parsing, or is not a Unicode string,
+ no error will be raised (CVE-2019-9636).
+ Upstream commits e37ef41 and 507bd8c.
+
+-------------------------------------------------------------------
+Thu Apr 4 22:28:24 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- (bsc#1111793) Update to 2.7.16:
+ * bugfix-only release: complete list of changes on
+ https://github.com/python/cpython/blob/2.7/Misc/NEWS.d/2.7.16rc1.rst
+ * Removed openssl-111.patch and CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch
+ which are fully included in the tarball.
+ * Updated patches to apply cleanly:
+ CVE-2019-5010-null-defer-x509-cert-DOS.patch
+ bpo36160-init-sysconfig_vars.patch
+ do-not-use-non-ascii-in-test_ssl.patch
+ openssl-111-middlebox-compat.patch
+ openssl-111-ssl_options.patch
+ python-2.5.1-sqlite.patch
+ python-2.6-gettext-plurals.patch
+ python-2.7-dirs.patch
+ python-2.7.2-fix_date_time_compiler.patch
+ python-2.7.4-canonicalize2.patch
+ python-2.7.5-multilib.patch
+ python-2.7.9-ssl_ca_path.patch
+ python-bsddb6.diff
+ remove-static-libpython.patch
++++ 2094 more lines (skipped)
++++ between /work/SRC/openSUSE:Leap:15.2/python/python-doc.changes
++++ and /work/SRC/openSUSE:Leap:15.2/.python.new.26092/python-doc.changes
--- /work/SRC/openSUSE:Leap:15.2/python/python.changes 2020-01-15 15:45:48.427335870 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python.new.26092/python.changes 2020-03-01 08:50:59.853228334 +0100
@@ -1,0 +2,244 @@
+Sat Feb 8 22:30:51 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Change to Requires: libpython%{so_version} == %{version}-%{release}
+ to python-base to keep both packages always synchronized (add
+ %{so_version}) (bsc#1162224).
+
+-------------------------------------------------------------------
+Thu Feb 6 23:14:47 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Add CVE-2020-8492-urllib-ReDoS.patch fixing the security bug
+ "Python urrlib allowed an HTTP server to conduct Regular
+ Expression Denial of Service (ReDoS)" (bsc#1162367)
+
+-------------------------------------------------------------------
+Mon Feb 3 19:30:31 UTC 2020 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Provide python-testsuite from devel subkg to ease py2->py3
+ dependencies
+
+-------------------------------------------------------------------
+Mon Jan 27 16:47:56 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Add python-2.7.17-switch-off-failing-SSL-tests.patch to switch
+ off tests coliding with the combination of modern Python and
+ ancient OpenSSL on SLE-12.
+
+-------------------------------------------------------------------
+Fri Jan 10 16:01:57 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- libnsl is required only on more recent SLEs and openSUSE, older
+ glibc supported NIS on its own.
+
+-------------------------------------------------------------------
+Thu Jan 2 10:34:17 UTC 2020 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add provides in gdbm subpackage to provide dbm symbols. This
+ allows us to use %%{python_module dbm} as a dependency and have
+ it properly resolved for both python2 and python3
+
+-------------------------------------------------------------------
+Thu Dec 19 08:47:01 UTC 2019 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Drop appstream-glib BuildRequires and no longer call
+ appstream-util validate-relax: eliminate a build cycle between
+ as-glib and python. The only thing would would gain by calling
+ as-uril is catching if upstream breaks the appdata.xml file in a
+ future release. Considering py2 is dying, chances for a new
+ release, let alone one breaking the xml file, are slim.
+
+-------------------------------------------------------------------
+Wed Dec 11 14:35:46 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Unify packages among openSUSE:Factory and SLE versions.
+ (bsc#1159035) ; add missing records to this changelog.
+- Add idle.desktop and idle.appdata.xml to provide IDLE in menus
+ (bsc#1153830)
+
+-------------------------------------------------------------------
+Wed Dec 4 18:12:17 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add python2_split_startup Provide to make it possible to
+ conflict older packages by shared-python-startup.
+
+-------------------------------------------------------------------
+Fri Nov 22 13:10:03 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Move /etc/pythonstart script to shared-python-startup
+ package.
+
+-------------------------------------------------------------------
+Tue Nov 5 11:41:40 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add bpo-36576-skip_tests_for_OpenSSL-111.patch (originally from
+ bpo#36576) skipping tests failing with OpenSSL 1.1.1. Fixes
+ bsc#1149792
+
+-------------------------------------------------------------------
+Tue Nov 5 04:24:05 UTC 2019 - Steve Kowalik <steven.kowalik(a)suse.com>
+
+- Add adapted-from-F00251-change-user-install-location.patch fixing
+ pip/distutils to install into /usr/local.
+
+-------------------------------------------------------------------
+Thu Oct 24 14:40:39 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Update to 2.7.17:
+ - a bug fix release in the Python 2.7.x series. It is expected
+ to be the penultimate release for Python 2.7.
+- Removed patches included upstream:
+ - CVE-2018-20852-cookie-domain-check.patch
+ - CVE-2019-16935-xmlrpc-doc-server_title.patch
+ - CVE-2019-9636-netloc-no-decompose-characters.patch
+ - CVE-2019-9947-no-ctrl-char-http.patch
+ - CVE-2019-9948-avoid_local-file.patch
+ - python-2.7.14-CVE-2018-1000030-1.patch
+ - python-2.7.14-CVE-2018-1000030-2.patch
+- Renamed remove-static-libpython.diff and python-bsddb6.diff to
+ remove-static-libpython.patch and python-bsddb6.patch to unify
+ filenames.
+
+-------------------------------------------------------------------
+Tue Oct 8 19:46:52 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add CVE-2019-16935-xmlrpc-doc-server_title.patch fixing
+ bsc#1153238 (aka CVE-2019-16935) fixing a reflected XSS in
+ python/Lib/DocXMLRPCServer.py
+
+-------------------------------------------------------------------
+Wed Sep 25 13:25:33 UTC 2019 - Bernhard Wiedemann <bwiedemann(a)suse.com>
+
+- Add bpo36302-sort-module-sources.patch (boo#1041090)
+
+-------------------------------------------------------------------
+Mon Sep 16 15:57:54 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Add CVE-2019-16056-email-parse-addr.patch fixing the email
+ module wrongly parses email addresses [bsc#1149955,
+ CVE-2019-16056]
+
+-------------------------------------------------------------------
+Thu Jul 25 19:31:47 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- boo#1141853 (CVE-2018-20852) add
+ CVE-2018-20852-cookie-domain-check.patch fixing
+ http.cookiejar.DefaultPolicy.domain_return_ok which did not
+ correctly validate the domain: it could be tricked into sending
+ cookies to the wrong server.
+
+-------------------------------------------------------------------
+Fri Jul 19 11:19:42 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Skip test_urllib2_localnet that randomly fails in OBS
+
+-------------------------------------------------------------------
+Wed Jul 3 21:02:00 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1138459: add CVE-2019-10160-netloc-port-regression.patch
+ which fixes regression introduced by the previous patch.
+ (CVE-2019-10160)
+ Upstream gh#python/cpython#13812
+
+-------------------------------------------------------------------
+Wed May 29 08:58:16 UTC 2019 - Martin Liška <mliska(a)suse.cz>
+
+- Set _lto_cflags to nil as it will prevent to propage LTO
+ for Python modules that are built in a separate package.
+
+-------------------------------------------------------------------
+Thu May 2 08:40:33 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1130840 (CVE-2019-9947): add CVE-2019-9947-no-ctrl-char-http.patch
+ Address the issue by disallowing URL paths with embedded
+ whitespace or control characters through into the underlying
+ http client request. Such potentially malicious header
+ injection URLs now cause a ValueError to be raised.
+
+-------------------------------------------------------------------
+Mon Apr 8 22:40:01 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1130847 (CVE-2019-9948) add CVE-2019-9948-avoid_local-file.patch
+ removing unnecessary (and potentially harmful) URL scheme
+ local-file://.
+
+-------------------------------------------------------------------
+Mon Apr 8 21:13:48 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- bsc#1129346: add CVE-2019-9636-netloc-no-decompose-characters.patch
+ Characters in the netloc attribute that decompose under NFKC
+ normalization (as used by the IDNA encoding) into any of ``/``,
+ ``?``, ``#``, ``@``, or ``:`` will raise a ValueError. If the
+ URL is decomposed before parsing, or is not a Unicode string,
+ no error will be raised (CVE-2019-9636).
+ Upstream commits e37ef41 and 507bd8c.
+
+-------------------------------------------------------------------
+Thu Apr 4 22:28:24 CEST 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- (bsc#1111793) Update to 2.7.16:
+ * bugfix-only release: complete list of changes on
+ https://github.com/python/cpython/blob/2.7/Misc/NEWS.d/2.7.16rc1.rst
+ * Removed openssl-111.patch and CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch
+ which are fully included in the tarball.
+ * Updated patches to apply cleanly:
+ CVE-2019-5010-null-defer-x509-cert-DOS.patch
+ bpo36160-init-sysconfig_vars.patch
+ do-not-use-non-ascii-in-test_ssl.patch
+ openssl-111-middlebox-compat.patch
+ openssl-111-ssl_options.patch
+ python-2.5.1-sqlite.patch
+ python-2.6-gettext-plurals.patch
+ python-2.7-dirs.patch
+ python-2.7.2-fix_date_time_compiler.patch
+ python-2.7.4-canonicalize2.patch
+ python-2.7.5-multilib.patch
+ python-2.7.9-ssl_ca_path.patch
+ python-bsddb6.diff
+ remove-static-libpython.patch
++++ 829 more lines (skipped)
++++ between /work/SRC/openSUSE:Leap:15.2/python/python.changes
++++ and /work/SRC/openSUSE:Leap:15.2/.python.new.26092/python.changes
Old:
----
CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch
CVE-2018-20852-cookie-domain-check.patch
CVE-2019-10160-netloc-port-regression.patch
CVE-2019-16056-email-parse-addr.patch
CVE-2019-16935-xmlrpc-doc-server_title.patch
CVE-2019-9636-netloc-no-decompose-characters.patch
CVE-2019-9947-no-ctrl-char-http.patch
CVE-2019-9948-avoid_local-file.patch
Python-2.7.14.tar.xz
Python-2.7.14.tar.xz.asc
bpo-36576-skip_tests_for_OpenSSL-111.patch
python-2.7.14-docs-pdf-a4.tar.bz2
python-2.7.14-docs-pdf-letter.tar.bz2
python-bsddb6.diff
python-fix-shebang.patch
python-ncurses-6.0-accessors.patch
python.csh
python.sh
pythonstart
remove-static-libpython.diff
New:
----
CVE-2017-18207.patch
CVE-2019-9674-zip-bomb.patch
CVE-2020-8492-urllib-ReDoS.patch
Python-2.7.17.tar.xz
Python-2.7.17.tar.xz.asc
adapted-from-F00251-change-user-install-location.patch
bpo36160-init-sysconfig_vars.patch
bpo36302-sort-module-sources.patch
do-not-use-non-ascii-in-test_ssl.patch
idle.appdata.xml
idle.desktop
openssl-111-middlebox-compat.patch
openssl-111-ssl_options.patch
python-2.7.17-docs-pdf-a4.tar.bz2
python-2.7.17-docs-pdf-letter.tar.bz2
python-2.7.17-switch-off-failing-SSL-tests.patch
python-bsddb6.patch
remove-static-libpython.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-base.spec ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.057230728 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.061230736 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-base
#
-# Copyright (c) 2018 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
@@ -12,17 +12,19 @@
# 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 so_version 2_7-1_0
+
Name: python-base
-Version: 2.7.14
+Version: 2.7.17
Release: 0
Summary: Python Interpreter base package
License: Python-2.0
Group: Development/Languages/Python
-Url: http://www.python.org/
+URL: http://www.python.org/
%define tarversion %{version}
%define tarname Python-%{tarversion}
Source0: http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz
@@ -43,63 +45,63 @@
Patch8: python-2.6b3-curses-panel.patch
Patch10: sparc_longdouble.patch
Patch13: python-2.7.2-fix_date_time_compiler.patch
-Patch17: remove-static-libpython.diff
+Patch17: remove-static-libpython.patch
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar(a)opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
Patch20: python-bundle-lang.patch
# PATCH-FIX-UPSTREAM Fix argument passing in libffi for aarch64
Patch22: python-2.7-libffi-aarch64.patch
-Patch24: python-bsddb6.diff
+Patch24: python-bsddb6.patch
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
Patch33: python-2.7.9-ssl_ca_path.patch
# PATCH-FEATURE-SLE disable SSL verification-by-default in http clients
Patch34: python-2.7.9-sles-disable-verification-by-default.patch
-# PATCH-FIX-UPSTREAM python-ncurses-6.0-accessors.patch dimstar(a)opensuse.org -- Fix build with NCurses 6.0 and OPAQUE_WINDOW set to 1
-Patch35: python-ncurses-6.0-accessors.patch
+# PATCH-FIX-UPSTREAM do not use non-ASCII filename in test_ssl.py
+Patch35: do-not-use-non-ascii-in-test_ssl.patch
# PATCH-FIX-UPSTREAM bmwiedemann(a)suse.de -- allow python packages to build reproducibly
Patch38: reproducible.patch
-# PATCH-FIX-UPSTREAM taken from upstream fix py3 shebang
-Patch39: python-fix-shebang.patch
# bypass boo#1078485 random failing tests
Patch40: python-skip_random_failing_tests.patch
# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263
Patch41: python-sorted_tar.patch
-# PATCH-FIX-UPSTREAM CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch mcepl(a)suse.com
-# Suggested in https://github.com/python/cpython/commit/add531a1e55b.patch
-Patch42: CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch
+# https://github.com/python/cpython/pull/9624 (https://bugs.python.org/issue34834)
+Patch47: openssl-111-middlebox-compat.patch
+# PATCH-FIX-SUSE python default SSLContext doesn't contain OP_CIPHER_SERVER_PREFERENCE
+Patch48: openssl-111-ssl_options.patch
# PATCH-FIX-UPSTREAM CVE-2019-5010-null-defer-x509-cert-DOS.patch bnc#1122191 mcepl(a)suse.com
-# https://github.com/python/cpython/pull/11569
+# gh#python/cpython#11569
# Fix segfault in ssl's cert parser
-Patch43: CVE-2019-5010-null-defer-x509-cert-DOS.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9636-netloc-no-decompose-characters.patch bsc#1129346 mcepl(a)suse.com
-# https://bugs.python.org/issue36216
-Patch44: CVE-2019-9636-netloc-no-decompose-characters.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9948-avoid_local-file.patch bsc#1130847 mcepl(a)suse.com
-# removing unnecessary (and potentially harmful) URL scheme local-file://
-Patch45: CVE-2019-9948-avoid_local-file.patch
-# PATCH-FIX-UPSTREAM CVE-2019-10160-netloc-port-regression.patch bsc#1138459 mcepl(a)suse.com
-# Fix regression introduced by fix for CVE-2019-9636
-Patch46: CVE-2019-10160-netloc-port-regression.patch
-# PATCH-FIX-UPSTREAM CVE-2018-20852-cookie-domain-check.patch bsc#1141853 mcepl(a)suse.com
-# http.cookiejar.DefaultPolicy.domain_return_ok does not correctly validate the domain
-Patch47: CVE-2018-20852-cookie-domain-check.patch
-# PATCH-FIX-UPSTREAM CVE-2019-16056-email-parse-addr.patch bsc#1149955 mcepl(a)suse.com
-# bpo#34155 The email module wrongly parses email addresses
-Patch48: CVE-2019-16056-email-parse-addr.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9947-no-ctrl-char-http.patch bsc#1130840 mcepl(a)suse.com
-# bpo#30458: Disallow control chars in http URLs.
-Patch49: CVE-2019-9947-no-ctrl-char-http.patch
-# PATCH-FIX-UPSTREAM CVE-2019-16935-xmlrpc-doc-server_title.patch bsc#1153238 mcepl(a)suse.com
-# XSS vulnerability in the documentation XML-RPC server in server_title field
-Patch50: CVE-2019-16935-xmlrpc-doc-server_title.patch
-# PATCH-FIX-UPSTREAM bpo-36576-skip_tests_for_OpenSSL-111.patch bsc#1149792 mcepl(a)suse.com
-# Skip tests failing with OpenSSL 1.1.1
-Patch51: bpo-36576-skip_tests_for_OpenSSL-111.patch
+Patch49: CVE-2019-5010-null-defer-x509-cert-DOS.patch
+# PATCH-FIX-UPSTREAM bpo36160-init-sysconfig_vars.patch gh#python/cpython#12131 mcepl(a)suse.com
+# Initialize sysconfig variables in test_site.
+Patch50: bpo36160-init-sysconfig_vars.patch
+# PATCH-FIX-UPSTREAM CVE-2017-18207.patch gh#python/cpython#4437 psimons(a)suse.com
+# Add check for channels of wav file in Lib/wave.py
+Patch51: CVE-2017-18207.patch
+# PATCH-FIX-UPSTREAM gh#python/cpython#12341
+Patch55: bpo36302-sort-module-sources.patch
+# Fix installation in /usr/local (boo#1071941), adapted from Fedora
+# https://src.fedoraproject.org/rpms/python3/blob/master/f/00251-change-user-…
+# Set values of prefix and exec_prefix in distutils install command
+# to /usr/local if executable is /usr/bin/python* and RPM build
+# is not detected to make pip and distutils install into separate location
+Patch56: adapted-from-F00251-change-user-install-location.patch
+# Switch couple of tests failing on acient SLE-12
+Patch57: python-2.7.17-switch-off-failing-SSL-tests.patch
+# PATCH-FIX-UPSTREAM CVE-2020-8492-urllib-ReDoS.patch bsc#1162367 mcepl(a)suse.com
+# Fixes Python urrlib allowed an HTTP server to conduct Regular
+# Expression Denial of Service (ReDoS)
+Patch58: CVE-2020-8492-urllib-ReDoS.patch
+# PATCH-FIX-UPSTREAM CVE-2019-9674-zip-bomb.patch bsc#1162825 mcepl(a)suse.com
+# Improve documentation warning against the possible zip bombs
+Patch59: CVE-2019-9674-zip-bomb.patch
# COMMON-PATCH-END
%define python_version %(echo %{tarversion} | head -c 3)
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: libbz2-devel
+%if %{suse_version} >= 1500
BuildRequires: libnsl-devel
+%endif
BuildRequires: pkg-config
BuildRequires: xz
BuildRequires: zlib-devel
@@ -108,7 +110,7 @@
BuildRequires: netcfg
Requires: python-rpm-macros
# explicitly, see bnc#697251:
-Requires: libpython2_7-1_0 = %{version}
+Requires: libpython%{so_version} = %{version}-%{release}
Provides: %{name} = %{python_version}
# bug437293
%ifarch ppc64
@@ -139,6 +141,9 @@
Requires: python = %{version}
Requires: python-base = %{version}-%{release}
Provides: python2-devel = %{version}
+# provide testsuite namespace that was split in python3 to ease dependencies
+Provides: python-testsuite = %{version}
+Provides: python2-testsuite = %{version}
%description -n python-devel
The Python programming language's interpreter can be extended with
@@ -161,7 +166,7 @@
The expat module is a Python interface to the expat XML parser. Since
Python2.x, it is part of the core Python distribution.
-%package -n libpython2_7-1_0
+%package -n libpython%{so_version}
Summary: Python Interpreter shared library
Group: Development/Languages/Python
@@ -197,27 +202,30 @@
%endif
%patch35 -p1
%patch38 -p1
-%patch39 -p1
%ifarch ppc ppc64 ppc64le
%patch40 -p1
%endif
%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-%patch46 -p1
+%if %{suse_version} >= 1500
%patch47 -p1
%patch48 -p1
+%else
+%patch57 -p1
+%endif
%patch49 -p1
%patch50 -p1
%patch51 -p1
+%patch55 -p1
+%patch56 -p1
+%patch58 -p1
+%patch59 -p1
# drop Autoconf version requirement
sed -i 's/^version_required/dnl version_required/' configure.ac
# COMMON-PREP-END
%build
+%define _lto_cflags %{nil}
export OPT="%{optflags} -DOPENSSL_LOAD_CONF -fwrapv"
autoreconf -f -i . # Modules/_ctypes/libffi
@@ -251,7 +259,8 @@
%ifnarch hppa
# test_file(2k) fails in autobuild env - "stdin.seek(-1)" wrongly succeeds. probably an issue with autobuild's stdin
# test_urllib2 relies on being able to resolve local address, which is notoriously impossible in autobuild
-EXCLUDE="test_urllib2 test_file test_file2k"
+# test_urllib2_localnet randomly fails out
+EXCLUDE="test_urllib2 test_urllib2_localnet test_file test_file2k"
# test_nis and test_threading are AWFULLY slow.
EXCLUDE="$EXCLUDE test_nis test_threading"
# test_gdb fails if gdb with (different) python support is part of the buildsystem
@@ -307,8 +316,8 @@
########################################
%make_install OPT="%{optflags} -fPIC"
install -m 644 %{SOURCE5} %{buildroot}%{_libdir}/python%{python_version}/site-packages/_local.pth
-install -d -m 755 %{buildroot}%{_sysconfdir}/rpm
-install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm
+install -d -m 755 %{buildroot}%{_rpmconfigdir}/macros.d/
+install -m 644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/
# make sure /usr/lib/python/site-packages exists even on lib64 machines
mkdir -p %{buildroot}%{_prefix}/lib/python%{python_version}/site-packages
########################################
@@ -380,7 +389,7 @@
%files
%defattr(644, root, root, 755)
-%config %{_sysconfdir}/rpm/macros.python2
+%{_rpmconfigdir}/macros.d/macros.python2
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/LICENSE
++++++ python-doc.spec ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.077230769 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.077230769 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-doc
#
-# Copyright (c) 2018 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
@@ -12,16 +12,17 @@
# 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/
#
+
Name: python-doc
-Version: 2.7.14
+Version: 2.7.17
Release: 0
Summary: Additional Package Documentation for Python
License: Python-2.0
Group: Development/Languages/Python
-Url: http://www.python.org/
+URL: http://www.python.org/
%define tarname Python-%{version}
Source0: %{tarname}.tar.xz
# docs for current version are regenerated every day
@@ -42,57 +43,55 @@
Patch8: python-2.6b3-curses-panel.patch
Patch10: sparc_longdouble.patch
Patch13: python-2.7.2-fix_date_time_compiler.patch
-Patch17: remove-static-libpython.diff
+Patch17: remove-static-libpython.patch
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar(a)opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
Patch20: python-bundle-lang.patch
# PATCH-FIX-UPSTREAM Fix argument passing in libffi for aarch64
Patch22: python-2.7-libffi-aarch64.patch
-Patch24: python-bsddb6.diff
+Patch24: python-bsddb6.patch
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
Patch33: python-2.7.9-ssl_ca_path.patch
# PATCH-FEATURE-SLE disable SSL verification-by-default in http clients
Patch34: python-2.7.9-sles-disable-verification-by-default.patch
-# PATCH-FIX-UPSTREAM python-ncurses-6.0-accessors.patch dimstar(a)opensuse.org -- Fix build with NCurses 6.0 and OPAQUE_WINDOW set to 1
-Patch35: python-ncurses-6.0-accessors.patch
+# PATCH-FIX-UPSTREAM do not use non-ASCII filename in test_ssl.py
+Patch35: do-not-use-non-ascii-in-test_ssl.patch
# PATCH-FIX-UPSTREAM bmwiedemann(a)suse.de -- allow python packages to build reproducibly
Patch38: reproducible.patch
-# PATCH-FIX-UPSTREAM taken from upstream fix py3 shebang
-Patch39: python-fix-shebang.patch
# bypass boo#1078485 random failing tests
Patch40: python-skip_random_failing_tests.patch
# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263
Patch41: python-sorted_tar.patch
-# PATCH-FIX-UPSTREAM CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch mcepl(a)suse.com
-# Suggested in https://github.com/python/cpython/commit/add531a1e55b.patch
-Patch42: CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch
+# https://github.com/python/cpython/pull/9624 (https://bugs.python.org/issue34834)
+Patch47: openssl-111-middlebox-compat.patch
+# PATCH-FIX-SUSE python default SSLContext doesn't contain OP_CIPHER_SERVER_PREFERENCE
+Patch48: openssl-111-ssl_options.patch
# PATCH-FIX-UPSTREAM CVE-2019-5010-null-defer-x509-cert-DOS.patch bnc#1122191 mcepl(a)suse.com
-# https://github.com/python/cpython/pull/11569
+# gh#python/cpython#11569
# Fix segfault in ssl's cert parser
-Patch43: CVE-2019-5010-null-defer-x509-cert-DOS.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9636-netloc-no-decompose-characters.patch bsc#1129346 mcepl(a)suse.com
-# https://bugs.python.org/issue36216
-Patch44: CVE-2019-9636-netloc-no-decompose-characters.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9948-avoid_local-file.patch bsc#1130847 mcepl(a)suse.com
-# removing unnecessary (and potentially harmful) URL scheme local-file://
-Patch45: CVE-2019-9948-avoid_local-file.patch
-# PATCH-FIX-UPSTREAM CVE-2019-10160-netloc-port-regression.patch bsc#1138459 mcepl(a)suse.com
-# Fix regression introduced by fix for CVE-2019-9636
-Patch46: CVE-2019-10160-netloc-port-regression.patch
-# PATCH-FIX-UPSTREAM CVE-2018-20852-cookie-domain-check.patch bsc#1141853 mcepl(a)suse.com
-# http.cookiejar.DefaultPolicy.domain_return_ok does not correctly validate the domain
-Patch47: CVE-2018-20852-cookie-domain-check.patch
-# PATCH-FIX-UPSTREAM CVE-2019-16056-email-parse-addr.patch bsc#1149955 mcepl(a)suse.com
-# bpo#34155 The email module wrongly parses email addresses
-Patch48: CVE-2019-16056-email-parse-addr.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9947-no-ctrl-char-http.patch bsc#1130840 mcepl(a)suse.com
-# bpo#30458: Disallow control chars in http URLs.
-Patch49: CVE-2019-9947-no-ctrl-char-http.patch
-# PATCH-FIX-UPSTREAM CVE-2019-16935-xmlrpc-doc-server_title.patch bsc#1153238 mcepl(a)suse.com
-# XSS vulnerability in the documentation XML-RPC server in server_title field
-Patch50: CVE-2019-16935-xmlrpc-doc-server_title.patch
-# PATCH-FIX-UPSTREAM bpo-36576-skip_tests_for_OpenSSL-111.patch bsc#1149792 mcepl(a)suse.com
-# Skip tests failing with OpenSSL 1.1.1
-Patch51: bpo-36576-skip_tests_for_OpenSSL-111.patch
+Patch49: CVE-2019-5010-null-defer-x509-cert-DOS.patch
+# PATCH-FIX-UPSTREAM bpo36160-init-sysconfig_vars.patch gh#python/cpython#12131 mcepl(a)suse.com
+# Initialize sysconfig variables in test_site.
+Patch50: bpo36160-init-sysconfig_vars.patch
+# PATCH-FIX-UPSTREAM CVE-2017-18207.patch gh#python/cpython#4437 psimons(a)suse.com
+# Add check for channels of wav file in Lib/wave.py
+Patch51: CVE-2017-18207.patch
+# PATCH-FIX-UPSTREAM gh#python/cpython#12341
+Patch55: bpo36302-sort-module-sources.patch
+# Fix installation in /usr/local (boo#1071941), adapted from Fedora
+# https://src.fedoraproject.org/rpms/python3/blob/master/f/00251-change-user-…
+# Set values of prefix and exec_prefix in distutils install command
+# to /usr/local if executable is /usr/bin/python* and RPM build
+# is not detected to make pip and distutils install into separate location
+Patch56: adapted-from-F00251-change-user-install-location.patch
+# Switch couple of tests failing on acient SLE-12
+Patch57: python-2.7.17-switch-off-failing-SSL-tests.patch
+# PATCH-FIX-UPSTREAM CVE-2020-8492-urllib-ReDoS.patch bsc#1162367 mcepl(a)suse.com
+# Fixes Python urrlib allowed an HTTP server to conduct Regular
+# Expression Denial of Service (ReDoS)
+Patch58: CVE-2020-8492-urllib-ReDoS.patch
+# PATCH-FIX-UPSTREAM CVE-2019-9674-zip-bomb.patch bsc#1162825 mcepl(a)suse.com
+# Improve documentation warning against the possible zip bombs
+Patch59: CVE-2019-9674-zip-bomb.patch
# COMMON-PATCH-END
Provides: pyth_doc
Provides: pyth_ps
@@ -142,21 +141,23 @@
%endif
%patch35 -p1
%patch38 -p1
-%patch39 -p1
%ifarch ppc ppc64 ppc64le
%patch40 -p1
%endif
%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-%patch46 -p1
+%if %{suse_version} >= 1500
%patch47 -p1
%patch48 -p1
+%else
+%patch57 -p1
+%endif
%patch49 -p1
%patch50 -p1
%patch51 -p1
+%patch55 -p1
+%patch56 -p1
+%patch58 -p1
+%patch59 -p1
# drop Autoconf version requirement
sed -i 's/^version_required/dnl version_required/' configure.ac
++++++ python.spec ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.093230800 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.093230800 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python
#
-# Copyright (c) 2018 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
@@ -12,25 +12,25 @@
# 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/
#
+
Name: python
-Version: 2.7.14
+Version: 2.7.17
Release: 0
Summary: Python Interpreter
License: Python-2.0
Group: Development/Languages/Python
-Url: http://www.python.org/
+URL: http://www.python.org/
%define tarversion %{version}
%define tarname Python-%{tarversion}
Source0: http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz
Source1: README.SUSE
-Source2: pythonstart
-Source3: python.sh
-Source4: python.csh
Source8: sle_tls_checks_policy.py
#Source11: testfiles.tar.bz2
+Source50: idle.appdata.xml
+Source51: idle.desktop
# issues with copyrighted Unicode testing files
# !!!!!!!!!!!!!!
@@ -47,57 +47,55 @@
Patch8: python-2.6b3-curses-panel.patch
Patch10: sparc_longdouble.patch
Patch13: python-2.7.2-fix_date_time_compiler.patch
-Patch17: remove-static-libpython.diff
+Patch17: remove-static-libpython.patch
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar(a)opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
Patch20: python-bundle-lang.patch
# PATCH-FIX-UPSTREAM Fix argument passing in libffi for aarch64
Patch22: python-2.7-libffi-aarch64.patch
-Patch24: python-bsddb6.diff
+Patch24: python-bsddb6.patch
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
Patch33: python-2.7.9-ssl_ca_path.patch
# PATCH-FEATURE-SLE disable SSL verification-by-default in http clients
Patch34: python-2.7.9-sles-disable-verification-by-default.patch
-# PATCH-FIX-UPSTREAM python-ncurses-6.0-accessors.patch dimstar(a)opensuse.org -- Fix build with NCurses 6.0 and OPAQUE_WINDOW set to 1
-Patch35: python-ncurses-6.0-accessors.patch
+# PATCH-FIX-UPSTREAM do not use non-ASCII filename in test_ssl.py
+Patch35: do-not-use-non-ascii-in-test_ssl.patch
# PATCH-FIX-UPSTREAM bmwiedemann(a)suse.de -- allow python packages to build reproducibly
Patch38: reproducible.patch
-# PATCH-FIX-UPSTREAM taken from upstream fix py3 shebang
-Patch39: python-fix-shebang.patch
# bypass boo#1078485 random failing tests
Patch40: python-skip_random_failing_tests.patch
# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263
Patch41: python-sorted_tar.patch
-# PATCH-FIX-UPSTREAM CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch mcepl(a)suse.com
-# Suggested in https://github.com/python/cpython/commit/add531a1e55b.patch
-Patch42: CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch
+# https://github.com/python/cpython/pull/9624 (https://bugs.python.org/issue34834)
+Patch47: openssl-111-middlebox-compat.patch
+# PATCH-FIX-SUSE python default SSLContext doesn't contain OP_CIPHER_SERVER_PREFERENCE
+Patch48: openssl-111-ssl_options.patch
# PATCH-FIX-UPSTREAM CVE-2019-5010-null-defer-x509-cert-DOS.patch bnc#1122191 mcepl(a)suse.com
-# https://github.com/python/cpython/pull/11569
+# gh#python/cpython#11569
# Fix segfault in ssl's cert parser
-Patch43: CVE-2019-5010-null-defer-x509-cert-DOS.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9636-netloc-no-decompose-characters.patch bsc#1129346 mcepl(a)suse.com
-# https://bugs.python.org/issue36216
-Patch44: CVE-2019-9636-netloc-no-decompose-characters.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9948-avoid_local-file.patch bsc#1130847 mcepl(a)suse.com
-# removing unnecessary (and potentially harmful) URL scheme local-file://
-Patch45: CVE-2019-9948-avoid_local-file.patch
-# PATCH-FIX-UPSTREAM CVE-2019-10160-netloc-port-regression.patch bsc#1138459 mcepl(a)suse.com
-# Fix regression introduced by fix for CVE-2019-9636
-Patch46: CVE-2019-10160-netloc-port-regression.patch
-# PATCH-FIX-UPSTREAM CVE-2018-20852-cookie-domain-check.patch bsc#1141853 mcepl(a)suse.com
-# http.cookiejar.DefaultPolicy.domain_return_ok does not correctly validate the domain
-Patch47: CVE-2018-20852-cookie-domain-check.patch
-# PATCH-FIX-UPSTREAM CVE-2019-16056-email-parse-addr.patch bsc#1149955 mcepl(a)suse.com
-# bpo#34155 The email module wrongly parses email addresses
-Patch48: CVE-2019-16056-email-parse-addr.patch
-# PATCH-FIX-UPSTREAM CVE-2019-9947-no-ctrl-char-http.patch bsc#1130840 mcepl(a)suse.com
-# bpo#30458: Disallow control chars in http URLs.
-Patch49: CVE-2019-9947-no-ctrl-char-http.patch
-# PATCH-FIX-UPSTREAM CVE-2019-16935-xmlrpc-doc-server_title.patch bsc#1153238 mcepl(a)suse.com
-# XSS vulnerability in the documentation XML-RPC server in server_title field
-Patch50: CVE-2019-16935-xmlrpc-doc-server_title.patch
-# PATCH-FIX-UPSTREAM bpo-36576-skip_tests_for_OpenSSL-111.patch bsc#1149792 mcepl(a)suse.com
-# Skip tests failing with OpenSSL 1.1.1
-Patch51: bpo-36576-skip_tests_for_OpenSSL-111.patch
+Patch49: CVE-2019-5010-null-defer-x509-cert-DOS.patch
+# PATCH-FIX-UPSTREAM bpo36160-init-sysconfig_vars.patch gh#python/cpython#12131 mcepl(a)suse.com
+# Initialize sysconfig variables in test_site.
+Patch50: bpo36160-init-sysconfig_vars.patch
+# PATCH-FIX-UPSTREAM CVE-2017-18207.patch gh#python/cpython#4437 psimons(a)suse.com
+# Add check for channels of wav file in Lib/wave.py
+Patch51: CVE-2017-18207.patch
+# PATCH-FIX-UPSTREAM gh#python/cpython#12341
+Patch55: bpo36302-sort-module-sources.patch
+# Fix installation in /usr/local (boo#1071941), adapted from Fedora
+# https://src.fedoraproject.org/rpms/python3/blob/master/f/00251-change-user-…
+# Set values of prefix and exec_prefix in distutils install command
+# to /usr/local if executable is /usr/bin/python* and RPM build
+# is not detected to make pip and distutils install into separate location
+Patch56: adapted-from-F00251-change-user-install-location.patch
+# Switch couple of tests failing on acient SLE-12
+Patch57: python-2.7.17-switch-off-failing-SSL-tests.patch
+# PATCH-FIX-UPSTREAM CVE-2020-8492-urllib-ReDoS.patch bsc#1162367 mcepl(a)suse.com
+# Fixes Python urrlib allowed an HTTP server to conduct Regular
+# Expression Denial of Service (ReDoS)
+Patch58: CVE-2020-8492-urllib-ReDoS.patch
+# PATCH-FIX-UPSTREAM CVE-2019-9674-zip-bomb.patch bsc#1162825 mcepl(a)suse.com
+# Improve documentation warning against the possible zip bombs
+Patch59: CVE-2019-9674-zip-bomb.patch
# COMMON-PATCH-END
BuildRequires: automake
BuildRequires: db-devel
@@ -105,7 +103,9 @@
BuildRequires: gdbm-devel
BuildRequires: gmp-devel
BuildRequires: libbz2-devel
+%if %{suse_version} >= 1500
BuildRequires: libnsl-devel
+%endif
BuildRequires: libopenssl-devel
BuildRequires: ncurses-devel
BuildRequires: readline-devel
@@ -113,6 +113,11 @@
BuildRequires: tk-devel
BuildRequires: xz
BuildRequires: pkgconfig(x11)
+# for %%{_datadir}/application and %%{_datadir}/mime/packages
+BuildRequires: filesystem
+BuildRequires: update-desktop-files
+# for %%{_datadir}/icons/hicolor directories
+BuildRequires: hicolor-icon-theme
%define python_version %(echo %{tarversion} | head -c 3)
%define idle_name idle
Requires: python-base = %{version}
@@ -121,6 +126,9 @@
%endif
Provides: %{name} = %{python_version}
Provides: python2 = %{version}
+# To make older versions of this package to conflict with
+# shared-python-startup I need a symbol to conflict with
+Provides: python2_split_startup
Obsoletes: python-elementtree
Obsoletes: python-nothreads
Obsoletes: python-sqlite
@@ -182,8 +190,7 @@
Provides: python2-tk = %{version}
%description tk
-Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The
-"xrpm" package uses this Python interface.
+Python interface to Tk. Tk is the GUI toolkit that comes with Tcl.
%package curses
Summary: Python Interface to the (N)Curses Library
@@ -204,6 +211,10 @@
Obsoletes: pygdmod
Provides: pygdmod
Provides: python2-gdbm = %{version}
+# Compat to allow BR on python_module dbm and have it properly
+# pull in gdbm on py2 and dbm on py3
+Provides: python-dbm = %{version}
+Provides: python2-dbm = %{version}
%description gdbm
An easy to use interface for GDBM databases. GDBM is the GNU
@@ -248,21 +259,23 @@
%endif
%patch35 -p1
%patch38 -p1
-%patch39 -p1
%ifarch ppc ppc64 ppc64le
%patch40 -p1
%endif
%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-%patch46 -p1
+%if %{suse_version} >= 1500
%patch47 -p1
%patch48 -p1
+%else
+%patch57 -p1
+%endif
%patch49 -p1
%patch50 -p1
%patch51 -p1
+%patch55 -p1
+%patch56 -p1
+%patch58 -p1
+%patch59 -p1
# drop Autoconf version requirement
sed -i 's/^version_required/dnl version_required/' configure.ac
@@ -273,6 +286,7 @@
%endif
%build
+%define _lto_cflags %{nil}
export OPT="%{optflags} -DOPENSSL_LOAD_CONF -fwrapv"
autoreconf -f -i . # Modules/_ctypes/libffi
@@ -299,8 +313,8 @@
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
ulimit -v 10000000 || :
fi
-LIST="test_urllib test_ssl test_hashlib test_hmac test_urllib2_localnet test_unicodedata test_tarfile test_sqlite test_tcl test_dbm test_anydbm test_dumbdbm test_gdbm test_whichdb test_tk test_ttk_textonly test_bsddb test_bsddb3 test_readline"
-make test TESTOPTS="$LIST" TESTPYTHONOPTS="-R"
+LIST="test_urllib test_ssl test_hashlib test_hmac test_unicodedata test_tarfile test_sqlite test_tcl test_dbm test_anydbm test_dumbdbm test_gdbm test_whichdb test_tk test_ttk_textonly test_bsddb test_bsddb3 test_readline"
+make test TESTOPTS="-w $LIST" TESTPYTHONOPTS="-R"
%endif
%install
@@ -445,12 +459,15 @@
ln -sf /etc/%{idle_name}/$file %{buildroot}/%{_libdir}/python%{python_version}/idlelib/
done
)
-########################################
-# startup script
-########################################
-install -m 644 %{SOURCE2} %{buildroot}/etc
-install -d -m 755 %{buildroot}%{_sysconfdir}/profile.d
-install -m 644 %{SOURCE3} %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d
+
+# Install .desktop, mime and appdata files from upstream tarball
+%if 0%{?suse_version} >= 1500
+install -Dm0644 %{SOURCE50} %{buildroot}/%{_datadir}/mime/packages/idle.appdata.xml
+%endif
+install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle.png
+install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle.png
+install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle.png
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE51}
%post -p /sbin/ldconfig
@@ -467,6 +484,11 @@
%doc Lib/idlelib/ChangeLog
%{_libdir}/python%{python_version}/idlelib
%attr(755, root, root) %{_bindir}/%{idle_name}
+%if 0%{?suse_version} >= 1500
+%{_datadir}/mime/packages/idle.appdata.xml
+%endif
+%{_datadir}/applications/idle.desktop
+%{_datadir}/icons/hicolor/*/apps/idle.png
%files demo
%defattr(644, root, root, 755)
@@ -501,8 +523,6 @@
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/LICENSE
%doc %{_docdir}/%{name}/README.SUSE
-%config %{_sysconfdir}/pythonstart
-%config %{_sysconfdir}/profile.d/python.*
%dir %{_libdir}/python%{python_version}
%{_libdir}/python%{python_version}/ssl.py*
%{_libdir}/python%{python_version}/bsddb
++++++ CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch -> CVE-2017-18207.patch ++++++
--- /work/SRC/openSUSE:Leap:15.2/python/CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch 2020-01-15 15:45:46.959335033 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python.new.26092/CVE-2017-18207.patch 2020-03-01 08:50:58.529225700 +0100
@@ -1,56 +1,22 @@
-From add531a1e55b0a739b0f42582f1c9747e5649ace Mon Sep 17 00:00:00 2001
-From: Benjamin Peterson <benjamin(a)python.org>
-Date: Tue, 28 Aug 2018 22:12:56 -0700
-Subject: [PATCH] closes bpo-34540: Convert shutil._call_external_zip to use
- subprocess rather than distutils.spawn.
+From ae0ed14794ced2c51c822fc6f0d3ca92064619dd Mon Sep 17 00:00:00 2001
+From: BT123 <abcdyzhang(a)163.com>
+Date: Fri, 17 Nov 2017 16:45:45 +0800
+Subject: [PATCH] bug in wave.py
---
- Lib/shutil.py | 16 ++++++++++------
- .../2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst | 3 +++
- 2 files changed, 13 insertions(+), 6 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst
+ Lib/wave.py | 2 ++
+ 1 file changed, 2 insertions(+)
---- a/Lib/shutil.py
-+++ b/Lib/shutil.py
-@@ -396,17 +396,21 @@ def _make_tarball(base_name, base_dir, c
-
- return archive_name
-
--def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False):
-+def _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger):
- # XXX see if we want to keep an external call here
- if verbose:
- zipoptions = "-r"
- else:
- zipoptions = "-rq"
-- from distutils.errors import DistutilsExecError
-- from distutils.spawn import spawn
-+ cmd = ["zip", zipoptions, zip_filename, base_dir]
-+ if logger is not None:
-+ logger.info(' '.join(cmd))
-+ if dry_run:
-+ return
-+ import subprocess
- try:
-- spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run)
-- except DistutilsExecError:
-+ subprocess.check_call(cmd)
-+ except subprocess.CalledProcessError:
- # XXX really should distinguish between "couldn't find
- # external 'zip' command" and "zip failed".
- raise ExecError, \
-@@ -440,7 +444,7 @@ def _make_zipfile(base_name, base_dir, v
- zipfile = None
-
- if zipfile is None:
-- _call_external_zip(base_dir, zip_filename, verbose, dry_run)
-+ _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger)
- else:
- if logger is not None:
- logger.info("creating '%s' and adding '%s' to it",
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst
-@@ -0,0 +1,3 @@
-+When ``shutil.make_archive`` falls back to the external ``zip`` problem, it
-+uses :mod:`subprocess` to invoke it rather than :mod:`distutils.spawn`. This
-+closes a possible shell injection vector.
+Index: Python-2.7.13/Lib/wave.py
+===================================================================
+--- Python-2.7.13.orig/Lib/wave.py 2018-06-07 17:00:25.370728844 +0000
++++ Python-2.7.13/Lib/wave.py 2018-06-07 17:02:51.768202800 +0000
+@@ -272,6 +272,8 @@ class Wave_read:
+ self._sampwidth = (sampwidth + 7) // 8
+ else:
+ raise Error, 'unknown format: %r' % (wFormatTag,)
++ if self._nchannels == 0:
++ raise Error, "The audio file in wav format should have at least one channel!"
+ self._framesize = self._nchannels * self._sampwidth
+ self._comptype = 'NONE'
+ self._compname = 'not compressed'
++++++ CVE-2019-5010-null-defer-x509-cert-DOS.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.113230840 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.113230840 +0100
@@ -22,44 +22,11 @@
create mode 100644 Lib/test/talos-2019-0758.pem
create mode 100644 Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
---- /dev/null
-+++ b/Lib/test/talos-2019-0758.pem
-@@ -0,0 +1,22 @@
-+-----BEGIN CERTIFICATE-----
-+MIIDqDCCApKgAwIBAgIBAjALBgkqhkiG9w0BAQswHzELMAkGA1UEBhMCVUsxEDAO
-+BgNVBAMTB2NvZHktY2EwHhcNMTgwNjE4MTgwMDU4WhcNMjgwNjE0MTgwMDU4WjA7
-+MQswCQYDVQQGEwJVSzEsMCoGA1UEAxMjY29kZW5vbWljb24tdm0tMi50ZXN0Lmxh
-+bC5jaXNjby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC63fGB
-+J80A9Av1GB0bptslKRIUtJm8EeEu34HkDWbL6AJY0P8WfDtlXjlPaLqFa6sqH6ES
-+V48prSm1ZUbDSVL8R6BYVYpOlK8/48xk4pGTgRzv69gf5SGtQLwHy8UPBKgjSZoD
-+5a5k5wJXGswhKFFNqyyxqCvWmMnJWxXTt2XDCiWc4g4YAWi4O4+6SeeHVAV9rV7C
-+1wxqjzKovVe2uZOHjKEzJbbIU6JBPb6TRfMdRdYOw98n1VXDcKVgdX2DuuqjCzHP
-+WhU4Tw050M9NaK3eXp4Mh69VuiKoBGOLSOcS8reqHIU46Reg0hqeL8LIL6OhFHIF
-+j7HR6V1X6F+BfRS/AgMBAAGjgdYwgdMwCQYDVR0TBAIwADAdBgNVHQ4EFgQUOktp
-+HQjxDXXUg8prleY9jeLKeQ4wTwYDVR0jBEgwRoAUx6zgPygZ0ZErF9sPC4+5e2Io
-+UU+hI6QhMB8xCzAJBgNVBAYTAlVLMRAwDgYDVQQDEwdjb2R5LWNhggkA1QEAuwb7
-+2s0wCQYDVR0SBAIwADAuBgNVHREEJzAlgiNjb2Rlbm9taWNvbi12bS0yLnRlc3Qu
-+bGFsLmNpc2NvLmNvbTAOBgNVHQ8BAf8EBAMCBaAwCwYDVR0fBAQwAjAAMAsGCSqG
-+SIb3DQEBCwOCAQEAvqantx2yBlM11RoFiCfi+AfSblXPdrIrHvccepV4pYc/yO6p
-+t1f2dxHQb8rWH3i6cWag/EgIZx+HJQvo0rgPY1BFJsX1WnYf1/znZpkUBGbVmlJr
-+t/dW1gSkNS6sPsM0Q+7HPgEv8CPDNK5eo7vU2seE0iWOkxSyVUuiCEY9ZVGaLVit
-+p0C78nZ35Pdv4I+1cosmHl28+es1WI22rrnmdBpH8J1eY6WvUw2xuZHLeNVN0TzV
-+Q3qq53AaCWuLOD1AjESWuUCxMZTK9DPS4JKXTK8RLyDeqOvJGjsSWp3kL0y3GaQ+
-+10T1rfkKJub2+m9A9duin1fn6tHc2wSvB7m3DA==
-+-----END CERTIFICATE-----
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
-@@ -72,6 +72,7 @@ NONEXISTINGCERT = data_file("XXXnonexist
- BADKEY = data_file("badkey.pem")
- NOKIACERT = data_file("nokia.pem")
- NULLBYTECERT = data_file("nullbytecert.pem")
-+TALOS_INVALID_CRLDP = data_file("talos-2019-0758.pem")
-
- DHFILE = data_file("dh1024.pem")
- BYTES_DHFILE = DHFILE.encode(sys.getfilesystemencoding())
-@@ -220,6 +221,27 @@ class BasicSocketTests(unittest.TestCase
- self.assertEqual(p['crlDistributionPoints'],
- ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',))
+@@ -256,6 +256,27 @@ class BasicSocketTests(unittest.TestCase
+ }
+ )
+ def test_parse_cert_CVE_2019_5010(self):
+ p = ssl._ssl._test_decode_cert(TALOS_INVALID_CRLDP)
@@ -91,16 +58,3 @@
+[CVE-2019-5010] Fix a NULL pointer deref in ssl module. The cert parser did
+not handle CRL distribution points with empty DP or URI correctly. A
+malicious or buggy certificate can result into segfault.
---- a/Modules/_ssl.c
-+++ b/Modules/_ssl.c
-@@ -1139,6 +1139,10 @@ _get_crl_dp(X509 *certificate) {
- STACK_OF(GENERAL_NAME) *gns;
-
- dp = sk_DIST_POINT_value(dps, i);
-+ if (dp->distpoint == NULL) {
-+ /* Ignore empty DP value, CVE-2019-5010 */
-+ continue;
-+ }
- gns = dp->distpoint->name.fullname;
-
- for (j=0; j < sk_GENERAL_NAME_num(gns); j++) {
++++++ CVE-2019-9674-zip-bomb.patch ++++++
>From b73fe12d4d85fc92e4b9658e417046b68fb68ecc Mon Sep 17 00:00:00 2001
From: nick sung <sungboss2004(a)gmail.com>
Date: Fri, 17 May 2019 15:45:31 +0800
Subject: [PATCH 1/4] bpo-36260: Add pitfalls to zipfile module documentation
We saw vulnerability warning description (including zip bomb) in Doc/library/xml.rst file.
This gave us the idea of documentation improvement.
So, we moved a little bit forward :P
And the doc patch can be found (pr).
---
Doc/library/zipfile.rst | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -553,5 +553,47 @@ Command-line options
Test whether the zipfile is valid or not.
+Decompression pitfalls
+----------------------
+The extraction in zipfile module might fail due to some pitfalls
+listed below.
+
+From file itself
+~~~~~~~~~~~~~~~~
+
+Decompression may fail due to incorrect password / CRC checksum
+/ ZIP format or unsupported compression method / decryption.
+
+File System limitations
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Exceeding limitations on different file systems can cause
+decompression failed. Such as allowable characters in the
+directory entries, length of the file name, length of the
+pathname, size of a single file, and number of files, etc.
+
+Resources limitations
+~~~~~~~~~~~~~~~~~~~~~
+
+The lack of memory or disk volume would lead to decompression
+failed. For example, decompression bombs (aka `ZIP bomb`_) apply
+to zipfile library that can cause disk volume exhaustion.
+
+Interruption
+~~~~~~~~~~~~
+
+Interruption during the decompression, such as pressing control-C
+or killing the decompression process may result in incomplete
+decompression of the archive.
+
+Default behaviors of extraction
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Not knowing the default extraction behaviors can cause unexpected
+decompression results. For example, when extracting the same
+archive twice, it overwrites files without asking.
+
+
+.. _ZIP bomb: https://en.wikipedia.org/wiki/Zip_bomb
.. _PKZIP Application Note: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2019-06-04-09-29-00.bpo-36260.WrGuc-.rst
@@ -0,0 +1 @@
+Add decompression pitfalls to zipfile module documentation.
\ No newline at end of file
++++++ CVE-2020-8492-urllib-ReDoS.patch ++++++
>From 34e25a97709a05f7c804036dd1e16afda6bdfa33 Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner(a)python.org>
Date: Thu, 30 Jan 2020 16:13:03 +0100
Subject: [PATCH 1/2] bpo-39503: Fix urllib basic auth regex
The AbstractBasicAuthHandler class of the urllib.request module uses
an inefficient regular expression which can be exploited by an
attacker to cause a denial of service. Fix the regex to prevent the
catastrophic backtracking.
Vulnerability reported by Matt Schwager.
---
Lib/urllib2.py | 2 +-
Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst
--- /dev/null
+++ b/Misc/NEWS.d/next/Security/2020-01-30-16-15-29.bpo-39503.B299Yq.rst
@@ -0,0 +1,4 @@
+CVE-2020-8492: The :class:`~urllib.request.AbstractBasicAuthHandler` class of the
+:mod:`urllib.request` module uses an inefficient regular expression which can
+be exploited by an attacker to cause a denial of service. Fix the regex to
+prevent the catastrophic backtracking. Vulnerability reported by Matt Schwager.
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -856,7 +856,7 @@ class AbstractBasicAuthHandler:
# allow for double- and single-quoted realm values
# (single quotes are a violation of the RFC, but appear in the wild)
- rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+'
+ rx = re.compile('(?:[^,]*,)*[ \t]*([^ \t]+)[ \t]+'
'realm=(["\']?)([^"\']*)\\2', re.I)
# XXX could pre-emptively send auth info already accepted (RFC 2617,
++++++ Python-2.7.14.tar.xz -> Python-2.7.17.tar.xz ++++++
/work/SRC/openSUSE:Leap:15.2/python/Python-2.7.14.tar.xz /work/SRC/openSUSE:Leap:15.2/.python.new.26092/Python-2.7.17.tar.xz differ: char 26, line 1
++++++ adapted-from-F00251-change-user-install-location.patch ++++++
Index: Python-2.7.17/Lib/distutils/command/install.py
===================================================================
--- Python-2.7.17.orig/Lib/distutils/command/install.py
+++ Python-2.7.17/Lib/distutils/command/install.py
@@ -431,8 +431,18 @@ class install (Command):
raise DistutilsOptionError, \
"must not supply exec-prefix without prefix"
- self.prefix = os.path.normpath(sys.prefix)
- self.exec_prefix = os.path.normpath(sys.exec_prefix)
+ # self.prefix is set to sys.prefix + /local/
+ # if neither RPM build nor virtual environment is
+ # detected to make pip and distutils install packages
+ # into the separate location.
+ if (not hasattr(sys, 'real_prefix') and
+ 'RPM_BUILD_ROOT' not in os.environ):
+ addition = "/local"
+ else:
+ addition = ""
+
+ self.prefix = os.path.normpath(sys.prefix) + addition
+ self.exec_prefix = os.path.normpath(sys.exec_prefix) + addition
else:
if self.exec_prefix is None:
Index: Python-2.7.17/Lib/site.py
===================================================================
--- Python-2.7.17.orig/Lib/site.py
+++ Python-2.7.17/Lib/site.py
@@ -291,6 +291,10 @@ def getsitepackages():
sitepackages = []
seen = set()
+ # '/usr/local' is included in PREFIXES if RPM build is not detected
+ # to make packages installed into this location visible.
+ if ENABLE_USER_SITE and 'RPM_BUILD_ROOT' not in os.environ:
+ PREFIXES.insert(0, "/usr/local")
for prefix in PREFIXES:
if not prefix or prefix in seen:
continue
++++++ bpo36160-init-sysconfig_vars.patch ++++++
>From 603a4461e3c889b06a5d78e57594ebbc580f1c03 Mon Sep 17 00:00:00 2001
From: Ivan Pozdeev <vano(a)mail.mipt.ru>
Date: Fri, 1 Mar 2019 21:44:24 +0300
Subject: [PATCH] Fix AttributeError on sysconfig._CONFIG_VARS.clear() if
test_site is run separately
---
Lib/test/test_site.py | 4 +++-
.../next/Tests/2019-03-01-21-45-13.bpo-36160.4JjrqB.rst | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 Misc/NEWS.d/next/Tests/2019-03-01-21-45-13.bpo-36160.4JjrqB.rst
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -47,6 +47,9 @@ def setUpModule():
else:
raise
+ # sysconfig._CONFIG_VARS is None until the first call to this function
+ sysconfig.get_config_vars()
+
def tearDownModule():
sys.path[:] = OLD_SYS_PATH
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2019-03-01-21-45-13.bpo-36160.4JjrqB.rst
@@ -0,0 +1,2 @@
+Fix AttributeError on sysconfig._CONFIG_VARS.clear() if test_site is run
+separately
++++++ bpo36302-sort-module-sources.patch ++++++
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 86a85c1..66bf0c2 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -455,7 +455,7 @@ class build_ext (Command):
("in 'ext_modules' option (extension '%s'), " +
"'sources' must be present and must be " +
"a list of source filenames") % ext.name
- sources = list(sources)
+ sources = sorted(sources)
ext_path = self.get_ext_fullpath(ext.name)
depends = sources + ext.depends
++++++ do-not-use-non-ascii-in-test_ssl.patch ++++++
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -1021,7 +1021,7 @@ class ContextTests(unittest.TestCase):
def test_load_dh_params(self):
- filename = u'dhpäräm.pem'
+ filename = u'dhparam.pem'
fs_encoding = sys.getfilesystemencoding()
try:
filename.encode(fs_encoding)
++++++ idle.appdata.xml ++++++
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 Zbigniew Jędrzejewski-Szmek -->
<application>
<id type="desktop">idle.desktop</id>
<name>IDLE</name>
<metadata_licence>CC0</metadata_licence>
<project_license>Python-2.0</project_license>
<summary>Python Integrated Development and Learning Environment</summary>
<description>
<p>
IDLE is Python’s Integrated Development and Learning Environment.
The GUI is uniform between Windows, Unix, and Mac OS X.
IDLE provides an easy way to start writing, running, and debugging
Python code.
</p>
<p>
IDLE is written in pure Python, and uses the tkinter GUI toolkit.
It provides:
</p>
<ul>
<li>a Python shell window (interactive interpreter) with colorizing of code input, output, and error messages,</li>
<li>a multi-window text editor with multiple undo, Python colorizing, smart indent, call tips, auto completion, and other features,</li>
<li>search within any window, replace within editor windows, and search through multiple files (grep),</li>
<li>a debugger with persistent breakpoints, stepping, and viewing of global and local namespaces.</li>
</ul>
</description>
<url type="homepage">https://docs.python.org/2.7/library/idle.html</url>
<screenshots>
<screenshot type="default">http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-main-window.png</screenshot>
<screenshot>http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-class-browser.png</screenshot>
<screenshot>http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-code-viewer.png</screenshot>
</screenshots>
<update_contact>zbyszek(a)in.waw.pl</update_contact>
</application>
++++++ idle.desktop ++++++
[Desktop Entry]
Version=1.0
Name=IDLE
GenericName=Python IDE
Comment=Python 2.7 Integrated Development and Learning Environment
Exec=idle %F
TryExec=idle
Terminal=false
Type=Application
Icon=idle
Categories=Development;IDE;
MimeType=text/x-python;
++++++ macros.python2 ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.209231031 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.213231039 +0100
@@ -1,10 +1,8 @@
# legacy macros. commented but kept for the sake of possible recovery of their values
-#%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
-#%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
-#%py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
-#%py_incdir %{py_prefix}/include/python%{py_ver}
-#%py_sitedir %{py_libdir}/site-packages
-#%__python2 /usr/bin/python2
+%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
+%py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
+%py_incdir %{py_prefix}/include/python%{py_ver}
+%py_sitedir %{py_libdir}/site-packages
# these might be still in use somewhere
%py_compile(O) \
++++++ openssl-111-middlebox-compat.patch ++++++
>From 4fa35e8b1ebb2a8e88ba7c4c9cd2a17b35638ee6 Mon Sep 17 00:00:00 2001
From: Dimitri John Ledkov <xnox(a)ubuntu.com>
Date: Fri, 28 Sep 2018 16:34:16 +0100
Subject: [PATCH] bpo-34834: Fix test_ssl.test_options to account for
OP_ENABLE_MIDDLEBOX_COMPAT.
Signed-off-by: Dimitri John Ledkov <xnox(a)ubuntu.com>
https://bugs.python.org/issue34834
---
Lib/test/test_ssl.py | 5 +++++
1 file changed, 5 insertions(+)
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -807,8 +807,12 @@ class ContextTests(unittest.TestCase):
default = (ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
# SSLContext also enables these by default
default |= (OP_NO_COMPRESSION | OP_CIPHER_SERVER_PREFERENCE |
- OP_SINGLE_DH_USE | OP_SINGLE_ECDH_USE |
- OP_ENABLE_MIDDLEBOX_COMPAT)
+ ssl.OP_SINGLE_DH_USE | ssl.OP_SINGLE_ECDH_USE)
+ if not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 1):
+ # define MIDDLEBOX constant, as python2.7 does not know about it
+ # but it is used by default.
+ OP_ENABLE_MIDDLEBOX_COMPAT = 1048576L
+ default |= OP_ENABLE_MIDDLEBOX_COMPAT
self.assertEqual(default, ctx.options)
ctx.options |= ssl.OP_NO_TLSv1
self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)
++++++ openssl-111-ssl_options.patch ++++++
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -807,12 +807,8 @@ class ContextTests(unittest.TestCase):
default = (ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
# SSLContext also enables these by default
default |= (OP_NO_COMPRESSION | OP_CIPHER_SERVER_PREFERENCE |
- ssl.OP_SINGLE_DH_USE | ssl.OP_SINGLE_ECDH_USE)
- if not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 1):
- # define MIDDLEBOX constant, as python2.7 does not know about it
- # but it is used by default.
- OP_ENABLE_MIDDLEBOX_COMPAT = 1048576L
- default |= OP_ENABLE_MIDDLEBOX_COMPAT
+ OP_SINGLE_DH_USE | OP_SINGLE_ECDH_USE |
+ OP_ENABLE_MIDDLEBOX_COMPAT)
self.assertEqual(default, ctx.options)
ctx.options |= ssl.OP_NO_TLSv1
self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)
++++++ pre_checkin.sh ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.229231071 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.229231071 +0100
@@ -9,3 +9,7 @@
sed -n -e '/COMMON-PREP-END/,$p' $spec;
} | uniq > $spec.tmp && mv $spec.tmp $spec
done
+
+# I really don't want to keep all three *.changes files separate
+cp python-base.changes python.changes
+cp python-base.changes python-doc.changes
++++++ python-2.5.1-sqlite.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.233231078 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.237231086 +0100
@@ -1,6 +1,6 @@
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
-@@ -837,6 +837,9 @@
+@@ -829,6 +829,9 @@ PyObject* pysqlite_cursor_executescript(
goto error;
}
++++++ python-2.6-gettext-plurals.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.241231094 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.241231094 +0100
@@ -1,8 +1,6 @@
-Index: Lib/gettext.py
-===================================================================
---- a/Lib/gettext.py.orig
+--- a/Lib/gettext.py
+++ b/Lib/gettext.py
-@@ -311,8 +311,9 @@ class GNUTranslations(NullTranslations):
+@@ -387,8 +387,9 @@ class GNUTranslations(NullTranslations):
self._charset = v.split('charset=')[1]
elif k == 'plural-forms':
v = v.split(';')
++++++ python-2.7-dirs.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.249231110 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.249231110 +0100
@@ -1,6 +1,6 @@
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
-@@ -106,7 +106,7 @@
+@@ -110,7 +110,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
++++++ python-2.7.14-docs-pdf-a4.tar.bz2 -> python-2.7.17-docs-pdf-a4.tar.bz2 ++++++
/work/SRC/openSUSE:Leap:15.2/python/python-2.7.14-docs-pdf-a4.tar.bz2 /work/SRC/openSUSE:Leap:15.2/.python.new.26092/python-2.7.17-docs-pdf-a4.tar.bz2 differ: char 11, line 1
++++++ python-2.7.14-docs-pdf-letter.tar.bz2 -> python-2.7.17-docs-pdf-letter.tar.bz2 ++++++
/work/SRC/openSUSE:Leap:15.2/python/python-2.7.14-docs-pdf-letter.tar.bz2 /work/SRC/openSUSE:Leap:15.2/.python.new.26092/python-2.7.17-docs-pdf-letter.tar.bz2 differ: char 11, line 1
++++++ python-2.7.17-switch-off-failing-SSL-tests.patch ++++++
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -152,9 +152,7 @@ def skip_if_broken_ubuntu_ssl(func):
try:
ssl.SSLContext(ssl.PROTOCOL_SSLv2)
except ssl.SSLError:
- if (ssl.OPENSSL_VERSION_INFO == (0, 9, 8, 15, 15) and
- platform.linux_distribution() == ('debian', 'squeeze/sid', '')):
- raise unittest.SkipTest("Patched Ubuntu OpenSSL breaks behaviour")
+ raise unittest.SkipTest("Test fails on SLE-12")
return func(*args, **kwargs)
return f
else:
@@ -1280,6 +1278,7 @@ class ContextTests(unittest.TestCase):
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
self._assert_context_options(ctx)
+ @skip_if_broken_ubuntu_ssl
def test__https_verify_certificates(self):
# Unit test to check the contect factory mapping
# The factories themselves are tested above
++++++ python-2.7.2-fix_date_time_compiler.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.281231174 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.281231174 +0100
@@ -1,8 +1,6 @@
-Index: Python-2.7.14/Makefile.pre.in
-===================================================================
---- Python-2.7.14.orig/Makefile.pre.in
-+++ Python-2.7.14/Makefile.pre.in
-@@ -638,8 +638,15 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -647,8 +647,15 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
-DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
-DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
-DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
++++++ python-2.7.4-canonicalize2.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.285231182 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.285231182 +0100
@@ -1,8 +1,6 @@
-Index: Python-2.7.7/Python/sysmodule.c
-===================================================================
---- Python-2.7.7.orig/Python/sysmodule.c 2014-06-20 14:33:06.696228064 +0200
-+++ Python-2.7.7/Python/sysmodule.c 2014-06-20 14:33:10.960250497 +0200
-@@ -1624,7 +1624,20 @@
+--- a/Python/sysmodule.c
++++ b/Python/sysmodule.c
+@@ -1638,7 +1638,20 @@ PySys_SetArgvEx(int argc, char **argv, i
char *p = NULL;
Py_ssize_t n = 0;
PyObject *a;
@@ -24,7 +22,7 @@
char link[MAXPATHLEN+1];
char argv0copy[2*MAXPATHLEN+1];
int nr = 0;
-@@ -1651,7 +1664,8 @@
+@@ -1665,7 +1678,8 @@ PySys_SetArgvEx(int argc, char **argv, i
}
}
}
@@ -34,7 +32,7 @@
#if SEP == '\\' /* Special case for MS filename syntax */
if (argc > 0 && argv0 != NULL && strcmp(argv0, "-c") != 0) {
char *q;
-@@ -1680,11 +1694,6 @@
+@@ -1694,11 +1708,6 @@ PySys_SetArgvEx(int argc, char **argv, i
}
#else /* All other filename syntaxes */
if (argc > 0 && argv0 != NULL && strcmp(argv0, "-c") != 0) {
@@ -46,7 +44,7 @@
p = strrchr(argv0, SEP);
}
if (p != NULL) {
-@@ -1702,6 +1711,9 @@
+@@ -1716,6 +1725,9 @@ PySys_SetArgvEx(int argc, char **argv, i
a = PyString_FromStringAndSize(argv0, n);
if (a == NULL)
Py_FatalError("no mem for sys.path insertion");
@@ -56,10 +54,8 @@
if (PyList_Insert(path, 0, a) < 0)
Py_FatalError("sys.path.insert(0) failed");
Py_DECREF(a);
-Index: Python-2.7.7/pyconfig.h.in
-===================================================================
---- Python-2.7.7.orig/pyconfig.h.in 2014-05-31 20:58:40.000000000 +0200
-+++ Python-2.7.7/pyconfig.h.in 2014-06-20 14:33:10.961250502 +0200
+--- a/pyconfig.h.in
++++ b/pyconfig.h.in
@@ -109,6 +109,9 @@
/* Define to 1 if you have the 'chflags' function. */
#undef HAVE_CHFLAGS
@@ -70,13 +66,11 @@
/* Define to 1 if you have the `chown' function. */
#undef HAVE_CHOWN
-Index: Python-2.7.7/configure.ac
-===================================================================
---- Python-2.7.7.orig/configure.ac 2014-06-20 14:33:06.694228054 +0200
-+++ Python-2.7.7/configure.ac 2014-06-20 14:33:10.961250502 +0200
-@@ -2935,7 +2935,7 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -3159,7 +3159,7 @@ AC_CHECK_FUNCS(alarm setitimer getitimer
getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
- initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
+ initgroups kill killpg lchown lstat mkfifo mknod mktime mmap \
mremap nice pathconf pause plock poll pthread_init \
- putenv readlink realpath \
+ putenv readlink realpath canonicalize_file_name \
++++++ python-2.7.5-multilib.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.293231198 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.293231198 +0100
@@ -1,8 +1,6 @@
-Index: Python-2.7.14/configure.ac
-===================================================================
---- Python-2.7.14.orig/configure.ac
-+++ Python-2.7.14/configure.ac
-@@ -758,6 +758,41 @@ SunOS*)
+--- a/configure.ac
++++ b/configure.ac
+@@ -773,6 +773,41 @@ SunOS*)
;;
esac
@@ -44,10 +42,8 @@
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
-Index: Python-2.7.14/Include/pythonrun.h
-===================================================================
---- Python-2.7.14.orig/Include/pythonrun.h
-+++ Python-2.7.14/Include/pythonrun.h
+--- a/Include/pythonrun.h
++++ b/Include/pythonrun.h
@@ -108,6 +108,8 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -57,10 +53,8 @@
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.14/Lib/distutils/command/install.py
-===================================================================
---- Python-2.7.14.orig/Lib/distutils/command/install.py
-+++ Python-2.7.14/Lib/distutils/command/install.py
+--- a/Lib/distutils/command/install.py
++++ b/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -79,10 +73,8 @@
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.14/Lib/distutils/sysconfig.py
-===================================================================
---- Python-2.7.14.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.14/Lib/distutils/sysconfig.py
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -97,10 +89,8 @@
if standard_lib:
return libpython
else:
-Index: Python-2.7.14/Lib/pydoc.py
-===================================================================
---- Python-2.7.14.orig/Lib/pydoc.py
-+++ Python-2.7.14/Lib/pydoc.py
+--- a/Lib/pydoc.py
++++ b/Lib/pydoc.py
@@ -375,7 +375,7 @@ class Doc:
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
@@ -110,10 +100,8 @@
"python"+sys.version[0:3])):
"""Return the location of module docs or None"""
-Index: Python-2.7.14/Lib/site.py
-===================================================================
---- Python-2.7.14.orig/Lib/site.py
-+++ Python-2.7.14/Lib/site.py
+--- a/Lib/site.py
++++ b/Lib/site.py
@@ -231,29 +231,38 @@ def getuserbase():
USER_BASE = get_config_var('userbase')
return USER_BASE
@@ -197,10 +185,8 @@
return sitepackages
def addsitepackages(known_paths):
-Index: Python-2.7.14/Lib/sysconfig.py
-===================================================================
---- Python-2.7.14.orig/Lib/sysconfig.py
-+++ Python-2.7.14/Lib/sysconfig.py
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
@@ -7,10 +7,10 @@ from os.path import pardir, realpath
_INSTALL_SCHEMES = {
@@ -229,10 +215,8 @@
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
-Index: Python-2.7.14/Lib/test/test_dl.py
-===================================================================
---- Python-2.7.14.orig/Lib/test/test_dl.py
-+++ Python-2.7.14/Lib/test/test_dl.py
+--- a/Lib/test/test_dl.py
++++ b/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -247,11 +231,9 @@
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.14/Lib/test/test_site.py
-===================================================================
---- Python-2.7.14.orig/Lib/test/test_site.py
-+++ Python-2.7.14/Lib/test/test_site.py
-@@ -252,12 +252,16 @@ class HelperFunctionsTests(unittest.Test
+--- a/Lib/test/test_site.py
++++ b/Lib/test/test_site.py
+@@ -254,12 +254,16 @@ class HelperFunctionsTests(unittest.Test
self.assertEqual(dirs[0], wanted)
elif os.sep == '/':
# OS X, Linux, FreeBSD, etc
@@ -271,10 +253,21 @@
else:
# other platforms
self.assertEqual(len(dirs), 2)
-Index: Python-2.7.14/Lib/trace.py
-===================================================================
---- Python-2.7.14.orig/Lib/trace.py
-+++ Python-2.7.14/Lib/trace.py
+@@ -305,7 +309,11 @@ class HelperFunctionsTests(unittest.Test
+ known_paths = set()
+ site.addusersitepackages(known_paths)
+
+- self.assertEqual(fake_isdir.arg, user_site)
++ # value of user_site cannot be used for comparison, because
++ # the following assert mistakenly assumes 'platlib' and
++ # 'purelib' directories are same.
++ self.assertEqual(fake_isdir.arg,
++ site.getusersitepackages('platlib'))
+ self.assertFalse(known_paths)
+
+
+--- a/Lib/trace.py
++++ b/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -288,10 +281,8 @@
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.14/Makefile.pre.in
-===================================================================
---- Python-2.7.14.orig/Makefile.pre.in
-+++ Python-2.7.14/Makefile.pre.in
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
@@ -91,6 +91,8 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
@@ -301,7 +292,7 @@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -644,6 +646,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -653,6 +655,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -309,7 +300,7 @@
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -692,7 +695,7 @@ regen-ast:
+@@ -701,7 +704,7 @@ regen-ast:
Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -318,10 +309,8 @@
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.14/Modules/getpath.c
-===================================================================
---- Python-2.7.14.orig/Modules/getpath.c
-+++ Python-2.7.14/Modules/getpath.c
+--- a/Modules/getpath.c
++++ b/Modules/getpath.c
@@ -100,6 +100,8 @@
#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
@@ -340,10 +329,8 @@
static void
reduce(char *dir)
-Index: Python-2.7.14/Python/getplatform.c
-===================================================================
---- Python-2.7.14.orig/Python/getplatform.c
-+++ Python-2.7.14/Python/getplatform.c
+--- a/Python/getplatform.c
++++ b/Python/getplatform.c
@@ -10,3 +10,23 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -368,10 +355,8 @@
+{
+ return LIB;
+}
-Index: Python-2.7.14/Python/sysmodule.c
-===================================================================
---- Python-2.7.14.orig/Python/sysmodule.c
-+++ Python-2.7.14/Python/sysmodule.c
+--- a/Python/sysmodule.c
++++ b/Python/sysmodule.c
@@ -1437,6 +1437,10 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
@@ -383,10 +368,8 @@
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.14/setup.py
-===================================================================
---- Python-2.7.14.orig/setup.py
-+++ Python-2.7.14/setup.py
+--- a/setup.py
++++ b/setup.py
@@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
def detect_modules(self):
# Ensure that /usr/local is always used
@@ -410,7 +393,7 @@
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
-@@ -1941,18 +1941,17 @@ class PyBuildExt(build_ext):
+@@ -1933,18 +1933,17 @@ class PyBuildExt(build_ext):
# Check for various platform-specific directories
if host_platform == 'sunos5':
include_dirs.append('/usr/openwin/include')
++++++ python-2.7.9-sles-disable-verification-by-default.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.297231206 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.297231206 +0100
@@ -1,24 +1,21 @@
-Index: Python-2.7.9/Lib/ssl.py
-===================================================================
---- Python-2.7.9.orig/Lib/ssl.py 2015-08-12 15:53:27.419729448 +0200
-+++ Python-2.7.9/Lib/ssl.py 2015-08-12 15:58:10.668465183 +0200
-@@ -469,7 +469,18 @@
- return context
-
- # Used by http.client if no context is explicitly passed.
--_create_default_https_context = create_default_context
-+try:
-+ # load the TLS checks policy from separate package
-+ import sle_tls_checks_policy as policy
-+ if policy.get_policy:
-+ _create_default_https_context = policy.get_policy()
-+ else:
-+ # empty policy file means simply enable strict verification
-+ _create_default_https_context = create_default_context
+--- a/Lib/ssl.py
++++ b/Lib/ssl.py
+@@ -495,7 +495,17 @@ def _get_https_context_factory():
+ config_setting = os.environ.get(_https_verify_envvar)
+ if config_setting == '0':
+ return _create_unverified_context
+- return create_default_context
+
-+except ImportError:
-+ # policy not present, disable verification for backwards compatibility
-+ _create_default_https_context = _create_unverified_context
++ try:
++ # load the TLS checks policy from separate package
++ import sle_tls_checks_policy as policy
++ if policy.get_policy:
++ return policy.get_policy()
++ else:
++ # empty policy file means simply enable strict verification
++ return create_default_context
++ except ImportError:
++ return create_default_context
+ _create_default_https_context = _get_https_context_factory()
- # Backwards compatibility alias, even though it's not a public name.
++++++ python-2.7.9-ssl_ca_path.patch ++++++
--- /var/tmp/diff_new_pack.AW4Rit/_old 2020-03-01 08:51:01.305231222 +0100
+++ /var/tmp/diff_new_pack.AW4Rit/_new 2020-03-01 08:51:01.305231222 +0100
@@ -1,8 +1,6 @@
-Index: Python-2.7.9/Lib/ssl.py
-===================================================================
---- Python-2.7.9.orig/Lib/ssl.py 2014-12-10 16:59:40.000000000 +0100
-+++ Python-2.7.9/Lib/ssl.py 2015-02-25 17:28:19.538808314 +0100
-@@ -504,7 +504,15 @@
+--- a/Lib/ssl.py
++++ b/Lib/ssl.py
+@@ -537,7 +537,15 @@ class SSLSocket(socket):
self._context = SSLContext(ssl_version)
self._context.verify_mode = cert_reqs
if ca_certs:
++++++ python-bsddb6.patch ++++++
From: Jan Engelhardt <jengelh(a)inai.de>
Date: 2013-07-06 16:07:31.146616589 +0200
This patch was partially autogenerated:
- copying python-bsddb3-6.0.0 sources into the python-2.7.5 tree
- creating a diff -w against the unmodified python-2.7.5
- stripped all hunks that pertained to module renaming
- manually added db6 searching to setup.py
---
Lib/bsddb/test/test_all.py | 15 +++--
Lib/bsddb/test/test_misc.py | 5 +
Lib/bsddb/test/test_replication.py | 25 +-------
Modules/_bsddb.c | 108 +++++++++++++++++++++++++++++++++----
Modules/bsddb.h | 2
setup.py | 6 +-
6 files changed, 120 insertions(+), 41 deletions(-)
--- a/Lib/bsddb/test/test_all.py
+++ b/Lib/bsddb/test/test_all.py
@@ -74,8 +74,9 @@ if sys.version_info[0] >= 3 :
key = key.decode(charset)
return (key, value.decode(charset))
- def __next__(self) :
- v = getattr(self._dbcursor, "next")()
+ def __next__(self, flags=0, dlen=-1, doff=-1) :
+ v = getattr(self._dbcursor, "next")(flags=flags, dlen=dlen,
+ doff=doff)
return self._fix(v)
next = __next__
@@ -128,8 +129,8 @@ if sys.version_info[0] >= 3 :
v = self._dbcursor.current(flags=flags, dlen=dlen, doff=doff)
return self._fix(v)
- def first(self) :
- v = self._dbcursor.first()
+ def first(self, flags=0, dlen=-1, doff=-1) :
+ v = self._dbcursor.first(flags=flags, dlen=dlen, doff=doff)
return self._fix(v)
def pget(self, key=None, data=None, flags=0) :
@@ -489,7 +490,11 @@ def print_versions():
print 'py module: %s' % getattr(bsddb, "__file"+suffix)
print 'extension module: %s' % getattr(bsddb, "__file"+suffix)
- print 'python version: %s' % sys.version
+ print 'Test working dir: %s' % get_test_path_prefix()
+ import platform
+ print 'python version: %s %s' % \
+ (sys.version.replace("\r", "").replace("\n", ""), \
+ platform.architecture()[0])
print 'My pid: %s' % os.getpid()
print '-=' * 38
--- a/Lib/bsddb/test/test_misc.py
+++ b/Lib/bsddb/test/test_misc.py
@@ -46,8 +46,9 @@ class MiscTestCase(unittest.TestCase):
d[repr(i)] = repr(100*i)
db.close()
db = hashopen(self.filename)
- rp = repr(db)
- self.assertEqual(rp, repr(d))
+ rp = repr(sorted(db.items()))
+ rd = repr(sorted(d.items()))
+ self.assertEqual(rp, rd)
db.close()
# http://sourceforge.net/tracker/index.php?func=detail&aid=1708868&group_id=1…
--- a/Lib/bsddb/test/test_replication.py
+++ b/Lib/bsddb/test/test_replication.py
@@ -165,21 +165,10 @@ class DBReplicationManager(DBReplication
# is not generated if the master has no new transactions.
# This is solved in BDB 4.6 (#15542).
import time
- timeout = time.time()+60
+ timeout = time.time()+10
while (time.time()<timeout) and not (self.confirmed_master and self.client_startupdone) :
time.sleep(0.02)
- # self.client_startupdone does not always get set to True within
- # the timeout. On windows this may be a deep issue, on other
- # platforms it is likely just a timing issue, especially on slow
- # virthost buildbots (see issue 3892 for more). Even though
- # the timeout triggers, the rest of this test method usually passes
- # (but not all of it always, see below). So we just note the
- # timeout on stderr and keep soldering on.
- if time.time()>timeout:
- import sys
- print >> sys.stderr, ("XXX: timeout happened before"
- "startup was confirmed - see issue 3892")
- startup_timeout = True
+ self.assertTrue(time.time()<timeout)
d = self.dbenvMaster.repmgr_site_list()
self.assertEqual(len(d), 1)
@@ -237,14 +226,6 @@ class DBReplicationManager(DBReplication
txn.commit()
if v is None :
time.sleep(0.02)
- # If startup did not happen before the timeout above, then this test
- # sometimes fails. This happens randomly, which causes buildbot
- # instability, but all the other bsddb tests pass. Since bsddb3 in the
- # stdlib is currently not getting active maintenance, and is gone in
- # py3k, we just skip the end of the test in that case.
- if time.time()>=timeout and startup_timeout:
- self.skipTest("replication test skipped due to random failure, "
- "see issue 3892")
self.assertLess(time.time(), timeout)
self.assertEqual("123", v)
@@ -375,7 +356,7 @@ class DBBaseReplication(DBReplication) :
# is not generated if the master has no new transactions.
# This is solved in BDB 4.6 (#15542).
import time
- timeout = time.time()+60
+ timeout = time.time()+10
while (time.time()<timeout) and not (self.confirmed_master and
self.client_startupdone) :
time.sleep(0.02)
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -124,10 +124,14 @@ typedef int Py_ssize_t;
#define NUMBER_Check PyLong_Check
#define NUMBER_AsLong PyLong_AsLong
#define NUMBER_FromLong PyLong_FromLong
+#define NUMBER_FromUnsignedLong PyLong_FromUnsignedLong
#else
#define NUMBER_Check PyInt_Check
#define NUMBER_AsLong PyInt_AsLong
#define NUMBER_FromLong PyInt_FromLong
+#if (PY_VERSION_HEX >= 0x02050000)
+#define NUMBER_FromUnsignedLong PyInt_FromSize_t
+#endif
#endif
#ifdef WITH_THREAD
@@ -853,6 +857,18 @@ static void _addIntToDict(PyObject* dict
Py_XDECREF(v);
}
+#if (DBVER >= 60) && (PY_VERSION_HEX >= 0x02050000)
+/* add an unsigned integer to a dictionary using the given name as a key */
+static void _addUnsignedIntToDict(PyObject* dict, char *name, unsigned int value)
+{
+ PyObject* v = NUMBER_FromUnsignedLong((unsigned long) value);
+ if (!v || PyDict_SetItemString(dict, name, v))
+ PyErr_Clear();
+
+ Py_XDECREF(v);
+}
+#endif
+
/* The same, when the value is a time_t */
static void _addTimeTToDict(PyObject* dict, char *name, time_t value)
{
@@ -2677,13 +2693,21 @@ _default_cmp(const DBT *leftKey,
static int
_db_compareCallback(DB* db,
const DBT *leftKey,
- const DBT *rightKey)
+ const DBT *rightKey
+#if (DBVER >= 60)
+ , size_t *locp
+#endif
+ )
{
int res = 0;
PyObject *args;
PyObject *result = NULL;
DBObject *self = (DBObject *)db->app_private;
+# if (DBVER >= 60)
+ locp = NULL; /* As required by documentation */
+#endif
+
if (self == NULL || self->btCompareCallback == NULL) {
MYDB_BEGIN_BLOCK_THREADS;
PyErr_SetString(PyExc_TypeError,
@@ -2791,13 +2815,21 @@ DB_set_bt_compare(DBObject* self, PyObje
static int
_db_dupCompareCallback(DB* db,
const DBT *leftKey,
- const DBT *rightKey)
+ const DBT *rightKey
+#if (DBVER >= 60)
+ , size_t *locp
+#endif
+ )
{
int res = 0;
PyObject *args;
PyObject *result = NULL;
DBObject *self = (DBObject *)db->app_private;
+#if (DBVER >= 60)
+ locp = NULL; /* As required by documentation */
+#endif
+
if (self == NULL || self->dupCompareCallback == NULL) {
MYDB_BEGIN_BLOCK_THREADS;
PyErr_SetString(PyExc_TypeError,
@@ -3576,13 +3608,14 @@ Py_ssize_t DB_length(PyObject* _self)
err = self->db->stat(self->db, /*txnid*/ NULL, &sp, 0);
MYDB_END_ALLOW_THREADS;
+ if (makeDBError(err)) {
+ return -1;
+ }
+
/* All the stat structures have matching fields upto the ndata field,
so we can use any of them for the type cast */
size = ((DB_BTREE_STAT*)sp)->bt_ndata;
- if (err)
- return -1;
-
free(sp);
return size;
}
@@ -8420,12 +8453,22 @@ static PyObject*
DBSequence_get(DBSequenceObject* self, PyObject* args, PyObject* kwargs)
{
int err, flags = 0;
+#if (DBVER >= 60)
+ unsigned
+#endif
int delta = 1;
db_seq_t value;
PyObject *txnobj = NULL;
DB_TXN *txn = NULL;
static char* kwnames[] = {"delta", "txn", "flags", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iOi:get", kwnames, &delta, &txnobj, &flags))
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+#if (DBVER >=60)
+ "|IOi:get",
+#else
+ "|iOi:get",
+#endif
+ kwnames, &delta, &txnobj, &flags))
return NULL;
CHECK_SEQUENCE_NOT_CLOSED(self)
@@ -8555,8 +8598,19 @@ DBSequence_remove(DBSequenceObject* self
static PyObject*
DBSequence_set_cachesize(DBSequenceObject* self, PyObject* args)
{
- int err, size;
- if (!PyArg_ParseTuple(args,"i:set_cachesize", &size))
+ int err;
+#if (DBVER >= 60)
+ unsigned
+#endif
+ int size;
+
+ if (!PyArg_ParseTuple(args,
+#if (DBVER >= 60)
+ "I:set_cachesize",
+#else
+ "i:set_cachesize",
+#endif
+ &size))
return NULL;
CHECK_SEQUENCE_NOT_CLOSED(self)
@@ -8571,7 +8625,11 @@ DBSequence_set_cachesize(DBSequenceObjec
static PyObject*
DBSequence_get_cachesize(DBSequenceObject* self)
{
- int err, size;
+ int err;
+#if (DBVER >= 60)
+ unsigned
+#endif
+ int size;
CHECK_SEQUENCE_NOT_CLOSED(self)
@@ -8700,6 +8758,9 @@ DBSequence_stat(DBSequenceObject* self,
#define MAKE_INT_ENTRY(name) _addIntToDict(dict_stat, #name, sp->st_##name)
+#if (DBVER >= 60) && (PY_VERSION_HEX >= 0x02050000)
+#define MAKE_UNSIGNED_INT_ENTRY(name) _addUnsignedIntToDict(dict_stat, #name, sp->st_##name)
+#endif
#define MAKE_LONG_LONG_ENTRY(name) _addDb_seq_tToDict(dict_stat, #name, sp->st_##name)
MAKE_INT_ENTRY(wait);
@@ -8709,10 +8770,15 @@ DBSequence_stat(DBSequenceObject* self,
MAKE_LONG_LONG_ENTRY(last_value);
MAKE_LONG_LONG_ENTRY(min);
MAKE_LONG_LONG_ENTRY(max);
+#if (DBVER >= 60) && (PY_VERSION_HEX >= 0x02050000)
+ MAKE_UNSIGNED_INT_ENTRY(cache_size);
+#else
MAKE_INT_ENTRY(cache_size);
+#endif
MAKE_INT_ENTRY(flags);
#undef MAKE_INT_ENTRY
+#undef MAKE_UNSIGNED_INT_ENTRY
#undef MAKE_LONG_LONG_ENTRY
free(sp);
@@ -9014,7 +9080,7 @@ static PyMethodDef DBEnv_methods[] = {
{"txn_recover", (PyCFunction)DBEnv_txn_recover, METH_NOARGS},
#if (DBVER < 48)
{"set_rpc_server", (PyCFunction)DBEnv_set_rpc_server,
- METH_VARARGS|METH_KEYWORDS},
+ METH_VARARGS||METH_KEYWORDS},
#endif
{"set_mp_max_openfd", (PyCFunction)DBEnv_set_mp_max_openfd, METH_VARARGS},
{"get_mp_max_openfd", (PyCFunction)DBEnv_get_mp_max_openfd, METH_NOARGS},
@@ -9986,6 +10052,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /
ADD_INT(d, DB_LOG_ZERO);
#endif
+#if (DBVER >= 60)
+ ADD_INT(d, DB_LOG_BLOB);
+#endif
+
#if (DBVER >= 44)
ADD_INT(d, DB_DSYNC_DB);
#endif
@@ -10046,6 +10116,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /
ADD_INT(d, DB_EVENT_REG_PANIC);
#endif
+#if (DBVER >= 60)
+ ADD_INT(d, DB_EVENT_REP_AUTOTAKEOVER_FAILED);
+#endif
+
#if (DBVER >=52)
ADD_INT(d, DB_EVENT_REP_SITE_ADDED);
ADD_INT(d, DB_EVENT_REP_SITE_REMOVED);
@@ -10150,6 +10224,20 @@ PyMODINIT_FUNC PyInit__bsddb(void) /
ADD_INT(d, DB_REP_CONF_INMEM);
#endif
+#if (DBVER >= 60)
+ ADD_INT(d, DB_REPMGR_ISVIEW);
+#endif
+
+#if (DBVER >= 60)
+ ADD_INT(d, DB_DBT_BLOB);
+#endif
+
+#if (DBVER >= 60)
+ ADD_INT(d, DB_STREAM_READ);
+ ADD_INT(d, DB_STREAM_WRITE);
+ ADD_INT(d, DB_STREAM_SYNC_WRITE);
+#endif
+
ADD_INT(d, DB_TIMEOUT);
#if (DBVER >= 50)
--- a/Modules/bsddb.h
+++ b/Modules/bsddb.h
@@ -110,7 +110,7 @@
#error "eek! DBVER can't handle minor versions > 9"
#endif
-#define PY_BSDDB_VERSION "5.3.0"
+#define PY_BSDDB_VERSION "6.0.0"
/* Python object definitions */
--- a/setup.py
+++ b/setup.py
@@ -905,7 +905,7 @@ class PyBuildExt(build_ext):
# a release. Most open source OSes come with one or more
# versions of BerkeleyDB already installed.
- max_db_ver = (5, 3)
+ max_db_ver = (6, 0)
min_db_ver = (4, 3)
db_setup_debug = False # verbose debug prints from this script?
@@ -945,6 +945,7 @@ class PyBuildExt(build_ext):
# construct a list of paths to look for the header file in on
# top of the normal inc_dirs.
db_inc_paths = [
+ '/usr/include/db6',
'/usr/include/db4',
'/usr/local/include/db4',
'/opt/sfw/include/db4',
@@ -984,6 +985,7 @@ class PyBuildExt(build_ext):
for dn in inc_dirs:
std_variants.append(os.path.join(dn, 'db3'))
std_variants.append(os.path.join(dn, 'db4'))
+ std_variants.append(os.path.join(dn, 'db6'))
for x in gen_db_minor_ver_nums(4):
std_variants.append(os.path.join(dn, "db4%d"%x))
std_variants.append(os.path.join(dn, "db4.%d"%x))
++++++ remove-static-libpython.patch ++++++
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -488,7 +488,7 @@ coverage-report: regen-grammar
# Build the interpreter
-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
+$(BUILDPYTHON): Modules/python.o $(LDLIBRARY)
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
Modules/python.o \
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
@@ -529,18 +529,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.tx
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-# Build static library
-# avoid long command lines, same as LIBRARY_OBJS
-$(LIBRARY): $(LIBRARY_OBJS)
- -rm -f $@
- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
- $(AR) $(ARFLAGS) $@ $(MODOBJS)
- $(RANLIB) $@
-
libpython$(VERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
@@ -1220,18 +1208,6 @@ libainstall: @DEF_MAKE_RULE@ python-conf
else true; \
fi; \
done
- @if test -d $(LIBRARY); then :; else \
- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
- if test "$(SO)" = .dll; then \
- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
- else \
- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
- fi; \
- else \
- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
- fi; \
- fi
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
$(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
1
0
Hello community,
here is the log from the commit of package python-PyYAML for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-PyYAML (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-PyYAML.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyYAML"
Sun Mar 1 08:50:53 2020 rev:13 rq:779828 version:5.1.2
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-PyYAML/python-PyYAML.changes 2020-01-15 15:46:16.323351769 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-PyYAML.new.26092/python-PyYAML.changes 2020-03-01 08:50:57.813224275 +0100
@@ -1,0 +2,29 @@
+Wed Nov 13 11:43:22 UTC 2019 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update in SLE-15 (bsc#1140565)
+
+-------------------------------------------------------------------
+Thu Aug 1 13:17:00 UTC 2019 - Marketa Calabkova <mcalabkova(a)suse.com>
+
+- update to 5.1.2
+ * Re-release of 5.1 with regenerated Cython sources to build properly for Python 3.8b2+
+
+-------------------------------------------------------------------
+Fri Jun 7 12:04:35 UTC 2019 - Ondřej Súkup <mimi.vx(a)gmail.com>
+
+- update to 5.1.1
+ * Re-release of 5.1 with regenerated Cython sources to build properly for Python 3.8
+
+-------------------------------------------------------------------
+Thu Mar 14 14:47:06 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 5.1:
+ * many changes, see CHANGES
+ * bsc#1099308 CVE-2017-18342 PyYAML: yaml.load() API could execute arbitrary code
+
+-------------------------------------------------------------------
+Mon Jan 14 16:06:38 CET 2019 - kukuk(a)suse.de
+
+- Use %license instead of %doc [bsc#1082318]
+
+-------------------------------------------------------------------
Old:
----
PyYAML-3.13.tar.gz
New:
----
PyYAML-5.1.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PyYAML.spec ++++++
--- /var/tmp/diff_new_pack.dXRsj2/_old 2020-03-01 08:50:58.261225166 +0100
+++ /var/tmp/diff_new_pack.dXRsj2/_new 2020-03-01 08:50:58.265225175 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-PyYAML
#
-# Copyright (c) 2018 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,22 +12,23 @@
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-PyYAML
-Version: 3.13
+Version: 5.1.2
Release: 0
Summary: YAML parser and emitter for Python
License: MIT
Group: Development/Languages/Python
-Url: http://pyyaml.org/wiki/PyYAML
+URL: https://github.com/yaml/pyyaml
Source: https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-%{version}.t…
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
BuildRequires: libyaml-devel
BuildRequires: python-rpm-macros
%ifpython2
@@ -62,6 +63,7 @@
%install
%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# Increase file-descriptor-count for ppc to make tests happy.
@@ -71,8 +73,8 @@
%python_exec setup.py test
%files %{python_files}
-%defattr(-,root,root)
-%doc CHANGES LICENSE README examples/
+%license LICENSE
+%doc CHANGES README examples/
%{python_sitearch}/yaml
%{python_sitearch}/_yaml.*so
%{python_sitearch}/PyYAML-%{version}-py%{python_version}.egg-info
++++++ PyYAML-3.13.tar.gz -> PyYAML-5.1.2.tar.gz ++++++
++++ 8481 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package protobuf for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/protobuf (Old)
and /work/SRC/openSUSE:Leap:15.2/.protobuf.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "protobuf"
Sun Mar 1 08:50:51 2020 rev:28 rq:779162 version:3.9.2
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/protobuf/protobuf.changes 2020-02-05 07:29:20.798744871 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.protobuf.new.26092/protobuf.changes 2020-03-01 08:50:55.853220376 +0100
@@ -1,0 +2,14 @@
+Fri Dec 20 09:04:24 UTC 2019 - Martin Pluskal <mpluskal(a)suse.com>
+
+- Use tarball provided by upstream
+- Small package cleanup
+
+-------------------------------------------------------------------
+Thu Dec 19 12:47:53 UTC 2019 - Madhu Mohan Nelemane <mmnelemane(a)suse.com>
+
+- Updated to version 3.9.2 (bsc#1162343)
+ (Objective-C)
+ * Remove OSReadLittle* due to alignment requirements. (#6678)
+ * Don't use unions and instead use memcpy for the type swaps. (#6672)
+
+-------------------------------------------------------------------
Old:
----
protobuf-3.9.1.tar.gz
New:
----
protobuf-3.9.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ protobuf.spec ++++++
--- /var/tmp/diff_new_pack.mMIn8U/_old 2020-03-01 08:50:56.357221379 +0100
+++ /var/tmp/diff_new_pack.mMIn8U/_new 2020-03-01 08:50:56.361221388 +0100
@@ -1,7 +1,7 @@
#
# spec file for package protobuf
#
-# 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
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define sover 20
%define tarname protobuf
-%define src_install_dir /usr/src/%{name}
+%define src_install_dir %{_prefix}/src/%{name}
%define extra_java_flags -source 7 -target 7
# requires gmock, which is not yet in the distribution
%bcond_with check
@@ -27,7 +27,7 @@
%bcond_without python2
%bcond_without python3
Name: protobuf
-Version: 3.9.1
+Version: 3.9.2
Release: 0
Summary: Protocol Buffers - Google's data interchange format
License: BSD-3-Clause
@@ -208,13 +208,13 @@
tar -xzf %{SOURCE0} --strip-components=1 -C %{buildroot}%{src_install_dir}
%fdupes %{buildroot}%{src_install_dir}
# Fix env-script-interpreter rpmlint error
-find %{buildroot}%{src_install_dir} -type f -name "*.js" -exec sed -i 's|#!.*/usr/bin/env node|#!/usr/bin/node|' "{}" +
-find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/env python2.7|#!/usr/bin/python2.7|' "{}" +
-find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/env python|#!/usr/bin/python|' "{}" +
-find %{buildroot}%{src_install_dir} -type f -name "*.rb" -exec sed -i 's|#!.*/usr/bin/env ruby|#!/usr/bin/ruby|' "{}" +
-find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec sed -i 's|#!.*/usr/bin/env bash|#!/bin/bash|' "{}" +
+find %{buildroot}%{src_install_dir} -type f -name "*.js" -exec sed -i 's|#!.*%{_bindir}/env node|#!%{_bindir}/node|' "{}" +
+find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*%{_bindir}/env python2.7|#!%{_bindir}/python2.7|' "{}" +
+find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!.*%{_bindir}/env python|#!%{_bindir}/python|' "{}" +
+find %{buildroot}%{src_install_dir} -type f -name "*.rb" -exec sed -i 's|#!.*%{_bindir}/env ruby|#!%{_bindir}/ruby|' "{}" +
+find %{buildroot}%{src_install_dir} -type f -name "*.sh" -exec sed -i 's|#!.*%{_bindir}/env bash|#!/bin/bash|' "{}" +
# And stop requiring ridiculously old Python version
-find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!/usr/bin/python2.4|#!/usr/bin/python2.7|' "{}" +
+find %{buildroot}%{src_install_dir} -type f -name "*.py" -exec sed -i 's|#!%{_bindir}/python2.4|#!%{_bindir}/python2.7|' "{}" +
# Fix spurious-executable-perm rpmlint error
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/arenastring.h
chmod -x %{buildroot}%{src_install_dir}/src/google/protobuf/compiler/js/js_generator.h
++++++ protobuf-3.9.1.tar.gz -> protobuf-3.9.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/Protobuf.podspec new/protobuf-3.9.2/Protobuf.podspec
--- old/protobuf-3.9.1/Protobuf.podspec 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/Protobuf.podspec 2019-09-20 23:50:52.000000000 +0200
@@ -5,7 +5,7 @@
# dependent projects use the :git notation to refer to the library.
Pod::Spec.new do |s|
s.name = 'Protobuf'
- s.version = '3.9.1'
+ s.version = '3.9.2'
s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.'
s.homepage = 'https://github.com/protocolbuffers/protobuf'
s.license = '3-Clause BSD License'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/configure.ac new/protobuf-3.9.2/configure.ac
--- old/protobuf-3.9.1/configure.ac 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/configure.ac 2019-09-20 23:50:52.000000000 +0200
@@ -17,7 +17,7 @@
# In the SVN trunk, the version should always be the next anticipated release
# version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed
# the size of one file name in the dist tarfile over the 99-char limit.)
-AC_INIT([Protocol Buffers],[3.9.1],[protobuf(a)googlegroups.com],[protobuf]
+AC_INIT([Protocol Buffers],[3.9.2],[protobuf(a)googlegroups.com],[protobuf]
AM_MAINTAINER_MODE([enable])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/csharp/Google.Protobuf.Tools.nuspec new/protobuf-3.9.2/csharp/Google.Protobuf.Tools.nuspec
--- old/protobuf-3.9.1/csharp/Google.Protobuf.Tools.nuspec 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/csharp/Google.Protobuf.Tools.nuspec 2019-09-20 23:50:52.000000000 +0200
@@ -5,7 +5,7 @@
<title>Google Protocol Buffers tools</title>
<summary>Tools for Protocol Buffers - Google's data interchange format.</summary>
<description>See project site for more info.</description>
- <version>3.9.1</version>
+ <version>3.9.2</version>
<authors>Google Inc.</authors>
<owners>protobuf-packages</owners>
<licenseUrl>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</licenseUrl>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/csharp/src/Google.Protobuf/Google.Protobuf.csproj new/protobuf-3.9.2/csharp/src/Google.Protobuf/Google.Protobuf.csproj
--- old/protobuf-3.9.1/csharp/src/Google.Protobuf/Google.Protobuf.csproj 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/csharp/src/Google.Protobuf/Google.Protobuf.csproj 2019-09-20 23:50:52.000000000 +0200
@@ -4,7 +4,7 @@
<Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description>
<Copyright>Copyright 2015, Google Inc.</Copyright>
<AssemblyTitle>Google Protocol Buffers</AssemblyTitle>
- <VersionPrefix>3.9.1</VersionPrefix>
+ <VersionPrefix>3.9.2</VersionPrefix>
<LangVersion>6</LangVersion>
<Authors>Google Inc.</Authors>
<TargetFrameworks>netstandard1.0;netstandard2.0;net45</TargetFrameworks>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/java/bom/pom.xml new/protobuf-3.9.2/java/bom/pom.xml
--- old/protobuf-3.9.1/java/bom/pom.xml 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/java/bom/pom.xml 2019-09-20 23:50:52.000000000 +0200
@@ -4,7 +4,7 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId>
- <version>3.9.1</version>
+ <version>3.9.2</version>
<packaging>pom</packaging>
<name>Protocol Buffers [BOM]</name>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/java/core/pom.xml new/protobuf-3.9.2/java/core/pom.xml
--- old/protobuf-3.9.1/java/core/pom.xml 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/java/core/pom.xml 2019-09-20 23:50:52.000000000 +0200
@@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
- <version>3.9.1</version>
+ <version>3.9.2</version>
</parent>
<artifactId>protobuf-java</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/java/lite/pom.xml new/protobuf-3.9.2/java/lite/pom.xml
--- old/protobuf-3.9.1/java/lite/pom.xml 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/java/lite/pom.xml 2019-09-20 23:50:52.000000000 +0200
@@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
- <version>3.9.1</version>
+ <version>3.9.2</version>
</parent>
<artifactId>protobuf-javalite</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/java/pom.xml new/protobuf-3.9.2/java/pom.xml
--- old/protobuf-3.9.1/java/pom.xml 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/java/pom.xml 2019-09-20 23:50:52.000000000 +0200
@@ -4,7 +4,7 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
- <version>3.9.1</version>
+ <version>3.9.2</version>
<packaging>pom</packaging>
<name>Protocol Buffers [Parent]</name>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/java/util/pom.xml new/protobuf-3.9.2/java/util/pom.xml
--- old/protobuf-3.9.1/java/util/pom.xml 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/java/util/pom.xml 2019-09-20 23:50:52.000000000 +0200
@@ -4,7 +4,7 @@
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
- <version>3.9.1</version>
+ <version>3.9.2</version>
</parent>
<artifactId>protobuf-java-util</artifactId>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/js/package.json new/protobuf-3.9.2/js/package.json
--- old/protobuf-3.9.1/js/package.json 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/js/package.json 2019-09-20 23:50:52.000000000 +0200
@@ -1,6 +1,6 @@
{
"name": "google-protobuf",
- "version": "3.9.1",
+ "version": "3.9.2",
"description": "Protocol Buffers for JavaScript",
"main": "google-protobuf.js",
"files": [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/objectivec/GPBCodedInputStream.m new/protobuf-3.9.2/objectivec/GPBCodedInputStream.m
--- old/protobuf-3.9.1/objectivec/GPBCodedInputStream.m 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/objectivec/GPBCodedInputStream.m 2019-09-20 23:50:52.000000000 +0200
@@ -93,14 +93,22 @@
static int32_t ReadRawLittleEndian32(GPBCodedInputStreamState *state) {
CheckSize(state, sizeof(int32_t));
- int32_t value = OSReadLittleInt32(state->bytes, state->bufferPos);
+ // Not using OSReadLittleInt32 because it has undocumented dependency
+ // on reads being aligned.
+ int32_t value;
+ memcpy(&value, state->bytes + state->bufferPos, sizeof(int32_t));
+ value = OSSwapLittleToHostInt32(value);
state->bufferPos += sizeof(int32_t);
return value;
}
static int64_t ReadRawLittleEndian64(GPBCodedInputStreamState *state) {
CheckSize(state, sizeof(int64_t));
- int64_t value = OSReadLittleInt64(state->bytes, state->bufferPos);
+ // Not using OSReadLittleInt64 because it has undocumented dependency
+ // on reads being aligned.
+ int64_t value;
+ memcpy(&value, state->bytes + state->bufferPos, sizeof(int64_t));
+ value = OSSwapLittleToHostInt64(value);
state->bufferPos += sizeof(int64_t);
return value;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/objectivec/GPBUtilities_PackagePrivate.h new/protobuf-3.9.2/objectivec/GPBUtilities_PackagePrivate.h
--- old/protobuf-3.9.1/objectivec/GPBUtilities_PackagePrivate.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/objectivec/GPBUtilities_PackagePrivate.h 2019-09-20 23:50:52.000000000 +0200
@@ -71,27 +71,31 @@
// Conversion functions for de/serializing floating point types.
GPB_INLINE int64_t GPBConvertDoubleToInt64(double v) {
- union { double f; int64_t i; } u;
- u.f = v;
- return u.i;
+ GPBInternalCompileAssert(sizeof(double) == sizeof(int64_t), double_not_64_bits);
+ int64_t result;
+ memcpy(&result, &v, sizeof(result));
+ return result;
}
GPB_INLINE int32_t GPBConvertFloatToInt32(float v) {
- union { float f; int32_t i; } u;
- u.f = v;
- return u.i;
+ GPBInternalCompileAssert(sizeof(float) == sizeof(int32_t), float_not_32_bits);
+ int32_t result;
+ memcpy(&result, &v, sizeof(result));
+ return result;
}
GPB_INLINE double GPBConvertInt64ToDouble(int64_t v) {
- union { double f; int64_t i; } u;
- u.i = v;
- return u.f;
+ GPBInternalCompileAssert(sizeof(double) == sizeof(int64_t), double_not_64_bits);
+ double result;
+ memcpy(&result, &v, sizeof(result));
+ return result;
}
GPB_INLINE float GPBConvertInt32ToFloat(int32_t v) {
- union { float f; int32_t i; } u;
- u.i = v;
- return u.f;
+ GPBInternalCompileAssert(sizeof(float) == sizeof(int32_t), float_not_32_bits);
+ float result;
+ memcpy(&result, &v, sizeof(result));
+ return result;
}
GPB_INLINE int32_t GPBLogicalRightShift32(int32_t value, int32_t spaces) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/php/ext/google/protobuf/package.xml new/protobuf-3.9.2/php/ext/google/protobuf/package.xml
--- old/protobuf-3.9.1/php/ext/google/protobuf/package.xml 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/php/ext/google/protobuf/package.xml 2019-09-20 23:50:52.000000000 +0200
@@ -10,11 +10,11 @@
<email>protobuf-opensource(a)google.com</email>
<active>yes</active>
</lead>
- <date>2019-08-02</date>
- <time>15:59:08</time>
+ <date>2019-09-20</date>
+ <time>13:01:01</time>
<version>
- <release>3.9.1</release>
- <api>3.9.1</api>
+ <release>3.9.2</release>
+ <api>3.9.2</api>
</version>
<stability>
<release>stable</release>
@@ -389,5 +389,19 @@
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>GA release.</notes>
</release>
+ <release>
+ <version>
+ <release>3.9.2</release>
+ <api>3.9.2</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2019-09-20</date>
+ <time>13:01:01</time>
+ <license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
+ <notes>GA release.</notes>
+ </release>
</changelog>
</package>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/php/ext/google/protobuf/protobuf.h new/protobuf-3.9.2/php/ext/google/protobuf/protobuf.h
--- old/protobuf-3.9.1/php/ext/google/protobuf/protobuf.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/php/ext/google/protobuf/protobuf.h 2019-09-20 23:50:52.000000000 +0200
@@ -37,7 +37,7 @@
#include "upb.h"
#define PHP_PROTOBUF_EXTNAME "protobuf"
-#define PHP_PROTOBUF_VERSION "3.9.1"
+#define PHP_PROTOBUF_VERSION "3.9.2"
#define MAX_LENGTH_OF_INT64 20
#define SIZEOF_INT64 8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/protoc-artifacts/pom.xml new/protobuf-3.9.2/protoc-artifacts/pom.xml
--- old/protobuf-3.9.1/protoc-artifacts/pom.xml 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/protoc-artifacts/pom.xml 2019-09-20 23:50:52.000000000 +0200
@@ -8,7 +8,7 @@
</parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protoc</artifactId>
- <version>3.9.1</version>
+ <version>3.9.2</version>
<packaging>pom</packaging>
<name>Protobuf Compiler</name>
<description>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/python/google/protobuf/__init__.py new/protobuf-3.9.2/python/google/protobuf/__init__.py
--- old/protobuf-3.9.1/python/google/protobuf/__init__.py 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/python/google/protobuf/__init__.py 2019-09-20 23:50:52.000000000 +0200
@@ -30,7 +30,7 @@
# Copyright 2007 Google Inc. All Rights Reserved.
-__version__ = '3.9.1'
+__version__ = '3.9.2'
if __name__ != '__main__':
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/ruby/google-protobuf.gemspec new/protobuf-3.9.2/ruby/google-protobuf.gemspec
--- old/protobuf-3.9.1/ruby/google-protobuf.gemspec 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/ruby/google-protobuf.gemspec 2019-09-20 23:50:52.000000000 +0200
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "google-protobuf"
- s.version = "3.9.1"
+ s.version = "3.9.2"
s.licenses = ["BSD-3-Clause"]
s.summary = "Protocol Buffers"
s.description = "Protocol Buffers are Google's data interchange format."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/Makefile.am new/protobuf-3.9.2/src/Makefile.am
--- old/protobuf-3.9.1/src/Makefile.am 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/Makefile.am 2019-09-20 23:50:52.000000000 +0200
@@ -18,7 +18,7 @@
PTHREAD_DEF =
endif
-PROTOBUF_VERSION = 20:1:0
+PROTOBUF_VERSION = 20:2:0
if GCC
# Turn on all warnings except for sign comparison (we ignore sign comparison
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/any.pb.h new/protobuf-3.9.2/src/google/protobuf/any.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/any.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/any.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/api.pb.h new/protobuf-3.9.2/src/google/protobuf/api.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/api.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/api.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/compiler/plugin.pb.h new/protobuf-3.9.2/src/google/protobuf/compiler/plugin.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/compiler/plugin.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/compiler/plugin.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/descriptor.pb.h new/protobuf-3.9.2/src/google/protobuf/descriptor.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/descriptor.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/descriptor.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/duration.pb.h new/protobuf-3.9.2/src/google/protobuf/duration.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/duration.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/duration.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/empty.pb.h new/protobuf-3.9.2/src/google/protobuf/empty.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/empty.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/empty.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/field_mask.pb.h new/protobuf-3.9.2/src/google/protobuf/field_mask.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/field_mask.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/field_mask.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/port_def.inc new/protobuf-3.9.2/src/google/protobuf/port_def.inc
--- old/protobuf-3.9.1/src/google/protobuf/port_def.inc 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/port_def.inc 2019-09-20 23:50:52.000000000 +0200
@@ -285,7 +285,7 @@
// Shared google3/opensource definitions. //////////////////////////////////////
-#define PROTOBUF_VERSION 3009001
+#define PROTOBUF_VERSION 3009002
#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3009000
#define PROTOBUF_MIN_PROTOC_VERSION 3009000
#define PROTOBUF_VERSION_SUFFIX ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/source_context.pb.h new/protobuf-3.9.2/src/google/protobuf/source_context.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/source_context.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/source_context.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/struct.pb.h new/protobuf-3.9.2/src/google/protobuf/struct.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/struct.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/struct.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/stubs/common.h new/protobuf-3.9.2/src/google/protobuf/stubs/common.h
--- old/protobuf-3.9.1/src/google/protobuf/stubs/common.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/stubs/common.h 2019-09-20 23:50:52.000000000 +0200
@@ -81,7 +81,7 @@
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
-#define GOOGLE_PROTOBUF_VERSION 3009001
+#define GOOGLE_PROTOBUF_VERSION 3009002
// A suffix string for alpha, beta or rc releases. Empty for stable releases.
#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/timestamp.pb.h new/protobuf-3.9.2/src/google/protobuf/timestamp.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/timestamp.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/timestamp.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/type.pb.h new/protobuf-3.9.2/src/google/protobuf/type.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/type.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/type.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-3.9.1/src/google/protobuf/wrappers.pb.h new/protobuf-3.9.2/src/google/protobuf/wrappers.pb.h
--- old/protobuf-3.9.1/src/google/protobuf/wrappers.pb.h 2019-08-05 19:07:28.000000000 +0200
+++ new/protobuf-3.9.2/src/google/protobuf/wrappers.pb.h 2019-09-20 23:50:52.000000000 +0200
@@ -13,7 +13,7 @@
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
1
0
Hello community,
here is the log from the commit of package python-lxml for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-lxml (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-lxml.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-lxml"
Sun Mar 1 08:50:50 2020 rev:22 rq:778835 version:4.4.2
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-lxml/python-lxml.changes 2020-01-15 15:49:57.299477935 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-lxml.new.26092/python-lxml.changes 2020-03-01 08:50:51.725212165 +0100
@@ -1,0 +2,178 @@
+Wed Jan 22 13:55:03 UTC 2020 - Martin Sirringhaus <martin.sirringhaus(a)suse.com>
+
+- Update to 4.4.2:
+ * LP#1835708: ElementInclude incorrectly rejected repeated
+ non-recursive includes as recursive.
+ * Remove patch lxml-libxml-2.9.10.patch which is now upstream
+
+-------------------------------------------------------------------
+Sun Nov 17 14:25:04 UTC 2019 - Dominique Leuenberger <dimstar(a)opensuse.org>
+
+- Add lxml-libxml-2.9.10.patch: Fix build against libxml 2.9.10.
+
+-------------------------------------------------------------------
+Wed Sep 11 12:48:12 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 4.4.1:
+ * LP#1838252: The order of an OrderedDict was lost in 4.4.0 when passing it as attrib mapping during element creation.
+ * LP#1838521: The package metadata now lists the supported Python versions.
+
+-------------------------------------------------------------------
+Thu Aug 1 13:13:57 UTC 2019 - pgajdos(a)suse.com
+
+- version update to 4.4.0
+ * ``Element.clear()`` accepts a new keyword argument ``keep_tail=True`` to
+ clear everything but the tail text. This is helpful in some document-style
+ use cases.
+ * When creating attributes or namespaces from a dict in Python 3.6+, lxml now
+ preserves the original insertion order of that dict, instead of always sorting
+ the items by name. A similar change was made for ElementTree in CPython 3.8.
+ See https://bugs.python.org/issue34160
+ * Integer elements in ``lxml.objectify`` implement the ``__index__()`` special method.
+ * GH#269: Read-only elements in XSLT were missing the ``nsmap`` property.
+ Original patch by Jan Pazdziora.
+ * ElementInclude can now restrict the maximum inclusion depth via a ``max_depth``
+ argument to prevent content explosion. It is limited to 6 by default.
+ * The ``target`` object of the XMLParser can have ``start_ns()`` and ``end_ns()``
+ callback methods to listen to namespace declarations.
+ * The ``TreeBuilder`` has new arguments ``comment_factory`` and ``pi_factory`` to
+ pass factories for creating comments and processing instructions, as well as
+ flag arguments ``insert_comments`` and ``insert_pis`` to discard them from the
+ tree when set to false.
+ * A `C14N 2.0 <https://www.w3.org/TR/xml-c14n2/>`_ implementation was added as
+ ``etree.canonicalize()``, a corresponding ``C14NWriterTarget`` class, and
+ a ``c14n2`` serialisation method.
+ * bugfixes, see CHANGES.txt
+- deleted sources
+ - lxmldoc-4.3.3.pdf (renamed)
+- added sources
+ + lxmldoc-4.4.0.pdf
+ + world.txt
+
+-------------------------------------------------------------------
+Mon Jul 22 16:49:22 UTC 2019 - Todd R <toddrme2178(a)gmail.com>
+
+- Update to 4.3.4
+ * Rebuilt with Cython 0.29.10 to support Python 3.8.
+ Note: documentation is not updated
+
+-------------------------------------------------------------------
+Tue Jul 2 15:03:15 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Remove generated files
+
+-------------------------------------------------------------------
+Fri Apr 5 12:10:42 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 4.3.3:
+ * Fix leak of output buffer and unclosed files in ``_XSLTResultTree.write_output()``.
+
+-------------------------------------------------------------------
+Tue Mar 5 11:27:57 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 4.3.2:
+ * Crash in 4.3.1 when appending a child subtree with certain text nodes.
+
+-------------------------------------------------------------------
+Thu Feb 14 07:33:12 UTC 2019 - John Vandenberg <jayvdb(a)gmail.com>
+
+- Update to v4.3.1
+ * Fixed crash when appending a child subtree that contains unsubstituted
+ entity references
+- from v4.3.0
+ * Features
+ + The module ``lxml.sax`` is compiled using Cython in order to speed it up.
+ + lxml.sax.ElementTreeProducer now preserves the namespace prefixes.
+ If two prefixes point to the same URI, the first prefix in alphabetical
+ order is used.
+ + Updated ISO-Schematron implementation to 2013 version (now MIT licensed)
+ and the corresponding schema to the 2016 version (with optional "properties").
+ * Other
+ + Support for Python 2.6 and 3.3 was removed.
+ + The minimum dependency versions were raised to libxml2 2.9.2 and libxslt 1.1.27,
+ which were released in 2014 and 2012 respectively.
+- from v4.2.6
+ * Fix a DeprecationWarning in Py3.7+.
+ * Import warnings in Python 3.6+ were resolved.
+- Remove no longer needed
+ 0001-Make-test-more-resilient-against-changes-in-latest-l.patch
+
+-------------------------------------------------------------------
+Tue Dec 4 12:50:12 UTC 2018 - Matej Cepl <mcepl(a)suse.com>
+
+- Remove superfluous devel dependency for noarch package
+
+-------------------------------------------------------------------
+Fri Nov 16 18:54:26 UTC 2018 - Todd R <toddrme2178(a)gmail.com>
+
+- Update to 4.2.5
+ * Javascript URLs that used URL escaping were not removed by the HTML cleaner.
+ Security problem found by Omar Eissa.
+
+-------------------------------------------------------------------
+Mon Sep 3 14:34:43 UTC 2018 - comurphy(a)suse.com
+
+- Fix threading tests patch for 42.3
+ * Add 0001-Make-test-more-resilient-against-changes-in-latest-l.patch
+ * Remove python-lxml-assert.patch
+
+-------------------------------------------------------------------
+Tue Aug 7 15:34:31 UTC 2018 - toddrme2178(a)gmail.com
+
+- Update to 4.2.4 (2018-08-03)
+ + Features added
+ * GH#259: Allow using ``pkg-config`` for build configuration.
+ Patch by Patrick Griffis.
+ + Bugs fixed
+ * LP#1773749, GH#268: Crash when moving an element to another document with
+ ``Element.insert()``.
+ Patch by Alexander Weggerle.
+- Update to 4.2.3
+ + Bugs fixed
+ * Reverted GH#265: lxml links against zlib as a shared library again.
+- Update to 4.2.2
+ + Bugs fixed
+ * GH#266: Fix sporadic crash during GC when parse-time schema validation is used
+ and the parser participates in a reference cycle.
+ Original patch by Julien Greard.
+ * GH#265: lxml no longer links against zlib as a shared library, only on static builds.
+ Patch by Nehal J Wani.
+
+-------------------------------------------------------------------
+Wed Mar 28 17:05:30 UTC 2018 - hpj(a)urpla.net
+
+- Version update to 4.2.1:
+ * LP#1755825: iterwalk() failed to return the 'start' event for the initial
+ element if a tag selector is used.
+ * LP#1756314: Failure to import 4.2.0 into PyPy due to a missing library symbol.
+ * LP#1727864, GH#258: Add "-isysroot" linker option on MacOS as needed by XCode 9.
+
+-------------------------------------------------------------------
+Mon Mar 19 13:01:20 UTC 2018 - tchvatal(a)suse.com
+
+- Version update to 4.2.0:
+ * GH#255: ``SelectElement.value`` returns more standard-compliant and
+ browser-like defaults for non-multi-selects. If no option is selected, the
+ value of the first option is returned (instead of None). If multiple options
+ are selected, the value of the last one is returned (instead of that of the
+ first one). If no options are present (not standard-compliant)
+ ``SelectElement.value`` still returns ``None``.
+ * GH#261: The ``HTMLParser()`` now supports the ``huge_tree`` option.
+ Patch by stranac.
+ * LP#1551797: Some XSLT messages were not captured by the transform error log.
+ * LP#1737825: Crash at shutdown after an interrupted iterparse run with XMLSchema
+ validation.
+- Add patch python-lxml-assert.patch to pass test fail on threading
+
+-------------------------------------------------------------------
+Thu Feb 8 12:34:33 UTC 2018 - mimi.vx(a)gmail.com
+
+- update to 4.1.1
+ - ElementPath supports text predicates for current node, like "[.='text']".
+ - ElementPath allows spaces in predicates.
+ - Custom Element classes and XPath functions can now be registered with
+ a decorator rather than explicit dict assignments.
+ - LP#1722776: Requesting non-Element objects like comments from
+ a document with PythonElementClassLookup could fail with a TypeError.
+
+-------------------------------------------------------------------
Old:
----
lxml-4.0.0.tar.gz
lxmldoc-4.0.0.pdf
New:
----
lxml-4.4.2.tar.gz
lxmldoc-4.4.2.pdf
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-lxml.spec ++++++
--- /var/tmp/diff_new_pack.Woa6eR/_old 2020-03-01 08:50:52.381213470 +0100
+++ /var/tmp/diff_new_pack.Woa6eR/_new 2020-03-01 08:50:52.385213478 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-lxml
#
-# Copyright (c) 2017 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
@@ -12,32 +12,28 @@
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-lxml
-Version: 4.0.0
+Version: 4.4.2
Release: 0
Summary: Pythonic XML processing library
-License: BSD-3-Clause and GPL-2.0+
+License: BSD-3-Clause AND GPL-2.0-or-later
Group: Development/Languages/Python
-Url: https://lxml.de/
-Source: https://files.pythonhosted.org/packages/source/l/lxml/lxml-%{version}.tar.gz
-Source1: http://lxml.de/lxmldoc-%{version}.pdf
-BuildRequires: %{python_module Cython >= 0.22.1}
-BuildRequires: %{python_module devel}
+URL: https://lxml.de/
+Source0: https://files.pythonhosted.org/packages/source/l/lxml/lxml-%{version}.tar.gz
+Source1: https://lxml.de/lxmldoc-%{version}.pdf
+BuildRequires: %{python_module Cython >= 0.29.7}
+BuildRequires: %{python_module cssselect >= 0.9.1}
BuildRequires: %{python_module setuptools >= 18.0.1}
BuildRequires: fdupes
BuildRequires: libxml2-devel >= 2.7.0
BuildRequires: libxslt-devel >= 1.1.23
BuildRequires: python-rpm-macros
-# Needed for test cases:
-BuildRequires: %{python_module cssselect >= 0.9.1}
Requires: python-cssselect >= 0.9.1
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-
%python_subpackages
%description
@@ -46,12 +42,13 @@
API. It extends the ElementTree API significantly to offer support for XPath,
RelaxNG, XML Schema, XSLT and C14N.
-%package doc
+%package -n %{name}-doc
Summary: Documentation for python-lxml, an XML processing library
-Group: Documentation/HTML
+Group: Documentation/Other
+Provides: %{python_module doc = %{version}}
BuildArch: noarch
-%description doc
+%description -n %{name}-doc
lxml is a Pythonic binding for the libxml2 and libxslt libraries. It
provides convenient access to these libraries using the ElementTree
API. It extends the ElementTree API significantly to offer support for XPath,
@@ -77,26 +74,24 @@
cp %{SOURCE1} .
# remove generated files
-# rm src/lxml/lxml.etree.c
+find -name '*.c' -delete -print
rm src/lxml/lxml.etree.h
rm src/lxml/lxml.etree_api.h
-# rm src/lxml/lxml.objectify.c
%build
export CFLAGS="%{optflags}"
%python_build --with-cython
%check
-# The tests fail on SLE 11 due to broken incremental parsing
-# in libxml2
+# The tests fail on SLE 11 due to broken incremental parsing in libxml2
export CFLAGS="%{optflags}"
export LANG=en_US.UTF-8
export PYTHONUNBUFFERED=x
%if 0%{?have_python2}
-make test
+make %{?_smp_mflags} test
%endif
%if 0%{?have_python3}
-make test3
+make %{?_smp_mflags} test3
%endif
%install
@@ -104,20 +99,21 @@
%fdupes %{buildroot}
%files %{python_files}
-%defattr(-,root,root)
-%doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst
+%license LICENSES.txt
+%doc CHANGES.txt CREDITS.txt README.rst
%{python_sitearch}/lxml/
%{python_sitearch}/lxml-%{version}-py%{python_version}.egg-info
%exclude %{python_sitearch}/lxml/*.h
%exclude %{python_sitearch}/lxml/includes/*.h
%files %{python_files devel}
-%defattr(-,root,root)
+%license LICENSES.txt
%{python_sitearch}/lxml/*.h
%{python_sitearch}/lxml/includes/*.h
-%files %{python_files doc}
-%defattr(-,root,root)
-%doc doc/html lxmldoc-%{version}.pdf
+%files -n %{name}-doc
+%license LICENSES.txt
+%doc doc/html
+%doc lxmldoc-*.pdf
%changelog
++++++ lxml-4.0.0.tar.gz -> lxml-4.4.2.tar.gz ++++++
++++ 629992 lines of diff (skipped)
++++++ lxmldoc-4.0.0.pdf -> lxmldoc-4.4.2.pdf ++++++
(binary differes)
1
0
Hello community,
here is the log from the commit of package python-scipy for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-scipy (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-scipy.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-scipy"
Sun Mar 1 08:50:48 2020 rev:15 rq:778831 version:1.3.3
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-scipy/python-scipy.changes 2020-02-04 17:54:14.288742701 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-scipy.new.26092/python-scipy.changes 2020-03-01 08:50:49.265207271 +0100
@@ -1,0 +2,5 @@
+Thu Jan 30 10:58:29 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Fix _ver macro (bsc#1162091)
+
+-------------------------------------------------------------------
@@ -4 +9 @@
-- Update to the scipy 1.3.3 (jsc#SLE-8493):
+- Update to the scipy 1.3.3 (jsc#SLE-8493, bsc#1149203):
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-scipy.spec ++++++
--- /var/tmp/diff_new_pack.QUFsyM/_old 2020-03-01 08:50:49.981208696 +0100
+++ /var/tmp/diff_new_pack.QUFsyM/_new 2020-03-01 08:50:49.985208704 +0100
@@ -19,7 +19,7 @@
%global flavor @BUILD_FLAVOR@%{nil}
%define skip_python2 1
-%define _ver 1_2_0
+%define _ver 1_3_3
%define shortname scipy
%define pname python-%{shortname}
1
0
Hello community,
here is the log from the commit of package python-click for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-click (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-click.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-click"
Sun Mar 1 08:50:46 2020 rev:17 rq:778154 version:7.0
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-click/python-click.changes 2020-01-15 15:47:53.375407086 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-click.new.26092/python-click.changes 2020-03-01 08:50:47.289203341 +0100
@@ -1,0 +2,157 @@
+Mon Oct 14 11:43:49 UTC 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Replace %fdupes -s with plain %fdupes; hardlinks are better.
+
+-------------------------------------------------------------------
+Sat Dec 22 16:12:12 UTC 2018 - marec(a)detebe.org
+
+- update to version 7.0:
+ * Drop support for Python 2.6 and 3.3.
+ * Wrap ``click.Choice``'s missing message.
+ * Add native ZSH autocompletion support.
+ * Document that ANSI color info isn't parsed from bytearrays in
+ Python 2.
+ * Document byte-stripping behavior of ``CliRunner``.
+ * Usage errors now hint at the ``--help`` option.
+ * Implement streaming pager.
+ * Extract bar formatting to its own method.
+ * Add ``DateTime`` type for converting input in given date time
+ formats.
+ * ``secho``'s first argument can now be ``None``, like in ``echo``.
+
+ * Fixes a ``ZeroDivisionError`` in ``ProgressBar.make_step``, when the
+ arg passed to the first call of ``ProgressBar.update`` is 0.
+
+ * Show progressbar only if total execution time is visible.
+ * Added the ability to hide commands and options from help.
+ * Document that options can be ``required=True``.
+ * Non-standalone calls to ``Context.exit`` return the exit code,
+ rather than calling ``sys.exit``.
+ * ``click.getchar()`` returns Unicode in Python 3 on Windows,
+ consistent with other platforms.
+ * Added ``FloatRange`` type.
+ * Added support for bash completion of ``type=click.Choice`` for
+ ``Options`` and ``Arguments``.
+ * Only allow one positional arg for ``Argument`` parameter
+ declaration.
+ * Add ``case_sensitive=False`` as an option to Choice.
+ * ``click.getchar()`` correctly raises ``KeyboardInterrupt`` on "^C"
+ and ``EOFError`` on "^D" on Linux.
+ * Fix encoding issue with ``click.getchar(echo=True)`` on Linux.
+
+ * ``param_hint`` in errors now derived from param itself.
+ * Add a test that ensures that when an argument is formatted into a
+ usage error, its metavar is used, not its name.
+ * Allow setting ``prog_name`` as extra in ``CliRunner.invoke``.
+
+ * Help text taken from docstrings truncates at the ``\f`` form feed
+ character, useful for hiding Sphinx-style parameter documentation.
+
+ * ``launch`` now works properly under Cygwin.
+ * Update progress after iteration.
+ * ``CliRunner.invoke`` now may receive ``args`` as a string
+ representing a Unix shell command.
+ * Make ``Argument.make_metavar()`` default to type metavar.
+ * Add documentation for ``ignore_unknown_options``.
+ * Add bright colors support for ``click.style`` and fix the reset
+ option for parameters ``fg`` and ``bg``.
+ * Add ``show_envvar`` for showing environment variables in help.
+
+ * Avoid ``BrokenPipeError`` during interpreter shutdown when stdout or
+ stderr is a closed pipe.
+ * Document customizing option names.
+ * Disable ``sys._getframes()`` on Python interpreters that don't
+ support it.
+ * Fix bug in test runner when calling ``sys.exit`` with ``None``.
+
+ * Clarify documentation on command line options.
+ * Fix crash on Windows console.
+ * Fix bug that caused bash completion to give improper completions on
+ chained commands.
+ * Added support for dynamic bash completion from a user-supplied
+ callback.
+ * Added support for bash completions containing spaces.
+ * Allow autocompletion function to determine whether or not to return
+ completions that start with the incomplete argument.
+ * Fix option naming routine to match documentation and be
+ deterministic.
+ * Fix path validation bug.
+ * Add test and documentation for ``Option`` naming: functionality.
+
+ * Update doc to match arg name for ``path_type``.
+ * Raw strings added so correct escaping occurs.
+ * Fix 16k character limit of ``click.echo`` on Windows.
+ * Overcome 64k character limit when writing to binary stream on
+ Windows 7.
+ * Add bool conversion for "t" and "f".
+ * ``NoSuchOption`` errors take ``ctx`` so that ``--help`` hint gets
+ printed in error output.
+ * Fixed the behavior of Click error messages with regards to Unicode
+ on 2.x and 3.x. Message is now always Unicode and the str and
+ Unicode special methods work as you expect on that platform.
+
+ * Progress bar now uses stderr by default.
+ * Add support for auto-completion documentation.
+ * Allow ``CliRunner`` to separate stdout and stderr.
+ * Fix variable precedence.
+ * Fix invalid escape sequences.
+ * Fix ``ResourceWarning`` that occurs during some tests.
+ * When detecting a misconfigured locale, don't fail if the ``locale``
+ command fails.
+ * Add ``case_sensitive=False`` as an option to ``Choice`` types.
+
+ * Force stdout/stderr writable. This works around issues with badly
+ patched standard streams like those from Jupyter.
+ * Fix completion of subcommand options after last argument
+ * ``_AtomicFile`` now uses the ``realpath`` of the original filename
+ so that changing the working directory does not affect it.
+
+ * Fix incorrect completions when defaults are present
+ * Add copy option attrs so that custom classes can be re-used.
+
+ * "x" and "a" file modes now use stdout when file is ``"-"``.
+
+ * Fix missing comma in ``__all__`` list.
+ * Clarify how parameters are named.
+ * Stdout is now automatically set to non blocking.
+ * Do not set options twice.
+ * Move ``fcntl`` import.
+ * Fix Google App Engine ``ImportError``.
+ * Better handling of help text for dynamic default option values.
+
+ * Fix ``get_winter_size()`` so it correctly returns ``(0,0)``.
+
+ * Add test case checking for custom param type.
+ * Allow short width to address cmd formatting.
+ * Add details about Python version support.
+ * Added deprecation flag to commands.
+ * Fixed issues where ``fd`` was undefined.
+ * Fix formatting for short help.
+ * Document how ``auto_envvar_prefix`` works with command groups.
+
+ * Don't add newlines by default for progress bars.
+ * Use Python sorting order for ZSH completions.
+ * Document that parameter names are converted to lowercase by default.
+
+ * Subcommands that are named by the function now automatically have
+ the underscore replaced with a dash. If you register a function
+ named ``my_command`` it becomes ``my-command`` in the command line
+ interface.
+ * Hide hidden commands and options from completion.
+ * Fix absolute import blocking Click from being vendored into a
+ project on Windows.
+ * Fix issue where a lowercase ``auto_envvar_prefix`` would not be
+ converted to uppercase.
+- Drop patch merged upstream python-click-test_compat.py.patch
+
+-------------------------------------------------------------------
+Wed Dec 5 01:18:27 UTC 2018 - Jan Engelhardt <jengelh(a)inai.de>
+
+- Trim bias and future aims from description.
+
+-------------------------------------------------------------------
+Tue Dec 4 12:46:39 UTC 2018 - Matej Cepl <mcepl(a)suse.com>
+
+- Remove superfluous devel dependency for noarch package
+
+-------------------------------------------------------------------
Old:
----
click-6.7.tar.gz
python-click-test_compat.py.patch
New:
----
Click-7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-click.spec ++++++
--- /var/tmp/diff_new_pack.6MHT1k/_old 2020-03-01 08:50:47.593203945 +0100
+++ /var/tmp/diff_new_pack.6MHT1k/_new 2020-03-01 08:50:47.593203945 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-click
#
-# Copyright (c) 2017 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,22 +12,19 @@
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-click
-Version: 6.7
+Version: 7.0
Release: 0
-Summary: A simple wrapper around optparse for powerful command line utilities
+Summary: A wrapper around optparse for command line utilities
License: BSD-3-Clause
Group: Development/Languages/Python
-Url: http://github.com/mitsuhiko/click
-Source: https://files.pythonhosted.org/packages/source/c/click/click-%{version}.tar…
-# PATCH-FIX-OPENSUSE python-click-test_compat.py.patch -- disable a test to make it build
-Patch0: %{name}-test_compat.py.patch
-BuildRequires: %{python_module devel}
+URL: https://github.com/mitsuhiko/click
+Source: https://files.pythonhosted.org/packages/source/C/Click/Click-%{version}.tar…
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -36,34 +33,29 @@
%python_subpackages
%description
-Click is a Python package for creating beautiful command line interfaces
+Click is a Python package for creating command line interfaces
in a composable way with as little code as necessary. It's the "Command
-Line Interface Creation Kit". It's highly configurable but comes with
-sensible defaults out of the box.
-
-It aims to make the process of writing command line tools quick and fun
-while also preventing any frustration caused by the inability to implement
-an intended CLI API.
+Line Interface Creation Kit". It is configurable, and comes with
+defaults out of the box.
%prep
-%setup -q -n click-%{version}
-%patch0 -p1
+%setup -q -n Click-%{version}
%build
%python_build
%install
%python_install
-%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
%{python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m pytest --tb=short}
%files %{python_files}
-%defattr(-,root,root,-)
-%doc CHANGES LICENSE README
+%license LICENSE.rst
+%doc CHANGES.rst README.rst
%{python_sitelib}/click
-%{python_sitelib}/click-%{version}-py%{python_version}.egg-info
+%{python_sitelib}/Click-%{version}-py%{python_version}.egg-info
%changelog
1
0
Hello community,
here is the log from the commit of package python-reportlab for openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-reportlab (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-reportlab.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-reportlab"
Sun Mar 1 08:50:44 2020 rev:12 rq:769215 version:3.4.0
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-reportlab/python-reportlab.changes 2020-01-15 15:52:37.947570016 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-reportlab.new.26092/python-reportlab.changes 2020-03-01 08:50:45.469199720 +0100
@@ -1,0 +2,9 @@
+Wed Jan 22 17:10:15 CET 2020 - Matej Cepl <mcepl(a)suse.com>
+
+- Add make_toColor_safe.patch fixing bsc#1154370 (CVE-2019-17626)
+ restrict reportlab.lib.color.toColor to protect against unsafe
+ input.
+- Rebase other patches: drop-requirements.patch and
+ reportlab-missing-includes.patch
+
+-------------------------------------------------------------------
New:
----
make_toColor_safe.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-reportlab.spec ++++++
--- /var/tmp/diff_new_pack.lkigA1/_old 2020-03-01 08:50:46.041200859 +0100
+++ /var/tmp/diff_new_pack.lkigA1/_new 2020-03-01 08:50:46.041200859 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-reportlab
#
-# Copyright (c) 2017 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
@@ -12,26 +12,27 @@
# 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/
#
-%bcond_without tests
-
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
+%bcond_without tests
Name: python-reportlab
Version: 3.4.0
Release: 0
-Url: http://www.reportlab.com/
Summary: The Reportlab Toolkit
License: BSD-3-Clause
Group: Development/Languages/Python
+URL: https://www.reportlab.com/
Source: https://files.pythonhosted.org/packages/source/r/reportlab/reportlab-%{vers…
Patch0: reportlab-missing-includes.patch
# PATCH-FIX-UPSTREAM drop unneeded requirements https://bitbucket.org/rptlab/reportlab/issues/113
Patch1: drop-requirements.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+# PATCH-FIX-UPSTREAM} make_toColor_safe.patch bsc#1154370 mcepl(a)suse.com
+# make toColor function safer, CVE-2019-17626
+Patch2: make_toColor_safe.patch
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
@@ -55,8 +56,8 @@
%prep
%setup -q -n reportlab-%{version}
-%patch0
-%patch1 -p1
+%autopatch -p1
+
sed -i "1d" src/reportlab/lib/{formatters,fonts,corp,units,pagesizes,__init__,randomtext,logger,normalDate}.py
sed -i "1d" src/reportlab/graphics/{widgets/table,barcode/test,testdrawings,testshapes}.py # Fix non-executable bits
@@ -75,8 +76,7 @@
%endif
%files %{python_files}
-%defattr(-,root,root,-)
-%doc LICENSE.txt
+%license LICENSE.txt
%doc CHANGES.md README.txt
%{python_sitearch}/reportlab/
%{python_sitearch}/reportlab-%{version}-py*.egg-info
++++++ drop-requirements.patch ++++++
--- /var/tmp/diff_new_pack.lkigA1/_old 2020-03-01 08:50:46.057200890 +0100
+++ /var/tmp/diff_new_pack.lkigA1/_new 2020-03-01 08:50:46.061200898 +0100
@@ -1,7 +1,5 @@
-Index: reportlab-3.4.0/setup.py
-===================================================================
---- reportlab-3.4.0.orig/setup.py
-+++ reportlab-3.4.0/setup.py
+--- a/setup.py
++++ b/setup.py
@@ -539,7 +539,7 @@ def main():
],
++++++ make_toColor_safe.patch ++++++
++++ 1841 lines (skipped)
++++++ reportlab-missing-includes.patch ++++++
--- /var/tmp/diff_new_pack.lkigA1/_old 2020-03-01 08:50:46.077200930 +0100
+++ /var/tmp/diff_new_pack.lkigA1/_new 2020-03-01 08:50:46.081200938 +0100
@@ -1,7 +1,5 @@
-Index: src/rl_addons/renderPM/gt1/gt1-namecontext.c
-===================================================================
---- src/rl_addons/renderPM/gt1/gt1-namecontext.c.orig
-+++ src/rl_addons/renderPM/gt1/gt1-namecontext.c
+--- a/src/rl_addons/renderPM/gt1/gt1-namecontext.c
++++ b/src/rl_addons/renderPM/gt1/gt1-namecontext.c
@@ -1,6 +1,10 @@
/* A module for a simple "name context", i.e. lisp-style atoms */
1
0