openSUSE Commits
Threads by month
- ----- 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
September 2019
- 1 participants
- 2151 discussions
Hello community,
here is the log from the commit of package python-Jinja2 for openSUSE:Factory checked in at 2019-09-30 15:55:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Jinja2 (Old)
and /work/SRC/openSUSE:Factory/.python-Jinja2.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Jinja2"
Mon Sep 30 15:55:31 2019 rev:36 rq:732915 version:2.10.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Jinja2/python-Jinja2.changes 2019-05-05 21:19:29.232961373 +0200
+++ /work/SRC/openSUSE:Factory/.python-Jinja2.new.2352/python-Jinja2.changes 2019-09-30 15:55:34.285827790 +0200
@@ -1,0 +2,6 @@
+Tue Sep 24 11:06:41 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add patch to work with python 3.8:
+ * python38.patch
+
+-------------------------------------------------------------------
New:
----
python38.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Jinja2.spec ++++++
--- /var/tmp/diff_new_pack.vZ5m9N/_old 2019-09-30 15:55:37.137820200 +0200
+++ /var/tmp/diff_new_pack.vZ5m9N/_new 2019-09-30 15:55:37.141820190 +0200
@@ -26,6 +26,7 @@
Group: Development/Languages/Python
URL: http://jinja.pocoo.org/
Source: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.t…
+Patch0: python38.patch
BuildRequires: %{python_module MarkupSafe >= 0.23}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
@@ -81,18 +82,17 @@
%prep
%setup -q -n Jinja2-%{version}
+%patch0 -p1
+sed -i 's/\r$//' LICENSE # Fix wrong EOL encoding
%build
%python_build
-sed -i 's/\r$//' LICENSE # Fix wrong EOL encoding
%install
%python_install
install -Dm644 ext/Vim/jinja.vim %{buildroot}%{_datadir}/vim/site/syntax/jinja.vim # Install VIM syntax file
install -Dm644 ext/jinja.el %{buildroot}%{_datadir}/emacs/site-lisp/jinja.el # Install Emacs syntax file
-%if 0%{?suse_version}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%endif
%check
%pytest
++++++ python38.patch ++++++
>From 31bf9b7e71c3fee3b7866ffdc0f70f4525a490d9 Mon Sep 17 00:00:00 2001
From: Florian Bruhin <git(a)the-compiler.org>
Date: Wed, 27 Jun 2018 15:30:54 +0200
Subject: [PATCH] Import abstract base classes from collections.abc
In Python 3.7, importing ABCs directly from the `collections` module shows a
warning (and in Python 3.8 it will stop working) - see
https://github.com/python/cpython/commit/c66f9f8d3909f588c251957d499599a168…
This fixes various DeprecationWarnings such as those:
```
.../jinja2/utils.py:485: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import MutableMapping
.../jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Mapping
```
---
docs/jinjaext.py | 4 ++--
jinja2/_compat.py | 6 ++++++
jinja2/runtime.py | 9 ++-------
jinja2/sandbox.py | 12 +++++-------
jinja2/tests.py | 5 ++---
jinja2/utils.py | 9 ++-------
6 files changed, 19 insertions(+), 26 deletions(-)
diff --git a/docs/jinjaext.py b/docs/jinjaext.py
index bb508089..fd38ee8f 100644
--- a/docs/jinjaext.py
+++ b/docs/jinjaext.py
@@ -8,7 +8,6 @@
:copyright: Copyright 2008 by Armin Ronacher.
:license: BSD.
"""
-import collections
import os
import re
import inspect
@@ -26,6 +25,7 @@
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic
from jinja2 import Environment, FileSystemLoader
+from jinja2._compat import abc
def parse_rst(state, content_offset, doc):
@@ -160,7 +160,7 @@ def walk(node, indent):
members = []
for key, name in node.__dict__.items():
if not key.startswith('_') and \
- not hasattr(node.__base__, key) and isinstance(name, collections.Callable):
+ not hasattr(node.__base__, key) and isinstance(name, abc.Callable):
members.append(key)
if members:
members.sort()
diff --git a/jinja2/_compat.py b/jinja2/_compat.py
index 61d85301..4dbf6ea0 100644
--- a/jinja2/_compat.py
+++ b/jinja2/_compat.py
@@ -97,3 +97,9 @@ def __new__(cls, name, this_bases, d):
from urllib.parse import quote_from_bytes as url_quote
except ImportError:
from urllib import quote as url_quote
+
+
+try:
+ from collections import abc
+except ImportError:
+ import collections as abc
diff --git a/jinja2/runtime.py b/jinja2/runtime.py
index f9d7a680..5e313369 100644
--- a/jinja2/runtime.py
+++ b/jinja2/runtime.py
@@ -20,7 +20,7 @@
TemplateNotFound
from jinja2._compat import imap, text_type, iteritems, \
implements_iterator, implements_to_string, string_types, PY2, \
- with_metaclass
+ with_metaclass, abc
# these variables are exported to the template runtime
@@ -313,12 +313,7 @@ def __repr__(self):
)
-# register the context as mapping if possible
-try:
- from collections import Mapping
- Mapping.register(Context)
-except ImportError:
- pass
+abc.Mapping.register(Context)
class BlockReference(object):
diff --git a/jinja2/sandbox.py b/jinja2/sandbox.py
index 03aaebd2..8015ee0c 100644
--- a/jinja2/sandbox.py
+++ b/jinja2/sandbox.py
@@ -14,10 +14,9 @@
"""
import types
import operator
-from collections import Mapping
from jinja2.environment import Environment
from jinja2.exceptions import SecurityError
-from jinja2._compat import string_types, PY2
+from jinja2._compat import string_types, PY2, abc
from jinja2.utils import Markup
from markupsafe import EscapeFormatter
@@ -79,10 +78,9 @@
pass
#: register Python 2.6 abstract base classes
-from collections import MutableSet, MutableMapping, MutableSequence
-_mutable_set_types += (MutableSet,)
-_mutable_mapping_types += (MutableMapping,)
-_mutable_sequence_types += (MutableSequence,)
+_mutable_set_types += (abc.MutableSet,)
+_mutable_mapping_types += (abc.MutableMapping,)
+_mutable_sequence_types += (abc.MutableSequence,)
_mutable_spec = (
@@ -103,7 +101,7 @@
)
-class _MagicFormatMapping(Mapping):
+class _MagicFormatMapping(abc.Mapping):
"""This class implements a dummy wrapper to fix a bug in the Python
standard library for string formatting.
diff --git a/jinja2/tests.py b/jinja2/tests.py
index 0adc3d4d..bc99d66c 100644
--- a/jinja2/tests.py
+++ b/jinja2/tests.py
@@ -10,9 +10,8 @@
"""
import operator
import re
-from collections import Mapping
from jinja2.runtime import Undefined
-from jinja2._compat import text_type, string_types, integer_types
+from jinja2._compat import text_type, string_types, integer_types, abc
import decimal
number_re = re.compile(r'^-?\d+(\.\d+)?$')
@@ -84,7 +83,7 @@ def test_mapping(value):
.. versionadded:: 2.6
"""
- return isinstance(value, Mapping)
+ return isinstance(value, abc.Mapping)
def test_number(value):
diff --git a/jinja2/utils.py b/jinja2/utils.py
index 083ea274..538b7745 100644
--- a/jinja2/utils.py
+++ b/jinja2/utils.py
@@ -14,7 +14,7 @@
from collections import deque
from threading import Lock
from jinja2._compat import text_type, string_types, implements_iterator, \
- url_quote
+ url_quote, abc
_word_split_re = re.compile(r'(\s+)')
@@ -480,12 +480,7 @@ def __reversed__(self):
__copy__ = copy
-# register the LRU cache as mutable mapping if possible
-try:
- from collections import MutableMapping
- MutableMapping.register(LRUCache)
-except ImportError:
- pass
+abc.MutableMapping.register(LRUCache)
def select_autoescape(enabled_extensions=('html', 'htm', 'xml'),
1
0
Hello community,
here is the log from the commit of package python-Werkzeug for openSUSE:Factory checked in at 2019-09-30 15:55:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Werkzeug (Old)
and /work/SRC/openSUSE:Factory/.python-Werkzeug.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Werkzeug"
Mon Sep 30 15:55:23 2019 rev:27 rq:732906 version:0.16.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Werkzeug/python-Werkzeug.changes 2019-09-23 12:16:54.721811646 +0200
+++ /work/SRC/openSUSE:Factory/.python-Werkzeug.new.2352/python-Werkzeug.changes 2019-09-30 15:55:26.865847536 +0200
@@ -1,0 +2,9 @@
+Tue Sep 24 10:15:31 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 0.16.0:
+ * Deprecate most top-level attributes provided by the werkzeug
+ module in favor of direct imports. The deprecated imports will
+ be removed in version 1.0.
+- Rebase patch 0001_create_a_thread_to_reap_death_process.patch
+
+-------------------------------------------------------------------
Old:
----
Werkzeug-0.15.6.tar.gz
New:
----
Werkzeug-0.16.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Werkzeug.spec ++++++
--- /var/tmp/diff_new_pack.skBCeC/_old 2019-09-30 15:55:27.605845567 +0200
+++ /var/tmp/diff_new_pack.skBCeC/_new 2019-09-30 15:55:27.609845557 +0200
@@ -19,7 +19,7 @@
%define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-Werkzeug
-Version: 0.15.6
+Version: 0.16.0
Release: 0
Summary: The Swiss Army knife of Python web development
License: BSD-3-Clause
++++++ 0001_create_a_thread_to_reap_death_process.patch ++++++
--- /var/tmp/diff_new_pack.skBCeC/_old 2019-09-30 15:55:27.621845525 +0200
+++ /var/tmp/diff_new_pack.skBCeC/_new 2019-09-30 15:55:27.621845525 +0200
@@ -19,19 +19,19 @@
werkzeug/serving.py | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
-Index: Werkzeug-0.15.4/src/werkzeug/serving.py
+Index: Werkzeug-0.16.0/src/werkzeug/serving.py
===================================================================
---- Werkzeug-0.15.4.orig/src/werkzeug/serving.py
-+++ Werkzeug-0.15.4/src/werkzeug/serving.py
-@@ -41,6 +41,7 @@ import signal
+--- Werkzeug-0.16.0.orig/src/werkzeug/serving.py
++++ Werkzeug-0.16.0/src/werkzeug/serving.py
+@@ -40,6 +40,7 @@ import os
+ import signal
import socket
import sys
-
+import threading
- import werkzeug
+
from ._compat import PY2
from ._compat import reraise
-@@ -775,6 +776,7 @@ class ForkingWSGIServer(ForkingMixIn, Ba
+@@ -776,6 +777,7 @@ class ForkingWSGIServer(ForkingMixIn, Ba
passthrough_errors=False,
ssl_context=None,
fd=None,
@@ -39,7 +39,7 @@
):
if not can_fork:
raise ValueError("Your platform does not support forking.")
-@@ -783,6 +785,23 @@ class ForkingWSGIServer(ForkingMixIn, Ba
+@@ -784,6 +786,23 @@ class ForkingWSGIServer(ForkingMixIn, Ba
)
self.max_children = processes
++++++ Werkzeug-0.15.6.tar.gz -> Werkzeug-0.16.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/CHANGES.rst new/Werkzeug-0.16.0/CHANGES.rst
--- old/Werkzeug-0.15.6/CHANGES.rst 2019-09-04 21:57:26.000000000 +0200
+++ new/Werkzeug-0.16.0/CHANGES.rst 2019-09-19 16:31:47.000000000 +0200
@@ -1,5 +1,23 @@
.. currentmodule:: werkzeug
+Version 0.16.0
+--------------
+
+Released 2019-09-19
+
+- Deprecate most top-level attributes provided by the ``werkzeug``
+ module in favor of direct imports. The deprecated imports will be
+ removed in version 1.0.
+
+ For example, instead of ``import werkzeug; werkzeug.url_quote``, do
+ ``from werkzeug.urls import url_quote``. A deprecation warning will
+ show the correct import to use. ``werkzeug.exceptions`` and
+ ``werkzeug.routing`` should also be imported instead of accessed,
+ but for technical reasons can't show a warning.
+
+ :issue:`2`, :pr:`1640`
+
+
Version 0.15.6
--------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/PKG-INFO new/Werkzeug-0.16.0/PKG-INFO
--- old/Werkzeug-0.15.6/PKG-INFO 2019-09-04 22:08:14.000000000 +0200
+++ new/Werkzeug-0.16.0/PKG-INFO 2019-09-19 16:39:09.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Werkzeug
-Version: 0.15.6
+Version: 0.16.0
Summary: The comprehensive WSGI web application library.
Home-page: https://palletsprojects.com/p/werkzeug/
Author: Armin Ronacher
@@ -113,6 +113,6 @@
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
-Provides-Extra: dev
Provides-Extra: watchdog
Provides-Extra: termcolor
+Provides-Extra: dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/Werkzeug.egg-info/PKG-INFO new/Werkzeug-0.16.0/src/Werkzeug.egg-info/PKG-INFO
--- old/Werkzeug-0.15.6/src/Werkzeug.egg-info/PKG-INFO 2019-09-04 22:08:14.000000000 +0200
+++ new/Werkzeug-0.16.0/src/Werkzeug.egg-info/PKG-INFO 2019-09-19 16:39:09.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Werkzeug
-Version: 0.15.6
+Version: 0.16.0
Summary: The comprehensive WSGI web application library.
Home-page: https://palletsprojects.com/p/werkzeug/
Author: Armin Ronacher
@@ -113,6 +113,6 @@
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
-Provides-Extra: dev
Provides-Extra: watchdog
Provides-Extra: termcolor
+Provides-Extra: dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/Werkzeug.egg-info/SOURCES.txt new/Werkzeug-0.16.0/src/Werkzeug.egg-info/SOURCES.txt
--- old/Werkzeug-0.15.6/src/Werkzeug.egg-info/SOURCES.txt 2019-09-04 22:08:14.000000000 +0200
+++ new/Werkzeug-0.16.0/src/Werkzeug.egg-info/SOURCES.txt 2019-09-19 16:39:09.000000000 +0200
@@ -242,7 +242,6 @@
src/werkzeug/wrappers/user_agent.py
tests/__init__.py
tests/conftest.py
-tests/test_compat.py
tests/test_datastructures.py
tests/test_debug.py
tests/test_exceptions.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/__init__.py new/Werkzeug-0.16.0/src/werkzeug/__init__.py
--- old/Werkzeug-0.15.6/src/werkzeug/__init__.py 2019-09-04 21:57:26.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/__init__.py 2019-09-19 16:31:47.000000000 +0200
@@ -1,233 +1,221 @@
-# -*- coding: utf-8 -*-
"""
- werkzeug
- ~~~~~~~~
+werkzeug
+~~~~~~~~
- Werkzeug is the Swiss Army knife of Python web development.
+Werkzeug is the Swiss Army knife of Python web development.
- It provides useful classes and functions for any WSGI application to make
- the life of a python web developer much easier. All of the provided
- classes are independent from each other so you can mix it with any other
- library.
+It provides useful classes and functions for any WSGI application to
+make the life of a Python web developer much easier. All of the provided
+classes are independent from each other so you can mix it with any other
+library.
-
- :copyright: 2007 Pallets
- :license: BSD-3-Clause
+:copyright: 2007 Pallets
+:license: BSD-3-Clause
"""
-import sys
from types import ModuleType
-__version__ = "0.15.6"
+__version__ = "0.16.0"
+
+__all__ = ["run_simple", "Client", "Request", "Response", "__version__"]
+
+
+class _DeprecatedImportModule(ModuleType):
+ """Wrap a module in order to raise """
-# This import magic raises concerns quite often which is why the implementation
-# and motivation is explained here in detail now.
-#
-# The majority of the functions and classes provided by Werkzeug work on the
-# HTTP and WSGI layer. There is no useful grouping for those which is why
-# they are all importable from "werkzeug" instead of the modules where they are
-# implemented. The downside of that is, that now everything would be loaded at
-# once, even if unused.
-#
-# The implementation of a lazy-loading module in this file replaces the
-# werkzeug package when imported from within. Attribute access to the werkzeug
-# module will then lazily import from the modules that implement the objects.
-
-# import mapping to objects in other modules
-all_by_module = {
- "werkzeug.debug": ["DebuggedApplication"],
- "werkzeug.local": [
- "Local",
- "LocalManager",
- "LocalProxy",
- "LocalStack",
- "release_local",
- ],
- "werkzeug.serving": ["run_simple"],
- "werkzeug.test": ["Client", "EnvironBuilder", "create_environ", "run_wsgi_app"],
- "werkzeug.testapp": ["test_app"],
- "werkzeug.exceptions": ["abort", "Aborter"],
- "werkzeug.urls": [
- "url_decode",
- "url_encode",
- "url_quote",
- "url_quote_plus",
- "url_unquote",
- "url_unquote_plus",
- "url_fix",
- "Href",
- "iri_to_uri",
- "uri_to_iri",
- ],
- "werkzeug.formparser": ["parse_form_data"],
- "werkzeug.utils": [
- "escape",
- "environ_property",
- "append_slash_redirect",
- "redirect",
- "cached_property",
- "import_string",
- "unescape",
- "format_string",
- "find_modules",
- "header_property",
- "html",
- "xhtml",
- "HTMLBuilder",
- "validate_arguments",
- "ArgumentValidationError",
- "bind_arguments",
- "secure_filename",
- ],
- "werkzeug.wsgi": [
- "get_current_url",
- "get_host",
- "pop_path_info",
- "peek_path_info",
- "ClosingIterator",
- "FileWrapper",
- "make_line_iter",
- "LimitedStream",
- "responder",
- "wrap_file",
- "extract_path_info",
- ],
- "werkzeug.datastructures": [
- "MultiDict",
- "CombinedMultiDict",
- "Headers",
- "EnvironHeaders",
- "ImmutableList",
- "ImmutableDict",
- "ImmutableMultiDict",
- "TypeConversionDict",
- "ImmutableTypeConversionDict",
- "Accept",
- "MIMEAccept",
- "CharsetAccept",
- "LanguageAccept",
- "RequestCacheControl",
- "ResponseCacheControl",
- "ETags",
- "HeaderSet",
- "WWWAuthenticate",
- "Authorization",
- "FileMultiDict",
- "CallbackDict",
- "FileStorage",
- "OrderedMultiDict",
- "ImmutableOrderedMultiDict",
- ],
- "werkzeug.useragents": ["UserAgent"],
- "werkzeug.http": [
- "parse_etags",
- "parse_date",
- "http_date",
- "cookie_date",
- "parse_cache_control_header",
- "is_resource_modified",
- "parse_accept_header",
- "parse_set_header",
- "quote_etag",
- "unquote_etag",
- "generate_etag",
- "dump_header",
- "parse_list_header",
- "parse_dict_header",
- "parse_authorization_header",
- "parse_www_authenticate_header",
- "remove_entity_headers",
- "is_entity_header",
- "remove_hop_by_hop_headers",
- "parse_options_header",
- "dump_options_header",
- "is_hop_by_hop_header",
- "unquote_header_value",
- "quote_header_value",
- "HTTP_STATUS_CODES",
- "dump_cookie",
- "parse_cookie",
- ],
- "werkzeug.wrappers": [
- "BaseResponse",
- "BaseRequest",
- "Request",
- "Response",
- "AcceptMixin",
- "ETagRequestMixin",
- "ETagResponseMixin",
- "ResponseStreamMixin",
- "CommonResponseDescriptorsMixin",
- "UserAgentMixin",
- "AuthorizationMixin",
- "WWWAuthenticateMixin",
- "CommonRequestDescriptorsMixin",
- ],
- "werkzeug.middleware.dispatcher": ["DispatcherMiddleware"],
- "werkzeug.middleware.shared_data": ["SharedDataMiddleware"],
- "werkzeug.security": ["generate_password_hash", "check_password_hash"],
- # the undocumented easteregg ;-)
- "werkzeug._internal": ["_easteregg"],
-}
-
-# modules that should be imported when accessed as attributes of werkzeug
-attribute_modules = frozenset(["exceptions", "routing"])
-
-object_origins = {}
-for module, items in all_by_module.items():
- for item in items:
- object_origins[item] = module
-
-
-class module(ModuleType):
- """Automatically import objects from the modules."""
-
- def __getattr__(self, name):
- if name in object_origins:
- module = __import__(object_origins[name], None, None, [name])
- for extra_name in all_by_module[module.__name__]:
- setattr(self, extra_name, getattr(module, extra_name))
- return getattr(module, name)
- elif name in attribute_modules:
- __import__("werkzeug." + name)
- return ModuleType.__getattribute__(self, name)
+ def __init__(self, name, available, removed_in):
+ import sys
+
+ super(_DeprecatedImportModule, self).__init__(name) # noqa F821
+ self._real_module = sys.modules[name] # noqa F821
+ sys.modules[name] = self
+ self._removed_in = removed_in
+ self._origin = {item: mod for mod, items in available.items() for item in items}
+ mod_all = getattr(self._real_module, "__all__", dir(self._real_module))
+ self.__all__ = sorted(mod_all + list(self._origin))
+
+ def __getattr__(self, item):
+ # Don't export internal variables.
+ if item in {"_real_module", "_origin", "_removed_in"}:
+ raise AttributeError(item)
+
+ if item in self._origin:
+ from importlib import import_module
+
+ origin = self._origin[item]
+
+ if origin == ".":
+ # No warning for the "submodule as attribute" case, it's way too messy
+ # and unreliable to try to distinguish 'from werkzueug import
+ # exceptions' and 'import werkzeug; werkzeug.exceptions'.
+ value = import_module(origin + item, self.__name__)
+ else:
+ from warnings import warn
+
+ # Import the module, get the attribute, and show a warning about where
+ # to correctly import it from.
+ mod = import_module(origin, self.__name__.rsplit(".")[0])
+ value = getattr(mod, item)
+ warn(
+ "The import '{name}.{item}' is deprecated and will be removed in"
+ " {removed_in}. Use 'from {name}{origin} import {item}'"
+ " instead.".format(
+ name=self.__name__,
+ item=item,
+ removed_in=self._removed_in,
+ origin=origin,
+ ),
+ DeprecationWarning,
+ stacklevel=2,
+ )
+ else:
+ value = getattr(self._real_module, item)
+
+ # Cache the value so it won't go through this process on subsequent accesses.
+ setattr(self, item, value)
+ return value
def __dir__(self):
- """Just show what we want to show."""
- result = list(new_module.__all__)
- result.extend(
- (
- "__file__",
- "__doc__",
- "__all__",
- "__docformat__",
- "__name__",
- "__path__",
- "__package__",
- "__version__",
- )
- )
- return result
-
-
-# keep a reference to this module so that it's not garbage collected
-old_module = sys.modules["werkzeug"]
-
-
-# setup the new module and patch it into the dict of loaded modules
-new_module = sys.modules["werkzeug"] = module("werkzeug")
-new_module.__dict__.update(
+ return sorted(dir(self._real_module) + list(self._origin))
+
+
+del ModuleType
+
+_DeprecatedImportModule(
+ __name__,
{
- "__file__": __file__,
- "__package__": "werkzeug",
- "__path__": __path__,
- "__doc__": __doc__,
- "__version__": __version__,
- "__all__": tuple(object_origins) + tuple(attribute_modules),
- "__docformat__": "restructuredtext en",
- }
+ ".": ["exceptions", "routing"],
+ "._internal": ["_easteregg"],
+ ".datastructures": [
+ "Accept",
+ "Authorization",
+ "CallbackDict",
+ "CharsetAccept",
+ "CombinedMultiDict",
+ "EnvironHeaders",
+ "ETags",
+ "FileMultiDict",
+ "FileStorage",
+ "Headers",
+ "HeaderSet",
+ "ImmutableDict",
+ "ImmutableList",
+ "ImmutableMultiDict",
+ "ImmutableOrderedMultiDict",
+ "ImmutableTypeConversionDict",
+ "LanguageAccept",
+ "MIMEAccept",
+ "MultiDict",
+ "OrderedMultiDict",
+ "RequestCacheControl",
+ "ResponseCacheControl",
+ "TypeConversionDict",
+ "WWWAuthenticate",
+ ],
+ ".debug": ["DebuggedApplication"],
+ ".exceptions": ["abort", "Aborter"],
+ ".formparser": ["parse_form_data"],
+ ".http": [
+ "cookie_date",
+ "dump_cookie",
+ "dump_header",
+ "dump_options_header",
+ "generate_etag",
+ "http_date",
+ "HTTP_STATUS_CODES",
+ "is_entity_header",
+ "is_hop_by_hop_header",
+ "is_resource_modified",
+ "parse_accept_header",
+ "parse_authorization_header",
+ "parse_cache_control_header",
+ "parse_cookie",
+ "parse_date",
+ "parse_dict_header",
+ "parse_etags",
+ "parse_list_header",
+ "parse_options_header",
+ "parse_set_header",
+ "parse_www_authenticate_header",
+ "quote_etag",
+ "quote_header_value",
+ "remove_entity_headers",
+ "remove_hop_by_hop_headers",
+ "unquote_etag",
+ "unquote_header_value",
+ ],
+ ".local": [
+ "Local",
+ "LocalManager",
+ "LocalProxy",
+ "LocalStack",
+ "release_local",
+ ],
+ ".middleware.dispatcher": ["DispatcherMiddleware"],
+ ".middleware.shared_data": ["SharedDataMiddleware"],
+ ".security": ["check_password_hash", "generate_password_hash"],
+ ".test": ["create_environ", "EnvironBuilder", "run_wsgi_app"],
+ ".testapp": ["test_app"],
+ ".urls": [
+ "Href",
+ "iri_to_uri",
+ "uri_to_iri",
+ "url_decode",
+ "url_encode",
+ "url_fix",
+ "url_quote",
+ "url_quote_plus",
+ "url_unquote",
+ "url_unquote_plus",
+ ],
+ ".useragents": ["UserAgent"],
+ ".utils": [
+ "append_slash_redirect",
+ "ArgumentValidationError",
+ "bind_arguments",
+ "cached_property",
+ "environ_property",
+ "escape",
+ "find_modules",
+ "format_string",
+ "header_property",
+ "html",
+ "HTMLBuilder",
+ "import_string",
+ "redirect",
+ "secure_filename",
+ "unescape",
+ "validate_arguments",
+ "xhtml",
+ ],
+ ".wrappers.accept": ["AcceptMixin"],
+ ".wrappers.auth": ["AuthorizationMixin", "WWWAuthenticateMixin"],
+ ".wrappers.base_request": ["BaseRequest"],
+ ".wrappers.base_response": ["BaseResponse"],
+ ".wrappers.common_descriptors": [
+ "CommonRequestDescriptorsMixin",
+ "CommonResponseDescriptorsMixin",
+ ],
+ ".wrappers.etag": ["ETagRequestMixin", "ETagResponseMixin"],
+ ".wrappers.response": ["ResponseStreamMixin"],
+ ".wrappers.user_agent": ["UserAgentMixin"],
+ ".wsgi": [
+ "ClosingIterator",
+ "extract_path_info",
+ "FileWrapper",
+ "get_current_url",
+ "get_host",
+ "LimitedStream",
+ "make_line_iter",
+ "peek_path_info",
+ "pop_path_info",
+ "responder",
+ "wrap_file",
+ ],
+ },
+ "Werkzeug 1.0",
)
-
-# Due to bootstrapping issues we need to import exceptions here.
-# Don't ask :-(
-__import__("werkzeug.exceptions")
+from .serving import run_simple
+from .test import Client
+from .wrappers import Request
+from .wrappers import Response
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/contrib/sessions.py new/Werkzeug-0.16.0/src/werkzeug/contrib/sessions.py
--- old/Werkzeug-0.15.6/src/werkzeug/contrib/sessions.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/contrib/sessions.py 2019-09-19 16:30:28.000000000 +0200
@@ -67,9 +67,9 @@
from .._compat import text_type
from ..datastructures import CallbackDict
from ..filesystem import get_filesystem_encoding
+from ..http import dump_cookie
+from ..http import parse_cookie
from ..posixemulation import rename
-from ..utils import dump_cookie
-from ..utils import parse_cookie
from ..wsgi import ClosingIterator
warnings.warn(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/datastructures.py new/Werkzeug-0.16.0/src/werkzeug/datastructures.py
--- old/Werkzeug-0.15.6/src/werkzeug/datastructures.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/datastructures.py 2019-09-19 16:30:28.000000000 +0200
@@ -14,6 +14,7 @@
from copy import deepcopy
from itertools import repeat
+from . import exceptions
from ._compat import BytesIO
from ._compat import collections_abc
from ._compat import integer_types
@@ -2839,7 +2840,6 @@
# circular dependencies
-from . import exceptions
from .http import dump_header
from .http import dump_options_header
from .http import generate_etag
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/exceptions.py new/Werkzeug-0.16.0/src/werkzeug/exceptions.py
--- old/Werkzeug-0.15.6/src/werkzeug/exceptions.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/exceptions.py 2019-09-19 16:30:28.000000000 +0200
@@ -59,18 +59,12 @@
"""
import sys
-import werkzeug
-
-# Because of bootstrapping reasons we need to manually patch ourselves
-# onto our parent module.
-werkzeug.exceptions = sys.modules[__name__]
-
from ._compat import implements_to_string
from ._compat import integer_types
from ._compat import iteritems
from ._compat import text_type
from ._internal import _get_environ
-from .wrappers import Response
+from .utils import escape
@implements_to_string
@@ -141,6 +135,8 @@
@property
def name(self):
"""The status name."""
+ from .http import HTTP_STATUS_CODES
+
return HTTP_STATUS_CODES.get(self.code, "Unknown Error")
def get_description(self, environ=None):
@@ -176,6 +172,8 @@
on how the request looked like.
:return: a :class:`Response` object or a subclass thereof.
"""
+ from .wrappers.response import Response
+
if self.response is not None:
return self.response
if environ is not None:
@@ -776,11 +774,6 @@
_aborter = Aborter()
-
#: An exception that is used to signal both a :exc:`KeyError` and a
#: :exc:`BadRequest`. Used by many of the datastructures.
BadRequestKeyError = BadRequest.wrap(KeyError)
-
-# imported here because of circular dependencies of werkzeug.utils
-from .http import HTTP_STATUS_CODES
-from .utils import escape
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/formparser.py new/Werkzeug-0.16.0/src/werkzeug/formparser.py
--- old/Werkzeug-0.15.6/src/werkzeug/formparser.py 2019-08-05 17:21:58.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/formparser.py 2019-09-17 20:04:59.000000000 +0200
@@ -16,6 +16,7 @@
from itertools import repeat
from itertools import tee
+from . import exceptions
from ._compat import BytesIO
from ._compat import text_type
from ._compat import to_native
@@ -581,6 +582,3 @@
form = (p[1] for p in formstream if p[0] == "form")
files = (p[1] for p in filestream if p[0] == "file")
return self.cls(form), self.cls(files)
-
-
-from . import exceptions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/http.py new/Werkzeug-0.16.0/src/werkzeug/http.py
--- old/Werkzeug-0.15.6/src/werkzeug/http.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/http.py 2019-09-19 16:30:28.000000000 +0200
@@ -1144,6 +1144,8 @@
value = to_bytes(value, charset)
if path is not None:
+ from .urls import iri_to_uri
+
path = iri_to_uri(path, charset)
domain = _make_cookie_domain(domain)
if isinstance(max_age, timedelta):
@@ -1235,7 +1237,7 @@
return 0 <= start < length
-# circular dependency fun
+# circular dependencies
from .datastructures import Accept
from .datastructures import Authorization
from .datastructures import ContentRange
@@ -1246,58 +1248,12 @@
from .datastructures import RequestCacheControl
from .datastructures import TypeConversionDict
from .datastructures import WWWAuthenticate
-from .urls import iri_to_uri
-
-# DEPRECATED
-from .datastructures import CharsetAccept as _CharsetAccept
-from .datastructures import Headers as _Headers
-from .datastructures import LanguageAccept as _LanguageAccept
-from .datastructures import MIMEAccept as _MIMEAccept
-
-
-class MIMEAccept(_MIMEAccept):
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.http.MIMEAccept' has moved to 'werkzeug"
- ".datastructures.MIMEAccept' as of version 0.5. This old"
- " import will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(MIMEAccept, self).__init__(*args, **kwargs)
-
-
-class CharsetAccept(_CharsetAccept):
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.http.CharsetAccept' has moved to 'werkzeug"
- ".datastructures.CharsetAccept' as of version 0.5. This old"
- " import will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(CharsetAccept, self).__init__(*args, **kwargs)
-
-
-class LanguageAccept(_LanguageAccept):
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.http.LanguageAccept' has moved to 'werkzeug"
- ".datastructures.LanguageAccept' as of version 0.5. This"
- " old import will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(LanguageAccept, self).__init__(*args, **kwargs)
+from werkzeug import _DeprecatedImportModule
-class Headers(_Headers):
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.http.Headers' has moved to 'werkzeug"
- ".datastructures.Headers' as of version 0.5. This old"
- " import will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(Headers, self).__init__(*args, **kwargs)
+_DeprecatedImportModule(
+ __name__,
+ {".datastructures": ["CharsetAccept", "Headers", "LanguageAccept", "MIMEAccept"]},
+ "Werkzeug 1.0",
+)
+del _DeprecatedImportModule
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/serving.py new/Werkzeug-0.16.0/src/werkzeug/serving.py
--- old/Werkzeug-0.15.6/src/werkzeug/serving.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/serving.py 2019-09-19 16:30:28.000000000 +0200
@@ -41,7 +41,6 @@
import socket
import sys
-import werkzeug
from ._compat import PY2
from ._compat import reraise
from ._compat import WIN
@@ -174,7 +173,9 @@
@property
def server_version(self):
- return "Werkzeug/" + werkzeug.__version__
+ from . import __version__
+
+ return "Werkzeug/" + __version__
def make_environ(self):
request_url = url_parse(self.path)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/testapp.py new/Werkzeug-0.16.0/src/werkzeug/testapp.py
--- old/Werkzeug-0.15.6/src/werkzeug/testapp.py 2019-08-05 17:21:58.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/testapp.py 2019-09-17 23:03:18.000000000 +0200
@@ -14,7 +14,7 @@
import sys
from textwrap import wrap
-import werkzeug
+from . import __version__ as _werkzeug_version
from .utils import escape
from .wrappers import BaseRequest as Request
from .wrappers import BaseResponse as Response
@@ -205,7 +205,7 @@
"os": escape(os.name),
"api_version": sys.api_version,
"byteorder": sys.byteorder,
- "werkzeug_version": werkzeug.__version__,
+ "werkzeug_version": _werkzeug_version,
"python_eggs": "\n".join(python_eggs),
"wsgi_env": "\n".join(wsgi_env),
"sys_path": "\n".join(sys_path),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/urls.py new/Werkzeug-0.16.0/src/werkzeug/urls.py
--- old/Werkzeug-0.15.6/src/werkzeug/urls.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/urls.py 2019-09-19 16:30:28.000000000 +0200
@@ -31,8 +31,6 @@
from ._compat import try_coerce_native
from ._internal import _decode_idna
from ._internal import _encode_idna
-from .datastructures import iter_multi_items
-from .datastructures import MultiDict
# A regular expression for what a valid schema looks like
_scheme_re = re.compile(r"^[a-zA-Z0-9+-.]+$")
@@ -415,6 +413,8 @@
def _url_encode_impl(obj, charset, encode_keys, sort, key):
+ from .datastructures import iter_multi_items
+
iterable = iter_multi_items(obj)
if sort:
iterable = sorted(iterable, key=key)
@@ -825,6 +825,8 @@
or `None` the default :class:`MultiDict` is used.
"""
if cls is None:
+ from .datastructures import MultiDict
+
cls = MultiDict
if isinstance(s, text_type) and not isinstance(separator, text_type):
separator = separator.decode(charset or "ascii")
@@ -884,6 +886,8 @@
return decoder
if cls is None:
+ from .datastructures import MultiDict
+
cls = MultiDict
return cls(decoder)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/useragents.py new/Werkzeug-0.16.0/src/werkzeug/useragents.py
--- old/Werkzeug-0.15.6/src/werkzeug/useragents.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/useragents.py 2019-09-19 16:30:28.000000000 +0200
@@ -12,7 +12,6 @@
:license: BSD-3-Clause
"""
import re
-import warnings
class UserAgentParser(object):
@@ -203,18 +202,9 @@
return "<%s %r/%s>" % (self.__class__.__name__, self.browser, self.version)
-# DEPRECATED
-from .wrappers import UserAgentMixin as _UserAgentMixin
+from werkzeug import _DeprecatedImportModule
-
-class UserAgentMixin(_UserAgentMixin):
- @property
- def user_agent(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.useragents.UserAgentMixin' should be imported"
- " from 'werkzeug.wrappers.UserAgentMixin'. This old import"
- " will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- return super(_UserAgentMixin, self).user_agent
+_DeprecatedImportModule(
+ __name__, {".wrappers.user_agent": ["UserAgentMixin"]}, "Werkzeug 1.0"
+)
+del _DeprecatedImportModule
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/utils.py new/Werkzeug-0.16.0/src/werkzeug/utils.py
--- old/Werkzeug-0.15.6/src/werkzeug/utils.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/utils.py 2019-09-19 16:30:28.000000000 +0200
@@ -15,7 +15,6 @@
import pkgutil
import re
import sys
-import warnings
from ._compat import iteritems
from ._compat import PY2
@@ -757,80 +756,19 @@
)
-# DEPRECATED
-from .datastructures import CombinedMultiDict as _CombinedMultiDict
-from .datastructures import EnvironHeaders as _EnvironHeaders
-from .datastructures import Headers as _Headers
-from .datastructures import MultiDict as _MultiDict
-from .http import dump_cookie as _dump_cookie
-from .http import parse_cookie as _parse_cookie
+from werkzeug import _DeprecatedImportModule
-
-class MultiDict(_MultiDict):
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.utils.MultiDict' has moved to 'werkzeug"
- ".datastructures.MultiDict' as of version 0.5. This old"
- " import will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(MultiDict, self).__init__(*args, **kwargs)
-
-
-class CombinedMultiDict(_CombinedMultiDict):
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.utils.CombinedMultiDict' has moved to 'werkzeug"
- ".datastructures.CombinedMultiDict' as of version 0.5. This"
- " old import will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(CombinedMultiDict, self).__init__(*args, **kwargs)
-
-
-class Headers(_Headers):
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.utils.Headers' has moved to 'werkzeug"
- ".datastructures.Headers' as of version 0.5. This old"
- " import will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(Headers, self).__init__(*args, **kwargs)
-
-
-class EnvironHeaders(_EnvironHeaders):
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.utils.EnvironHeaders' has moved to 'werkzeug"
- ".datastructures.EnvironHeaders' as of version 0.5. This"
- " old import will be removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(EnvironHeaders, self).__init__(*args, **kwargs)
-
-
-def parse_cookie(*args, **kwargs):
- warnings.warn(
- "'werkzeug.utils.parse_cookie' as moved to 'werkzeug.http"
- ".parse_cookie' as of version 0.5. This old import will be"
- " removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- return _parse_cookie(*args, **kwargs)
-
-
-def dump_cookie(*args, **kwargs):
- warnings.warn(
- "'werkzeug.utils.dump_cookie' as moved to 'werkzeug.http"
- ".dump_cookie' as of version 0.5. This old import will be"
- " removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- return _dump_cookie(*args, **kwargs)
+_DeprecatedImportModule(
+ __name__,
+ {
+ ".datastructures": [
+ "CombinedMultiDict",
+ "EnvironHeaders",
+ "Headers",
+ "MultiDict",
+ ],
+ ".http": ["dump_cookie", "parse_cookie"],
+ },
+ "Werkzeug 1.0",
+)
+del _DeprecatedImportModule
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/wrappers/user_agent.py new/Werkzeug-0.16.0/src/werkzeug/wrappers/user_agent.py
--- old/Werkzeug-0.15.6/src/werkzeug/wrappers/user_agent.py 2019-08-05 17:21:58.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/wrappers/user_agent.py 2019-09-17 23:03:18.000000000 +0200
@@ -1,3 +1,4 @@
+from ..useragents import UserAgent
from ..utils import cached_property
@@ -10,6 +11,4 @@
@cached_property
def user_agent(self):
"""The current user agent."""
- from ..useragents import UserAgent
-
return UserAgent(self.environ)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/src/werkzeug/wsgi.py new/Werkzeug-0.16.0/src/werkzeug/wsgi.py
--- old/Werkzeug-0.15.6/src/werkzeug/wsgi.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/src/werkzeug/wsgi.py 2019-09-19 16:30:28.000000000 +0200
@@ -10,7 +10,6 @@
"""
import io
import re
-import warnings
from functools import partial
from functools import update_wrapper
from itertools import chain
@@ -1001,67 +1000,14 @@
return True
-# DEPRECATED
-from .middleware.dispatcher import DispatcherMiddleware as _DispatcherMiddleware
-from .middleware.http_proxy import ProxyMiddleware as _ProxyMiddleware
-from .middleware.shared_data import SharedDataMiddleware as _SharedDataMiddleware
+from werkzeug import _DeprecatedImportModule
-
-class ProxyMiddleware(_ProxyMiddleware):
- """
- .. deprecated:: 0.15
- ``werkzeug.wsgi.ProxyMiddleware`` has moved to
- :mod:`werkzeug.middleware.http_proxy`. This import will be
- removed in 1.0.
- """
-
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.wsgi.ProxyMiddleware' has moved to 'werkzeug"
- ".middleware.http_proxy.ProxyMiddleware'. This import is"
- " deprecated as of version 0.15 and will be removed in"
- " version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(ProxyMiddleware, self).__init__(*args, **kwargs)
-
-
-class SharedDataMiddleware(_SharedDataMiddleware):
- """
- .. deprecated:: 0.15
- ``werkzeug.wsgi.SharedDataMiddleware`` has moved to
- :mod:`werkzeug.middleware.shared_data`. This import will be
- removed in 1.0.
- """
-
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.wsgi.SharedDataMiddleware' has moved to"
- " 'werkzeug.middleware.shared_data.SharedDataMiddleware'."
- " This import is deprecated as of version 0.15 and will be"
- " removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(SharedDataMiddleware, self).__init__(*args, **kwargs)
-
-
-class DispatcherMiddleware(_DispatcherMiddleware):
- """
- .. deprecated:: 0.15
- ``werkzeug.wsgi.DispatcherMiddleware`` has moved to
- :mod:`werkzeug.middleware.dispatcher`. This import will be
- removed in 1.0.
- """
-
- def __init__(self, *args, **kwargs):
- warnings.warn(
- "'werkzeug.wsgi.DispatcherMiddleware' has moved to"
- " 'werkzeug.middleware.dispatcher.DispatcherMiddleware'."
- " This import is deprecated as of version 0.15 and will be"
- " removed in version 1.0.",
- DeprecationWarning,
- stacklevel=2,
- )
- super(DispatcherMiddleware, self).__init__(*args, **kwargs)
+_DeprecatedImportModule(
+ __name__,
+ {
+ ".middleware.dispatcher": ["DispatcherMiddleware"],
+ ".middleware.http_proxy": ["ProxyMiddleware"],
+ ".middleware.shared_data": ["SharedDataMiddleware"],
+ },
+ "Werkzeug 1.0",
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/tests/contrib/test_securecookie.py new/Werkzeug-0.16.0/tests/contrib/test_securecookie.py
--- old/Werkzeug-0.15.6/tests/contrib/test_securecookie.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/tests/contrib/test_securecookie.py 2019-09-19 16:30:28.000000000 +0200
@@ -14,7 +14,7 @@
from werkzeug._compat import to_native
from werkzeug.contrib.securecookie import SecureCookie
-from werkzeug.utils import parse_cookie
+from werkzeug.http import parse_cookie
from werkzeug.wrappers import Request
from werkzeug.wrappers import Response
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Werkzeug-0.15.6/tests/test_compat.py new/Werkzeug-0.16.0/tests/test_compat.py
--- old/Werkzeug-0.15.6/tests/test_compat.py 2019-09-04 21:57:22.000000000 +0200
+++ new/Werkzeug-0.16.0/tests/test_compat.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-# flake8: noqa
-"""
- tests.compat
- ~~~~~~~~~~~~
-
- Ensure that old stuff does not break on update.
-
- :copyright: 2007 Pallets
- :license: BSD-3-Clause
-"""
-from werkzeug.test import create_environ
-from werkzeug.wrappers import Response
-
-
-def test_old_imports():
- from werkzeug.utils import (
- Headers,
- MultiDict,
- CombinedMultiDict,
- Headers,
- EnvironHeaders,
- )
- from werkzeug.http import (
- Accept,
- MIMEAccept,
- CharsetAccept,
- LanguageAccept,
- ETags,
- HeaderSet,
- WWWAuthenticate,
- Authorization,
- )
-
-
-def test_exposed_werkzeug_mod():
- import werkzeug
-
- for key in werkzeug.__all__:
- getattr(werkzeug, key)
1
0
Hello community,
here is the log from the commit of package python-Pyro4 for openSUSE:Factory checked in at 2019-09-30 15:55:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Pyro4 (Old)
and /work/SRC/openSUSE:Factory/.python-Pyro4.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Pyro4"
Mon Sep 30 15:55:17 2019 rev:5 rq:732901 version:4.76
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Pyro4/python-Pyro4.changes 2019-03-19 09:58:11.808107676 +0100
+++ /work/SRC/openSUSE:Factory/.python-Pyro4.new.2352/python-Pyro4.changes 2019-09-30 15:55:17.305872978 +0200
@@ -1,0 +2,10 @@
+Tue Sep 24 09:56:04 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 4.76:
+ * corrected bogus space in worker thread name
+ * thread server can now be cleanly stopped with SIGINT / Ctrl-C on Windows
+ * the behavior of the NATPORT config item has been corrected to be in line with the API behavior of the Daemon
+ * certs are now included in sdist archive so the ssl unit tests also run as intended
+ * now correctly checks for write access to the correct logfile location, instead of assuming the current directory
+
+-------------------------------------------------------------------
Old:
----
Pyro4-4.75.tar.gz
New:
----
Pyro4-4.76.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Pyro4.spec ++++++
--- /var/tmp/diff_new_pack.FCjzqe/_old 2019-09-30 15:55:17.793871680 +0200
+++ /var/tmp/diff_new_pack.FCjzqe/_new 2019-09-30 15:55:17.797871669 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-Pyro4
-Version: 4.75
+Version: 4.76
Release: 0
Summary: Distributed object middleware for Python (RPC)
License: MIT
++++++ Pyro4-4.75.tar.gz -> Pyro4-4.76.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/MANIFEST.in new/Pyro4-4.76/MANIFEST.in
--- old/Pyro4-4.75/MANIFEST.in 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/MANIFEST.in 2019-03-08 23:17:15.000000000 +0100
@@ -6,6 +6,7 @@
recursive-include examples *
recursive-include docs *
recursive-include contrib *
+recursive-include certs *
global-exclude */.svn/*
global-exclude */.idea/*
global-exclude *.class
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/PKG-INFO new/Pyro4-4.76/PKG-INFO
--- old/Pyro4-4.75/PKG-INFO 2019-01-19 13:16:41.000000000 +0100
+++ new/Pyro4-4.76/PKG-INFO 2019-06-05 23:31:58.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: Pyro4
-Version: 4.75
+Version: 4.76
Summary: distributed object middleware for Python (RPC)
Home-page: http://pyro4.readthedocs.io
Author: Irmen de Jong
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/certs/client_cert.pem new/Pyro4-4.76/certs/client_cert.pem
--- old/Pyro4-4.75/certs/client_cert.pem 1970-01-01 01:00:00.000000000 +0100
+++ new/Pyro4-4.76/certs/client_cert.pem 2018-08-16 09:50:01.000000000 +0200
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDjzCCAnegAwIBAgIJAJv9mHLZbwZsMA0GCSqGSIb3DQEBCwUAMF4xCzAJBgNV
+BAYTAk5MMRMwEQYDVQQIDApTb21lLVN0YXRlMRYwFAYDVQQKDA1SYXpvcnZpbmUu
+bmV0MQ4wDAYDVQQLDAVQeXJvNDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTE3MDgw
+MzE0MDc0MloXDTIxMDkxMTE0MDc0MlowXjELMAkGA1UEBhMCTkwxEzARBgNVBAgM
+ClNvbWUtU3RhdGUxFjAUBgNVBAoMDVJhem9ydmluZS5uZXQxDjAMBgNVBAsMBVB5
+cm80MRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQDnlY+rpRE61q8uCOONDFPYJZjcW+IRjIjq/Aone84CUFv0kl0UR2VO
+Cihq4offI3A/ILZHnYUw4xb/ThXM00y+7z4691i0qYn1rac02Un/r5UgqJbo/JQP
+OGRwxVhwfltC9aDMoJbNgJ/1z04P3ENvPClXVF2mPtcscPG+Ot1v+Ov1yeBzCkuO
+7CIB0TKIL0ShmscPKccxbKnSpEqeJp+2xGlasKZGSCs67+grMg0H+Y3aoDmjB65o
+6JH5aFeqndZHbzsxQuKCSxy4Y+o75Xm1QgleP8UYHHMBIbPkf0TYvDfrnSw7dXdI
+rNbgW9xhbJwG42/kIA+TO2XrlPfEsfD1AgMBAAGjUDBOMB0GA1UdDgQWBBQJb0wj
+f8O5fNvWScUYFjOHFPLmgzAfBgNVHSMEGDAWgBQJb0wjf8O5fNvWScUYFjOHFPLm
+gzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAfJBJVu21tbfTv8Ucs
+qKf8qoOZUHa+fyhLOdzXSISesh5nUsAjkwh7jCqx93Q7EJB7SHWss8PDEQQ3orcM
+W+kjSpuxWIxP/C2F4Gn/RGM9w1aorD34DkLrGV2Ej7tKak2BrL5rUHkdvTzoIi8j
+70RqV5yeWV6WpclqWWbXrJXquB0u6O5nR2gs3IwDbbmGpcDBHIBeyZc0syCzC0t1
+RtmGYXoLXxUYHnTVYBAF6Th6hEXO4SXKSf3F01HThVL2VWuKhGv+6UdmPW5wDDs8
+nvf8IgvIqGJhzWXk8REeT05iIC3t+8iEHAHTilN1lFFitSKBP0U5xqTbJFUFjkoF
+mb4c
+-----END CERTIFICATE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/certs/client_key.pem new/Pyro4-4.76/certs/client_key.pem
--- old/Pyro4-4.75/certs/client_key.pem 1970-01-01 01:00:00.000000000 +0100
+++ new/Pyro4-4.76/certs/client_key.pem 2018-08-16 09:50:01.000000000 +0200
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDnlY+rpRE61q8u
+COONDFPYJZjcW+IRjIjq/Aone84CUFv0kl0UR2VOCihq4offI3A/ILZHnYUw4xb/
+ThXM00y+7z4691i0qYn1rac02Un/r5UgqJbo/JQPOGRwxVhwfltC9aDMoJbNgJ/1
+z04P3ENvPClXVF2mPtcscPG+Ot1v+Ov1yeBzCkuO7CIB0TKIL0ShmscPKccxbKnS
+pEqeJp+2xGlasKZGSCs67+grMg0H+Y3aoDmjB65o6JH5aFeqndZHbzsxQuKCSxy4
+Y+o75Xm1QgleP8UYHHMBIbPkf0TYvDfrnSw7dXdIrNbgW9xhbJwG42/kIA+TO2Xr
+lPfEsfD1AgMBAAECggEAG37JWQK3Ifo9QETz51owVjhYhskt9RFvbB7Sgc+ULPgn
+gskh3feAEpzoIZCVuyt09znGCoisOJqtr1AxDGmF8iFrjQqy8Hg0lgOxF3g47e+F
+0CPUDwN1/LygSDdWAb0uzqtlFQZ4ARwlYcTkKsPnCbzl16V/nO5XE8KxIPnSMqns
+T712i2WmOm+AZf5C4vOBlBYwJpv7cYWuT0Mow5rUMS2tkT3yD3MnVDGJfhTGVyrf
+M5V6ijGaPS1xLuEv9tWkAo1CMyQCG6/YIaf6zIzc56rsPiNFvCE7C+vw6nu3er2l
+IH6GT2I2w1DbSvQ13eLMcLhkod+x2jHWT+dPdz8lnQKBgQD/aiLZbb89WrcVzz40
+HTCN4ovxhE144k24rPCkSpPCrS8NdRRJZAGM9ReuZVLpQlsNsqtMz/l5Hzgf2kO0
+UYO/Qj352+nX83vOEzXFHtmZjgCV4jf5xNRNLSHr4XheMxi4d84+0h2cGFYBiPrL
+zjXxt9MQuvtv48OVF3klfGxJqwKBgQDoHXFS/i4l7CnmWHQ8VHpet7IlKy5bv7Pr
+82oEZa60PYmwBspp7rSL74z1lRqkpU3AESrHhp9ib04gc56r96FZgZS42SyEul8w
+EGZbcqo+j45xDD/+JMLtXZcQWK3wVnFUJolAD5sZrsGLBmTjGmnQp2hej0nxLxmS
+U2nqWOZP3wKBgQCXWJsB3+g8QO7QO5eOZeWJjb6DBHSrtt17Gu8VSyO3bcu926yD
+uIC6t9iqfFve4HT37vFWeL5JKVimdz07MjoxMN1smwU784lfGT75aUhjlyN9rSii
+FiH/AUlibp5Wo0x4snVCAFuPTVRZYIPMFIseimDFPycSrBIO3HPq5Il+NQKBgCyP
+AmNBQlCrXnvGvUGbogYu03cJLBQW4A5Koy6G6pvVOGpfU1o0pdo7OV8nqX6z8RIO
++Zxl/pDh9yiJqYsvtXy+QHOf1UkBkiZi75Nclsv9uQWAqYQ7QGRa1BYiP/nkTksu
+Pqjalha/Eo6CwrlKJ8gTaxjD/xjaxtjtRGblfAkXAoGAfsn7EyKe/iaRASLeypML
+chsPlFiVm32F/IkJZmuor5jCBSgekahYWw5eJGvhybW8juNmvC61Wq+dmYTDf7YW
+Uy1e252KWguFABFdax66o3hy/pXrfF/xk3oQMGST3PwqhCHIgp4jjWnWQffBDcTz
+TUducolvUDE0xfqqLlgUBKA=
+-----END PRIVATE KEY-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/certs/readme.txt new/Pyro4-4.76/certs/readme.txt
--- old/Pyro4-4.75/certs/readme.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/Pyro4-4.76/certs/readme.txt 2018-08-16 09:50:01.000000000 +0200
@@ -0,0 +1,12 @@
+These SSL/TLS certificates are self-signed and have no CA trust chain.
+They contain some info to see that they're for Pyro4 (O=Razorvine.net, OU=Pyro4, CN=localhost)
+They're meant to be used for testing purposes. There is no key password.
+
+It's easy to make your own certs by the way, it's mentioned in the docs of the ssl module:
+https://docs.python.org/3/library/ssl.html#self-signed-certificates
+
+$ openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout key.pem
+
+
+It's also possible to make your own CA certs and sign your client and server certs
+with them, but that is a lot more elaborate.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/certs/server_cert.pem new/Pyro4-4.76/certs/server_cert.pem
--- old/Pyro4-4.75/certs/server_cert.pem 1970-01-01 01:00:00.000000000 +0100
+++ new/Pyro4-4.76/certs/server_cert.pem 2018-08-16 09:50:01.000000000 +0200
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDjzCCAnegAwIBAgIJANFjq4K4t03mMA0GCSqGSIb3DQEBCwUAMF4xCzAJBgNV
+BAYTAk5MMRMwEQYDVQQIDApTb21lLVN0YXRlMRYwFAYDVQQKDA1SYXpvcnZpbmUu
+bmV0MQ4wDAYDVQQLDAVQeXJvNDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTE3MDgw
+MzE0MDcxNFoXDTIxMDkxMTE0MDcxNFowXjELMAkGA1UEBhMCTkwxEzARBgNVBAgM
+ClNvbWUtU3RhdGUxFjAUBgNVBAoMDVJhem9ydmluZS5uZXQxDjAMBgNVBAsMBVB5
+cm80MRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQDpXbWk/AkfiR0Dqs9S84CLQ8sNmpgj7IYDmNgUFuj+a7JQOpHjtfMK
+JS7WtWXbWDY0CvzSWE1bxmVru0uOBywd1eUH8BHfYR+AQzEJ3IFU9K2yxZyT1nZ3
+DPY3gmsT9D2J1NMvy+drsDL/qH/MRcMRmhBmw7QSuGrViox2Vu5dFhxx+3cEMPTj
+OU+dXtOYmsWQp94lE7LvOWdstTQmAqR/eKj8+qmewi9dFsozkSfaI541s9OHMNVF
+ECx0qpKiTyeDA9CLcHe8WCHL0TvIFXTXjUUJQUUiCueZ6ub1ZqhRhWz7hm9iz6NI
+aV4GIicfEfr0+ocZO7peidwpTVKdBWfTAgMBAAGjUDBOMB0GA1UdDgQWBBTo4uUt
+4+xM4sXDBqmw7Js3IGk5czAfBgNVHSMEGDAWgBTo4uUt4+xM4sXDBqmw7Js3IGk5
+czAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBlB7wPTI9EAWKoigEW
+zkXMMBGSn7wqdCquaU2CgEi+N2LlaitfD1/sH36Xj8AuyEujT7frrs6q/P6RkRlE
+PRuHlAV07GUWPOiqskT86hYMbxIl5ygvkCYSwcvrBkFGvVN2hUPTqtwqckQRUyzK
++w1m2nfldlG9/kto7lyV3MuCc8f0WUYgS3e74uwnl3Qr1Sjrr74+pdK39uMm1dXw
+ho8rfaDH+fEqBymwI+3DA9QVoi1vTUTLPbP4SK8nvLa1CiV2DaRmmw+eOv87qDGl
+fh3llz7+UJFNco6uquuXHeDtKvcNCVlj3mUfAhP1SzGG4mSvAQeEjwSjTEZQTBOc
+XAue
+-----END CERTIFICATE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/certs/server_key.pem new/Pyro4-4.76/certs/server_key.pem
--- old/Pyro4-4.75/certs/server_key.pem 1970-01-01 01:00:00.000000000 +0100
+++ new/Pyro4-4.76/certs/server_key.pem 2018-08-16 09:50:01.000000000 +0200
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDpXbWk/AkfiR0D
+qs9S84CLQ8sNmpgj7IYDmNgUFuj+a7JQOpHjtfMKJS7WtWXbWDY0CvzSWE1bxmVr
+u0uOBywd1eUH8BHfYR+AQzEJ3IFU9K2yxZyT1nZ3DPY3gmsT9D2J1NMvy+drsDL/
+qH/MRcMRmhBmw7QSuGrViox2Vu5dFhxx+3cEMPTjOU+dXtOYmsWQp94lE7LvOWds
+tTQmAqR/eKj8+qmewi9dFsozkSfaI541s9OHMNVFECx0qpKiTyeDA9CLcHe8WCHL
+0TvIFXTXjUUJQUUiCueZ6ub1ZqhRhWz7hm9iz6NIaV4GIicfEfr0+ocZO7peidwp
+TVKdBWfTAgMBAAECggEAH3s1yuj5LhjoIhuD1nPk7mSZ2t71ETuSJKAU3jjs+415
+w5rzHV3pSIAVnn9gG0P+I+0riBDDdtL/0ZW1rpZHHEtDl1uKfbDzd/EYh3UIuXY8
+jHZeFg+DcbH88SYV3d5AAv0D9Fm0gXGGn7iSbPMoSpKXDdXuz+uy9dW39yrpAwN7
+piW/4M4QVYtl6yAoqzemwf7QQi9T1fe+K0y4EknX825JfO0rYhK0RYA4XQPTh/Fs
+jaH10c5IfcBW7LEbJCooemXdR4qFUxgKP3C2R2GgcocgAaZKqVL+TT5/lfeR1KN2
+nv8GR+JJvNbKLLRE598S6VOoLVTdTE3wuqc64DD28QKBgQD2R0Ygr9a9GjusjryK
+tnnta8I+SzVrL3nnvX9pAjMyg9lWk3Wpq8U2EVHxoow7yG3FQCO5HMezz72z/CYq
+u5L1uGubN/QHjokdeItn0YAN/lAWPMgj2q3TRuCErht45v16RWFLsQzX5xgZ4APN
+NbSJSo2fxrSbAs3KoXBiQpw0CwKBgQDyk/OtwrSV50lX7h01eM5ZcWHWm11AcYzS
+YatQr0s5p9EZgekQEhWa+veq7M3j0spOFakFbelPcH3MU5GHG6h09AVLfqLlScUE
+ZfNXKP+s3BbM9oI2kpKDmGzIBDK5J1+iQihYdHHQwyT9+WXMBeqNieuZuHsO/klm
+2MvW6ufwWQKBgQDrnwM0EKdlYqzHCgTOvYhnoxpDGRdxhgmesoksgSNUaBrOnuQK
+wcE7WlTI1thN9hM3jYbf+u4BVXbMtSga6DzRBHFHHsBFXpRGcucFG8XlHXOn4t0k
+mHqH0Z7KsfysrmrCyZAtp6V/BqTjVJSuh3xDgeV/gM+YIpWbENuB1vK1QwKBgCf0
+3N+TQcGrXjZgn2kOZBbxiScbYknaKlMBCYH5zc9KaDPmZShjgjGMAz2hUeyj7PTd
+toCRcSvHoMEGRuNVV/MjureLvXM9Knml/WYu96ZWfl72f85TaFTKx6hOoLhE1wjY
+EuM3EwRLEI3RBcaMdu0neapRa9u1YQvSzAizms7JAoGBALI4qL+MFsaumjDDUWzU
+8Wvqj+NTId4/SNypLr3iG2FHLeGtBTro9aHx/H/OWMZNgghGOZAimZKnSXNHd1f8
+tJzBsFbqEden93kw9PMR3uvzjoVVj6HjHWkJhqWQMRvNU1QSzTHAFfsrDjNF1MVw
+0lNd6vPevCXhdZ7dS/qCcJAJ
+-----END PRIVATE KEY-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/docs/source/changelog.rst new/Pyro4-4.76/docs/source/changelog.rst
--- old/Pyro4-4.75/docs/source/changelog.rst 2019-01-19 13:14:23.000000000 +0100
+++ new/Pyro4-4.76/docs/source/changelog.rst 2019-06-05 23:14:48.000000000 +0200
@@ -2,6 +2,18 @@
Change Log
**********
+**Pyro 4.76**
+
+- corrected bogus space in worker thread name
+- thread server can now be cleanly stopped with SIGINT / Ctrl-C on Windows
+ (if the selectors module is available which is also used by the multiplex server)
+- the behavior of the NATPORT config item has been corrected to be in line with the API behavior of the Daemon:
+ if you leave this at 0 (the default), it will now correctly replicate the internal port number as NAT port
+ (instead of crashing with a configuration error)
+- certs are now included in sdist archive so the ssl unit tests also run as intended
+- now correctly checks for write access to the correct logfile location, instead of assuming the current directory
+
+
**Pyro 4.75**
- fixed distributed-mandelbrot example to actually run multiple concurrent calculations.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/docs/source/config.rst new/Pyro4-4.76/docs/source/config.rst
--- old/Pyro4-4.75/docs/source/config.rst 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/docs/source/config.rst 2019-03-07 21:42:38.000000000 +0100
@@ -91,7 +91,7 @@
NS_BCHOST str None Hostname for the broadcast responder of the name server. Used by the server only.
NS_AUTOCLEAN float 0.0 Specify a recurring period in seconds where the Name server checks its registrations and removes the ones that are not available anymore. (0=disabled, otherwise should be >=3)
NATHOST str None External hostname in case of NAT (used by the server)
-NATPORT int None External port in case of NAT (used by the server)
+NATPORT int 0 External port in case of NAT (used by the server) 0=replicate internal port number as NAT port
BROADCAST_ADDRS str <broadcast>, 0.0.0.0 List of comma separated addresses that Pyro should send broadcasts to (for NS locating in clients)
ONEWAY_THREADED bool True Enable to make oneway calls be processed in their own separate thread
POLLTIMEOUT float 2.0 For the multiplexing server only: the timeout of the select or poll calls
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/examples/eventloop/Readme.txt new/Pyro4-4.76/examples/eventloop/Readme.txt
--- old/Pyro4-4.75/examples/eventloop/Readme.txt 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/examples/eventloop/Readme.txt 2019-03-07 21:34:54.000000000 +0100
@@ -4,7 +4,7 @@
Pyro objects. This particular example uses select to wait for the
set of objects (sockets, really) and calls the correct event handler.
You can add your own application's sockets easily this way.
-See the 'sever_threads.py' how this is done.
+See the 'server_threads.py' how this is done.
Since Pyro 4.44 it is possible to easily merge/combine the event loops
of different daemons. This way you don't have to write your own event
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/setup.py new/Pyro4-4.76/setup.py
--- old/Pyro4-4.75/setup.py 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/setup.py 2019-03-08 23:14:45.000000000 +0100
@@ -1,6 +1,7 @@
from __future__ import print_function
import sys
import re
+import unittest
try:
# try setuptools first, to get access to build_sphinx and test commands
@@ -12,6 +13,13 @@
using_setuptools = False
+
+def pyro_test_suite():
+ testloader = unittest.TestLoader()
+ testsuite = testloader.discover("tests/PyroTests", pattern="test*.py")
+ return testsuite
+
+
if __name__ == '__main__':
with open("src/Pyro4/constants.py") as constants_file:
# extract the VERSION definition from the Pyro4.constants module without importing it
@@ -19,12 +27,12 @@
pyro4_version = re.match("VERSION ?= ?['\"](.+)['\"]", version_line).group(1)
print('Pyro version = %s' % pyro4_version)
- setupargs = {
- "name": "Pyro4",
- "version": pyro4_version,
- "license": "MIT",
- "description": "distributed object middleware for Python (RPC)",
- "long_description": """Pyro means PYthon Remote Objects.
+ setup(
+ name="Pyro4",
+ version=pyro4_version,
+ license="MIT",
+ description="distributed object middleware for Python (RPC)",
+ long_description="""Pyro means PYthon Remote Objects.
It is a library that enables you to build applications in which
objects can talk to eachother over the network, with minimal programming effort.
You can just use normal Python method calls, with almost every possible parameter
@@ -38,20 +46,21 @@
The documentation can be found here: http://pyro4.readthedocs.io
""",
- "author": "Irmen de Jong",
- "author_email": "irmen(a)razorvine.net",
- "keywords": ["distributed objects", "RPC", "remote method call", "IPC"],
- "url": "http://pyro4.readthedocs.io",
- "package_dir": {'': 'src'},
- "packages": ['Pyro4', 'Pyro4.socketserver', 'Pyro4.test', 'Pyro4.utils'],
- "scripts": [],
- "platforms": "any",
- "install_requires": ["serpent>=1.27"],
- "extras_require": {
+ author="Irmen de Jong",
+ author_email="irmen(a)razorvine.net",
+ keywords=["distributed objects", "RPC", "remote method call", "IPC"],
+ url="http://pyro4.readthedocs.io",
+ package_dir={'': 'src'},
+ packages=['Pyro4', 'Pyro4.socketserver', 'Pyro4.test', 'Pyro4.utils'],
+ scripts=[],
+ platforms="any",
+ test_suite="setup.pyro_test_suite",
+ install_requires=["serpent>=1.27"],
+ extras_require={
":python_version<'3.4'": ["selectors34"]
},
- "requires": ["serpent"],
- "classifiers": [
+ requires=["serpent"],
+ classifiers=[
"Development Status :: 5 - Production/Stable",
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
@@ -69,20 +78,18 @@
"Topic :: System :: Distributed Computing",
"Topic :: System :: Networking"
],
- "entry_points": {
+ entry_points={
'console_scripts': [
- 'pyro4-ns = Pyro4.naming:main',
- 'pyro4-nsc = Pyro4.nsc:main',
- 'pyro4-test-echoserver = Pyro4.test.echoserver:main',
- 'pyro4-check-config = Pyro4.configuration:main',
- 'pyro4-flameserver = Pyro4.utils.flameserver:main',
- 'pyro4-httpgateway = Pyro4.utils.httpgateway:main'
+ 'pyro4-ns=Pyro4.naming:main',
+ 'pyro4-nsc=Pyro4.nsc:main',
+ 'pyro4-test-echoserver=Pyro4.test.echoserver:main',
+ 'pyro4-check-config=Pyro4.configuration:main',
+ 'pyro4-flameserver=Pyro4.utils.flameserver:main',
+ 'pyro4-httpgateway=Pyro4.utils.httpgateway:main'
]
},
- "options": {"install": {"optimize": 0}}
- }
-
- setup(**setupargs)
+ options={"install": {"optimize": 0}}
+ )
if len(sys.argv) >= 2 and sys.argv[1].startswith("install"):
print("\nOnly the Pyro library has been installed (version %s)." % pyro4_version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/src/Pyro4/__init__.py new/Pyro4-4.76/src/Pyro4/__init__.py
--- old/Pyro4-4.75/src/Pyro4/__init__.py 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/src/Pyro4/__init__.py 2019-06-05 23:24:03.000000000 +0200
@@ -32,12 +32,15 @@
if len(logging.root.handlers) == 0:
# configure the logging with some sensible defaults.
try:
- import tempfile
- tempfile = tempfile.TemporaryFile(dir=".")
- tempfile.close()
+ if logfilename:
+ import tempfile
+ logfile_dir = os.path.dirname(os.path.expanduser(logfilename))
+ tempfile = tempfile.TemporaryFile(dir=logfile_dir)
+ tempfile.close()
except OSError:
- # cannot write in current directory, use the default console logger
+ # cannot write in the desired logfile directory, use the default console logger
logging.basicConfig(level=levelvalue)
+ logging.getLogger("Pyro4").warn("unable to write to the desired logfile (access rights?), falling back to console logger")
else:
# set up a basic logfile in current directory
logging.basicConfig(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/src/Pyro4/constants.py new/Pyro4-4.76/src/Pyro4/constants.py
--- old/Pyro4-4.75/src/Pyro4/constants.py 2019-01-19 13:07:28.000000000 +0100
+++ new/Pyro4-4.76/src/Pyro4/constants.py 2019-06-05 23:15:54.000000000 +0200
@@ -5,7 +5,7 @@
"""
# Pyro version
-VERSION = "4.75"
+VERSION = "4.76"
# standard object name for the Daemon object
DAEMON_NAME = "Pyro.Daemon"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/src/Pyro4/core.py new/Pyro4-4.76/src/Pyro4/core.py
--- old/Pyro4-4.75/src/Pyro4/core.py 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/src/Pyro4/core.py 2019-03-07 21:34:54.000000000 +0100
@@ -1113,8 +1113,8 @@
host = config.HOST
if nathost is None:
nathost = config.NATHOST
- if natport is None:
- natport = config.NATPORT or None
+ if natport is None and nathost is not None:
+ natport = config.NATPORT
if nathost and unixsocket:
raise ValueError("cannot use nathost together with unixsocket")
if (nathost is None) ^ (natport is None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/src/Pyro4/socketserver/threadpool.py new/Pyro4-4.76/src/Pyro4/socketserver/threadpool.py
--- old/Pyro4-4.75/src/Pyro4/socketserver/threadpool.py 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/src/Pyro4/socketserver/threadpool.py 2019-02-07 22:29:05.000000000 +0100
@@ -25,7 +25,7 @@
def __init__(self, pool):
super(Worker, self).__init__()
self.daemon = True
- self.name = "Pyro-Worker-%d " % id(self)
+ self.name = "Pyro-Worker-%d" % id(self)
self.job_available = threading.Event()
self.job = None
self.pool = pool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/src/Pyro4/socketserver/threadpoolserver.py new/Pyro4-4.76/src/Pyro4/socketserver/threadpoolserver.py
--- old/Pyro4-4.75/src/Pyro4/socketserver/threadpoolserver.py 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/src/Pyro4/socketserver/threadpoolserver.py 2019-03-02 23:07:48.000000000 +0100
@@ -7,15 +7,19 @@
"""
from __future__ import print_function
+
import socket
import logging
import sys
import time
import threading
import os
+
from Pyro4 import socketutil, errors, util
from Pyro4.configuration import config
from .threadpool import Pool, NoFreeWorkersError
+from .multiplexserver import selectors
+
log = logging.getLogger("Pyro4.threadpoolserver")
_client_disconnect_lock = threading.Lock()
@@ -106,6 +110,7 @@
self.daemon = self.sock = self._socketaddr = self.locationStr = self.pool = None
self.shutting_down = False
self.housekeeper = None
+ self._selector = selectors.DefaultSelector() if selectors else None
def init(self, daemon, host, port, unixsocket=None):
log.info("starting thread pool socketserver")
@@ -143,6 +148,8 @@
self.pool = Pool()
self.housekeeper = Housekeeper(daemon)
self.housekeeper.start()
+ if self._selector:
+ self._selector.register(self.sock, selectors.EVENT_READ, self)
def __del__(self):
if self.sock is not None:
@@ -186,6 +193,10 @@
# all other (client) sockets are owned by their individual threads.
assert self.sock in eventsockets
try:
+ if self._selector:
+ events = self._selector.select(config.POLLTIMEOUT)
+ if not events:
+ return
csock, caddr = self.sock.accept()
if self.shutting_down:
csock.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/src/Pyro4/util.py new/Pyro4-4.76/src/Pyro4/util.py
--- old/Pyro4-4.75/src/Pyro4/util.py 2018-09-03 12:27:25.000000000 +0200
+++ new/Pyro4-4.76/src/Pyro4/util.py 2019-04-16 22:14:53.000000000 +0200
@@ -929,7 +929,7 @@
if is_private_attribute(m):
continue
v = getattr(obj, m)
- if inspect.ismethod(v) or inspect.isfunction(v):
+ if inspect.ismethod(v) or inspect.isfunction(v) or inspect.ismethoddescriptor(v):
if getattr(v, "_pyroExposed", not only_exposed):
methods.add(m)
# check if the method is marked with the 'oneway' decorator:
@@ -987,7 +987,8 @@
_private_dunder_methods = frozenset([
- "__init__", "__call__", "__new__", "__del__", "__repr__", "__unicode__",
+ "__init__", "__init_subclass__", "__class__", "__module__", "__weakref__",
+ "__call__", "__new__", "__del__", "__repr__", "__unicode__",
"__str__", "__format__", "__nonzero__", "__bool__", "__coerce__",
"__cmp__", "__eq__", "__ne__", "__hash__", "__ge__", "__gt__", "__le__", "__lt__",
"__dir__", "__enter__", "__exit__", "__copy__", "__deepcopy__", "__sizeof__",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/src/Pyro4.egg-info/PKG-INFO new/Pyro4-4.76/src/Pyro4.egg-info/PKG-INFO
--- old/Pyro4-4.75/src/Pyro4.egg-info/PKG-INFO 2019-01-19 13:16:41.000000000 +0100
+++ new/Pyro4-4.76/src/Pyro4.egg-info/PKG-INFO 2019-06-05 23:31:58.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: Pyro4
-Version: 4.75
+Version: 4.76
Summary: distributed object middleware for Python (RPC)
Home-page: http://pyro4.readthedocs.io
Author: Irmen de Jong
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/src/Pyro4.egg-info/SOURCES.txt new/Pyro4-4.76/src/Pyro4.egg-info/SOURCES.txt
--- old/Pyro4-4.75/src/Pyro4.egg-info/SOURCES.txt 2019-01-19 13:16:41.000000000 +0100
+++ new/Pyro4-4.76/src/Pyro4.egg-info/SOURCES.txt 2019-06-05 23:31:58.000000000 +0200
@@ -4,6 +4,11 @@
setup.cfg
setup.py
tox.ini
+certs/client_cert.pem
+certs/client_key.pem
+certs/readme.txt
+certs/server_cert.pem
+certs/server_key.pem
contrib/init.d/pyro4-nsd
docs/Makefile
docs/make.bat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/tests/PyroTests/test_daemon.py new/Pyro4-4.76/tests/PyroTests/test_daemon.py
--- old/Pyro4-4.75/tests/PyroTests/test_daemon.py 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/tests/PyroTests/test_daemon.py 2019-03-07 21:41:38.000000000 +0100
@@ -471,11 +471,8 @@
self.assertEqual("nathosttest:12345", uri.location)
uri = d.uriFor("object", nat=False)
self.assertNotEqual("nathosttest:12345", uri.location)
- try:
- _ = Pyro4.core.Daemon(nathost="bla")
- self.fail("expected error")
- except ValueError:
- pass
+ d = Pyro4.core.Daemon(nathost="bla")
+ self.assertTrue(d.natLocationStr.startswith("bla:"))
try:
_ = Pyro4.core.Daemon(natport=5555)
self.fail("expected error")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Pyro4-4.75/tests/PyroTests/test_socket.py new/Pyro4-4.76/tests/PyroTests/test_socket.py
--- old/Pyro4-4.75/tests/PyroTests/test_socket.py 2018-08-16 09:50:01.000000000 +0200
+++ new/Pyro4-4.76/tests/PyroTests/test_socket.py 2019-03-08 23:28:42.000000000 +0100
@@ -565,7 +565,9 @@
if not os.path.isdir(cert_dir):
cert_dir = "../certs"
if not os.path.isdir(cert_dir):
- self.fail("cannot locate test certs directory")
+ cert_dir = "./certs"
+ if not os.path.isdir(cert_dir):
+ self.fail("cannot locate test certs directory")
try:
config.SSL = True
config.SSL_REQUIRECLIENTCERT = True
1
0
Hello community,
here is the log from the commit of package python-PySocks for openSUSE:Factory checked in at 2019-09-30 15:55:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PySocks (Old)
and /work/SRC/openSUSE:Factory/.python-PySocks.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PySocks"
Mon Sep 30 15:55:11 2019 rev:7 rq:732897 version:1.7.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PySocks/python-PySocks.changes 2019-06-22 11:22:39.861288248 +0200
+++ /work/SRC/openSUSE:Factory/.python-PySocks.new.2352/python-PySocks.changes 2019-09-30 15:55:12.953884560 +0200
@@ -1,0 +2,6 @@
+Tue Sep 24 09:48:18 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.7.1:
+ * no changelog provided
+
+-------------------------------------------------------------------
Old:
----
PySocks-1.7.0.tar.gz
New:
----
PySocks-1.7.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PySocks.spec ++++++
--- /var/tmp/diff_new_pack.2CNWXx/_old 2019-09-30 15:55:13.413883336 +0200
+++ /var/tmp/diff_new_pack.2CNWXx/_new 2019-09-30 15:55:13.417883325 +0200
@@ -20,7 +20,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-PySocks
-Version: 1.7.0
+Version: 1.7.1
Release: 0
Summary: A Python SOCKS client module
License: BSD-3-Clause
++++++ PySocks-1.7.0.tar.gz -> PySocks-1.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PySocks-1.7.0/PKG-INFO new/PySocks-1.7.1/PKG-INFO
--- old/PySocks-1.7.0/PKG-INFO 2019-05-11 12:16:31.000000000 +0200
+++ new/PySocks-1.7.1/PKG-INFO 2019-09-20 04:06:52.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: PySocks
-Version: 1.7.0
+Version: 1.7.1
Summary: A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information.
Home-page: https://github.com/Anorov/PySocks
Author: Anorov
@@ -13,18 +13,14 @@
Acts as a drop-in replacement to the socket module. Seamlessly configure SOCKS proxies for any socket object by calling `socket_object.set_proxy()`.
- Status Update
- -------------
-
- I no longer have the time to actively work on this project. I will gladly accept thoughtful pull requests and continue to update here and on PyPI in response to PRs, but I won't be putting in any changes of my own other than version bumps. If anyone would like to take the project off of my hands, please email me or create an issue. Thanks.
-
----------------
Features
========
* SOCKS proxy client for Python 2.7 and 3.4+
- * TCP and UDP both supported
+ * TCP supported
+ * UDP mostly supported (issues may occur in some edge cases)
* HTTP proxy client included but not supported or recommended (you should use urllib2's or requests' own HTTP proxy interface)
* urllib2 handler included. `pip install` / `setup.py install` will automatically install the `sockshandler` module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PySocks-1.7.0/PySocks.egg-info/PKG-INFO new/PySocks-1.7.1/PySocks.egg-info/PKG-INFO
--- old/PySocks-1.7.0/PySocks.egg-info/PKG-INFO 2019-05-11 12:16:31.000000000 +0200
+++ new/PySocks-1.7.1/PySocks.egg-info/PKG-INFO 2019-09-20 04:06:52.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: PySocks
-Version: 1.7.0
+Version: 1.7.1
Summary: A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information.
Home-page: https://github.com/Anorov/PySocks
Author: Anorov
@@ -13,18 +13,14 @@
Acts as a drop-in replacement to the socket module. Seamlessly configure SOCKS proxies for any socket object by calling `socket_object.set_proxy()`.
- Status Update
- -------------
-
- I no longer have the time to actively work on this project. I will gladly accept thoughtful pull requests and continue to update here and on PyPI in response to PRs, but I won't be putting in any changes of my own other than version bumps. If anyone would like to take the project off of my hands, please email me or create an issue. Thanks.
-
----------------
Features
========
* SOCKS proxy client for Python 2.7 and 3.4+
- * TCP and UDP both supported
+ * TCP supported
+ * UDP mostly supported (issues may occur in some edge cases)
* HTTP proxy client included but not supported or recommended (you should use urllib2's or requests' own HTTP proxy interface)
* urllib2 handler included. `pip install` / `setup.py install` will automatically install the `sockshandler` module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PySocks-1.7.0/README.md new/PySocks-1.7.1/README.md
--- old/PySocks-1.7.0/README.md 2019-05-11 11:10:10.000000000 +0200
+++ new/PySocks-1.7.1/README.md 2019-09-20 03:58:31.000000000 +0200
@@ -5,18 +5,14 @@
Acts as a drop-in replacement to the socket module. Seamlessly configure SOCKS proxies for any socket object by calling `socket_object.set_proxy()`.
-Status Update
--------------
-
-I no longer have the time to actively work on this project. I will gladly accept thoughtful pull requests and continue to update here and on PyPI in response to PRs, but I won't be putting in any changes of my own other than version bumps. If anyone would like to take the project off of my hands, please email me or create an issue. Thanks.
-
----------------
Features
========
* SOCKS proxy client for Python 2.7 and 3.4+
-* TCP and UDP both supported
+* TCP supported
+* UDP mostly supported (issues may occur in some edge cases)
* HTTP proxy client included but not supported or recommended (you should use urllib2's or requests' own HTTP proxy interface)
* urllib2 handler included. `pip install` / `setup.py install` will automatically install the `sockshandler` module.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PySocks-1.7.0/socks.py new/PySocks-1.7.1/socks.py
--- old/PySocks-1.7.0/socks.py 2019-05-11 11:30:38.000000000 +0200
+++ new/PySocks-1.7.1/socks.py 2019-09-20 03:58:31.000000000 +0200
@@ -13,7 +13,7 @@
import struct
import sys
-__version__ = "1.7.0"
+__version__ = "1.7.1"
if os.name == "nt" and sys.version_info < (3, 0):
@@ -199,7 +199,7 @@
sock.connect((remote_host, remote_port))
return sock
- except (socket.error, ProxyConnectionError) as e:
+ except (socket.error, ProxyError) as e:
err = e
if sock:
sock.close()
@@ -844,4 +844,4 @@
proxy_port = proxy_port or DEFAULT_PORTS.get(proxy_type)
if not proxy_port:
raise GeneralProxyError("Invalid proxy type")
- return proxy_addr, proxy_port
\ No newline at end of file
+ return proxy_addr, proxy_port
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PySocks-1.7.0/sockshandler.py new/PySocks-1.7.1/sockshandler.py
--- old/PySocks-1.7.0/sockshandler.py 2019-05-11 11:10:10.000000000 +0200
+++ new/PySocks-1.7.1/sockshandler.py 2019-09-20 03:58:31.000000000 +0200
@@ -7,6 +7,7 @@
This module provides a Handler which you can use with urllib2 to allow it to tunnel your connection through a socks.sockssocket socket, with out monkey patching the original socket...
"""
+import socket
import ssl
try:
@@ -23,17 +24,45 @@
d.update(b)
return d
+def is_ip(s):
+ try:
+ if ':' in s:
+ socket.inet_pton(socket.AF_INET6, s)
+ elif '.' in s:
+ socket.inet_aton(s)
+ else:
+ return False
+ except:
+ return False
+ else:
+ return True
+
+socks4_no_rdns = set()
+
class SocksiPyConnection(httplib.HTTPConnection):
def __init__(self, proxytype, proxyaddr, proxyport=None, rdns=True, username=None, password=None, *args, **kwargs):
self.proxyargs = (proxytype, proxyaddr, proxyport, rdns, username, password)
httplib.HTTPConnection.__init__(self, *args, **kwargs)
def connect(self):
- self.sock = socks.socksocket()
- self.sock.setproxy(*self.proxyargs)
- if type(self.timeout) in (int, float):
- self.sock.settimeout(self.timeout)
- self.sock.connect((self.host, self.port))
+ (proxytype, proxyaddr, proxyport, rdns, username, password) = self.proxyargs
+ rdns = rdns and proxyaddr not in socks4_no_rdns
+ while True:
+ try:
+ sock = socks.create_connection(
+ (self.host, self.port), self.timeout, None,
+ proxytype, proxyaddr, proxyport, rdns, username, password,
+ ((socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),))
+ break
+ except socks.SOCKS4Error as e:
+ if rdns and "0x5b" in str(e) and not is_ip(self.host):
+ # Maybe a SOCKS4 server that doesn't support remote resolving
+ # Let's try again
+ rdns = False
+ socks4_no_rdns.add(proxyaddr)
+ else:
+ raise
+ self.sock = sock
class SocksiPyConnectionS(httplib.HTTPSConnection):
def __init__(self, proxytype, proxyaddr, proxyport=None, rdns=True, username=None, password=None, *args, **kwargs):
@@ -41,12 +70,15 @@
httplib.HTTPSConnection.__init__(self, *args, **kwargs)
def connect(self):
- sock = socks.socksocket()
- sock.setproxy(*self.proxyargs)
- if type(self.timeout) in (int, float):
- sock.settimeout(self.timeout)
- sock.connect((self.host, self.port))
- self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
+ SocksiPyConnection.connect(self)
+ self.sock = self._context.wrap_socket(self.sock, server_hostname=self.host)
+ if not self._context.check_hostname and self._check_hostname:
+ try:
+ ssl.match_hostname(self.sock.getpeercert(), self.host)
+ except Exception:
+ self.sock.shutdown(socket.SHUT_RDWR)
+ self.sock.close()
+ raise
class SocksiPyHandler(urllib2.HTTPHandler, urllib2.HTTPSHandler):
def __init__(self, *args, **kwargs):
1
0
Hello community,
here is the log from the commit of package python-Paste for openSUSE:Factory checked in at 2019-09-30 15:55:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Paste (Old)
and /work/SRC/openSUSE:Factory/.python-Paste.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Paste"
Mon Sep 30 15:55:02 2019 rev:23 rq:732889 version:3.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Paste/python-Paste.changes 2019-08-06 15:07:53.263870920 +0200
+++ /work/SRC/openSUSE:Factory/.python-Paste.new.2352/python-Paste.changes 2019-09-30 15:55:06.709901178 +0200
@@ -1,0 +2,8 @@
+Tue Sep 24 09:25:15 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 3.2.0:
+ * Ensure unicode URLs work in TestApp.
+ * Make LimitedLengthFile file return empty bytes.
+ * Protect against accidental close in FieldStorage.
+
+-------------------------------------------------------------------
Old:
----
Paste-3.1.0.tar.gz
New:
----
Paste-3.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Paste.spec ++++++
--- /var/tmp/diff_new_pack.ruP1GV/_old 2019-09-30 15:55:07.709898516 +0200
+++ /var/tmp/diff_new_pack.ruP1GV/_new 2019-09-30 15:55:07.709898516 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-Paste
-Version: 3.1.0
+Version: 3.2.0
Release: 0
Summary: Tools for using a Web Server Gateway Interface stack
License: MIT
@@ -33,12 +33,12 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-six > 1.4.0
-BuildArch: noarch
Suggests: python-flup
+BuildArch: noarch
%ifpython2
+Suggests: python-python-openid
Provides: %{oldpython}-paste = %{version}
Obsoletes: %{oldpython}-paste < %{version}
-Suggests: python-python-openid
%endif
%ifpython3
Suggests: python3-python3-openid
@@ -66,7 +66,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v
+%pytest
%files %{python_files}
%license docs/license.txt
++++++ Paste-3.1.0.tar.gz -> Paste-3.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/PKG-INFO new/Paste-3.2.0/PKG-INFO
--- old/Paste-3.1.0/PKG-INFO 2019-07-24 12:54:34.000000000 +0200
+++ new/Paste-3.2.0/PKG-INFO 2019-09-05 12:31:04.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Paste
-Version: 3.1.0
+Version: 3.2.0
Summary: Tools for using a Web Server Gateway Interface stack
Home-page: https://pythonpaste.readthedocs.io/
Author: Chris Dent
@@ -130,8 +130,8 @@
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
Classifier: Framework :: Paste
+Provides-Extra: openid
Provides-Extra: Flup
+Provides-Extra: hotshot
Provides-Extra: subprocess
Provides-Extra: Paste
-Provides-Extra: hotshot
-Provides-Extra: openid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/Paste.egg-info/PKG-INFO new/Paste-3.2.0/Paste.egg-info/PKG-INFO
--- old/Paste-3.1.0/Paste.egg-info/PKG-INFO 2019-07-24 12:54:34.000000000 +0200
+++ new/Paste-3.2.0/Paste.egg-info/PKG-INFO 2019-09-05 12:31:04.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Paste
-Version: 3.1.0
+Version: 3.2.0
Summary: Tools for using a Web Server Gateway Interface stack
Home-page: https://pythonpaste.readthedocs.io/
Author: Chris Dent
@@ -130,8 +130,8 @@
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
Classifier: Framework :: Paste
+Provides-Extra: openid
Provides-Extra: Flup
+Provides-Extra: hotshot
Provides-Extra: subprocess
Provides-Extra: Paste
-Provides-Extra: hotshot
-Provides-Extra: openid
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/docs/news.txt new/Paste-3.2.0/docs/news.txt
--- old/Paste-3.1.0/docs/news.txt 2019-07-24 12:51:47.000000000 +0200
+++ new/Paste-3.2.0/docs/news.txt 2019-09-05 12:27:36.000000000 +0200
@@ -3,6 +3,21 @@
.. contents::
+3.2.0
+-----
+
+* Ensure unicode URLs work in TestApp.
+* Make LimitedLengthFile file return empty bytes.
+* Protect against accidental close in FieldStorage.
+
+Thanks to benjaminp for many recent contributions.
+
+
+3.1.1
+-----
+
+* TestApp.encode_multipart handles bytes filenames and params.
+
3.1.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/paste/fixture.py new/Paste-3.2.0/paste/fixture.py
--- old/Paste-3.1.0/paste/fixture.py 2018-10-31 10:57:07.000000000 +0100
+++ new/Paste-3.2.0/paste/fixture.py 2019-09-05 12:21:52.000000000 +0200
@@ -235,6 +235,7 @@
environ['CONTENT_TYPE'] = content_type
elif params:
environ.setdefault('CONTENT_TYPE', 'application/x-www-form-urlencoded')
+ url = str(url)
if '?' in url:
url, environ['QUERY_STRING'] = url.split('?', 1)
else:
@@ -330,28 +331,20 @@
lines = []
for key, value in params:
lines.append(b'--'+boundary)
- line = 'Content-Disposition: form-data; name="%s"' % key
- if six.PY3:
- line = line.encode('utf8')
+ line = b'Content-Disposition: form-data; name="%s"' % six.ensure_binary(key)
lines.append(line)
lines.append(b'')
- line = value
- if six.PY3 and isinstance(line, six.text_type):
- line = line.encode('utf8')
+ line = six.ensure_binary(value)
lines.append(line)
for file_info in files:
key, filename, value = self._get_file_info(file_info)
lines.append(b'--'+boundary)
- line = ('Content-Disposition: form-data; name="%s"; filename="%s"'
- % (key, filename))
- if six.PY3:
- line = line.encode('utf8')
+ line = (b'Content-Disposition: form-data; name="%s"; filename="%s"'
+ % (six.ensure_binary(key), six.ensure_binary(filename)))
lines.append(line)
- fcontent = mimetypes.guess_type(filename)[0]
- line = ('Content-Type: %s'
- % (fcontent or 'application/octet-stream'))
- if six.PY3:
- line = line.encode('utf8')
+ fcontent = mimetypes.guess_type(six.ensure_str(filename, 'ascii', 'ignore'))[0]
+ line = (b'Content-Type: %s'
+ % (fcontent.encode('ascii') if fcontent else b'application/octet-stream'))
lines.append(line)
lines.append(b'')
lines.append(value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/paste/httpserver.py new/Paste-3.2.0/paste/httpserver.py
--- old/Paste-3.1.0/paste/httpserver.py 2019-07-24 12:46:25.000000000 +0200
+++ new/Paste-3.2.0/paste/httpserver.py 2019-09-05 12:21:52.000000000 +0200
@@ -487,7 +487,7 @@
length = min(length, left)
# next two lines are hnecessary only if read(0) blocks
if not left:
- return ''
+ return b''
data = self.file.read(length)
self._consumed += len(data)
return data
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/paste/util/multidict.py new/Paste-3.2.0/paste/util/multidict.py
--- old/Paste-3.1.0/paste/util/multidict.py 2019-07-24 12:46:25.000000000 +0200
+++ new/Paste-3.2.0/paste/util/multidict.py 2019-09-05 12:21:52.000000000 +0200
@@ -265,11 +265,13 @@
"""
if isinstance(value, cgi.FieldStorage):
# decode FieldStorage's field name and filename
- value = copy.copy(value)
- if self.decode_keys and isinstance(value.name, six.binary_type):
- value.name = value.name.decode(self.encoding, self.errors)
- if six.PY2:
- value.filename = value.filename.decode(self.encoding, self.errors)
+ decode_name = self.decode_keys and isinstance(value.name, six.binary_type)
+ if six.PY2 or decode_name:
+ value = copy.copy(value)
+ if decode_name:
+ value.name = value.name.decode(self.encoding, self.errors)
+ if six.PY2:
+ value.filename = value.filename.decode(self.encoding, self.errors)
else:
try:
value = value.decode(self.encoding, self.errors)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/setup.py new/Paste-3.2.0/setup.py
--- old/Paste-3.1.0/setup.py 2019-07-24 12:48:35.000000000 +0200
+++ new/Paste-3.2.0/setup.py 2019-09-05 12:22:38.000000000 +0200
@@ -12,7 +12,7 @@
# - git push
# - python setup.py sdist bdist_wheel upload --sign
-__version__ = '3.1.0'
+__version__ = '3.2.0'
from setuptools import setup, find_packages
import sys, os
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/tests/test_fixture.py new/Paste-3.2.0/tests/test_fixture.py
--- old/Paste-3.1.0/tests/test_fixture.py 2018-10-31 10:57:07.000000000 +0100
+++ new/Paste-3.2.0/tests/test_fixture.py 2019-09-05 12:21:52.000000000 +0200
@@ -1,5 +1,8 @@
+import cgi
+
from paste.debug.debugapp import SimpleApplication, SlowConsumer
from paste.fixture import TestApp
+from paste.wsgiwrappers import WSGIRequest
def test_fixture():
@@ -44,3 +47,35 @@
('Content-Length', str(len(body)))])
return [body]
TestApp(response).get('/')
+
+def test_params_and_upload_files():
+ class PostApp(object):
+ def __call__(self, environ, start_response):
+ start_response("204 No content", [])
+ self.request = WSGIRequest(environ)
+ return [b'']
+ post_app = PostApp()
+ app = TestApp(post_app)
+ app.post(
+ '/',
+ params={'param1': 'a', 'param2': 'b'},
+ upload_files=[
+ ('file1', 'myfile.txt', b'data1'),
+ ('file2', b'yourfile.txt', b'data2'),
+ ],
+ )
+ params = post_app.request.params
+ assert len(params) == 4
+ assert params['param1'] == 'a'
+ assert params['param2'] == 'b'
+ assert params['file1'].value == b'data1'
+ assert params['file1'].filename == 'myfile.txt'
+ assert params['file2'].value == b'data2'
+ assert params['file2'].filename == 'yourfile.txt'
+
+def test_unicode_path():
+ app = TestApp(SimpleApplication())
+ app.get(u"/?")
+ app.post(u"/?")
+ app.put(u"/?")
+ app.delete(u"/?")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/tests/test_httpserver.py new/Paste-3.2.0/tests/test_httpserver.py
--- old/Paste-3.1.0/tests/test_httpserver.py 2018-10-24 15:03:13.000000000 +0200
+++ new/Paste-3.2.0/tests/test_httpserver.py 2019-09-05 12:21:52.000000000 +0200
@@ -1,6 +1,7 @@
import email
+import io
-from paste.httpserver import WSGIHandler
+from paste.httpserver import LimitedLengthFile, WSGIHandler
from six.moves import StringIO
@@ -43,3 +44,10 @@
wsgi_handler.wsgi_setup()
assert wsgi_handler.wsgi_environ['HTTP_HOST'] == 'host1,host2'
+
+
+def test_limited_length_file():
+ backing = io.BytesIO(b'0123456789')
+ f = LimitedLengthFile(backing, 9)
+ assert f.read() == b'012345678'
+ assert f.read() == b''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/tests/test_multidict.py new/Paste-3.2.0/tests/test_multidict.py
--- old/Paste-3.1.0/tests/test_multidict.py 2018-10-24 15:03:13.000000000 +0200
+++ new/Paste-3.2.0/tests/test_multidict.py 2019-09-05 12:21:52.000000000 +0200
@@ -2,10 +2,11 @@
# (c) 2007 Ian Bicking and Philip Jenvey; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
import cgi
+import gc
+import io
import pytest
import six
-from six.moves import StringIO
from paste.util.multidict import MultiDict, UnicodeMultiDict
@@ -149,14 +150,16 @@
fs = cgi.FieldStorage()
fs.name = 'thefile'
fs.filename = 'hello.txt'
- fs.file = StringIO('hello')
+ fs.file = io.BytesIO(b'hello')
d[k('f')] = fs
ufs = d[k('f')]
assert isinstance(ufs, cgi.FieldStorage)
- assert ufs is not fs
assert ufs.name == fs.name
assert isinstance(ufs.name, str if six.PY3 else key_str)
assert ufs.filename == fs.filename
assert isinstance(ufs.filename, six.text_type)
- assert isinstance(ufs.value, str)
- assert ufs.value == 'hello'
+ assert isinstance(ufs.value, bytes)
+ assert ufs.value == b'hello'
+ ufs = None
+ gc.collect()
+ assert not fs.file.closed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Paste-3.1.0/tests/test_wsgiwrappers.py new/Paste-3.2.0/tests/test_wsgiwrappers.py
--- old/Paste-3.1.0/tests/test_wsgiwrappers.py 2019-07-24 12:46:25.000000000 +0200
+++ new/Paste-3.2.0/tests/test_wsgiwrappers.py 2019-09-05 12:21:52.000000000 +0200
@@ -96,7 +96,7 @@
return []
app = TestApp(handle_fileupload)
- res = app.post('/', upload_files=[('thefile', '寿司.txt', b'Sushi')])
+ res = app.post('/', upload_files=[('thefile', u'寿司.txt'.encode('utf-8'), b'Sushi')])
def test_wsgiresponse_charset():
response = WSGIResponse(mimetype='text/html; charset=UTF-8')
1
0
Hello community,
here is the log from the commit of package python-Logbook for openSUSE:Factory checked in at 2019-09-30 15:54:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Logbook (Old)
and /work/SRC/openSUSE:Factory/.python-Logbook.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Logbook"
Mon Sep 30 15:54:40 2019 rev:5 rq:732888 version:1.5.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Logbook/python-Logbook.changes 2019-09-23 12:17:31.241805673 +0200
+++ /work/SRC/openSUSE:Factory/.python-Logbook.new.2352/python-Logbook.changes 2019-09-30 15:54:50.397944588 +0200
@@ -1,0 +2,6 @@
+Tue Sep 24 09:17:59 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.5.2:
+ * Added support for asyncio and contextvars
+
+-------------------------------------------------------------------
Old:
----
Logbook-1.4.3.tar.gz
New:
----
Logbook-1.5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Logbook.spec ++++++
--- /var/tmp/diff_new_pack.wKJUYU/_old 2019-09-30 15:54:53.249936998 +0200
+++ /var/tmp/diff_new_pack.wKJUYU/_new 2019-09-30 15:54:53.257936976 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-Logbook
-Version: 1.4.3
+Version: 1.5.2
Release: 0
Summary: A logging replacement for Python
License: BSD-3-Clause
@@ -33,11 +33,12 @@
BuildRequires: %{python_module execnet >= 1.0.9}
BuildRequires: %{python_module gevent}
BuildRequires: %{python_module pip}
+BuildRequires: %{python_module pytest >= 4.0}
BuildRequires: %{python_module pytest-cov}
-BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pyzmq}
BuildRequires: %{python_module redis}
BuildRequires: %{python_module setuptools}
+BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: python-mock
BuildRequires: python-rpm-macros
@@ -56,7 +57,7 @@
%prep
%setup -q -n Logbook-%{version}
-sed -i 's/\r$//' LICENSE
+dos2unix LICENSE
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
@@ -72,8 +73,9 @@
%check
export CFLAGS="%{optflags}"
%{_sbindir}/redis-server &
-%python_exec -m pytest
-kill %1
+# test_asyncio_context_management seems to fail in OBS
+%pytest -k 'not test_asyncio_context_management'
+kill %%1
%files %{python_files}
%license LICENSE
++++++ Logbook-1.4.3.tar.gz -> Logbook-1.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/CHANGES new/Logbook-1.5.2/CHANGES
--- old/Logbook-1.4.3/CHANGES 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/CHANGES 2019-08-21 06:33:30.000000000 +0200
@@ -1,6 +1,13 @@
Logbook Changelog
=================
+Version 1.5.1
+-------------
+
+Released on August 20th, 2019
+
+- Added support for asyncio and contextvars
+
Version 1.4.3
-------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/Logbook.egg-info/PKG-INFO new/Logbook-1.5.2/Logbook.egg-info/PKG-INFO
--- old/Logbook-1.4.3/Logbook.egg-info/PKG-INFO 2019-01-16 21:35:24.000000000 +0100
+++ new/Logbook-1.5.2/Logbook.egg-info/PKG-INFO 2019-08-21 06:34:20.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Logbook
-Version: 1.4.3
+Version: 1.5.2
Summary: A logging replacement for Python
Home-page: http://logbook.pocoo.org/
Author: Armin Ronacher, Georg Brandl
@@ -64,12 +64,12 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Provides-Extra: dev
Provides-Extra: test
-Provides-Extra: jinja
Provides-Extra: zmq
-Provides-Extra: redis
Provides-Extra: execnet
-Provides-Extra: all
Provides-Extra: compression
+Provides-Extra: jinja
+Provides-Extra: redis
Provides-Extra: sqlalchemy
-Provides-Extra: dev
+Provides-Extra: all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/Logbook.egg-info/SOURCES.txt new/Logbook-1.5.2/Logbook.egg-info/SOURCES.txt
--- old/Logbook-1.4.3/Logbook.egg-info/SOURCES.txt 2019-01-16 21:35:24.000000000 +0100
+++ new/Logbook-1.5.2/Logbook.egg-info/SOURCES.txt 2019-08-21 06:34:20.000000000 +0200
@@ -30,6 +30,7 @@
scripts/test_setup.py
tests/__init__.py
tests/conftest.py
+tests/test_asyncio.py
tests/test_ci.py
tests/test_deadlock.py
tests/test_file_handler.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/Logbook.egg-info/requires.txt new/Logbook-1.5.2/Logbook.egg-info/requires.txt
--- old/Logbook-1.4.3/Logbook.egg-info/requires.txt 2019-01-16 21:35:24.000000000 +0100
+++ new/Logbook-1.5.2/Logbook.egg-info/requires.txt 2019-08-21 06:34:20.000000000 +0200
@@ -1,14 +1,14 @@
[all]
-pytest>4.0
-execnet>=1.0.9
-Jinja2
brotli
-redis
-cython
pytest-cov>=2.6
+cython
pyzmq
+redis
+execnet>=1.0.9
sqlalchemy
+Jinja2
+pytest>4.0
[compression]
brotli
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/PKG-INFO new/Logbook-1.5.2/PKG-INFO
--- old/Logbook-1.4.3/PKG-INFO 2019-01-16 21:35:25.000000000 +0100
+++ new/Logbook-1.5.2/PKG-INFO 2019-08-21 06:34:20.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Logbook
-Version: 1.4.3
+Version: 1.5.2
Summary: A logging replacement for Python
Home-page: http://logbook.pocoo.org/
Author: Armin Ronacher, Georg Brandl
@@ -64,12 +64,12 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Provides-Extra: dev
Provides-Extra: test
-Provides-Extra: jinja
Provides-Extra: zmq
-Provides-Extra: redis
Provides-Extra: execnet
-Provides-Extra: all
Provides-Extra: compression
+Provides-Extra: jinja
+Provides-Extra: redis
Provides-Extra: sqlalchemy
-Provides-Extra: dev
+Provides-Extra: all
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/README.md new/Logbook-1.5.2/README.md
--- old/Logbook-1.4.3/README.md 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/README.md 2019-08-21 06:33:30.000000000 +0200
@@ -22,10 +22,10 @@
[ti]: https://secure.travis-ci.org/getlogbook/logbook.svg?branch=master
[tl]: https://travis-ci.org/getlogbook/logbook
[ai]: https://ci.appveyor.com/api/projects/status/quu99exa26e06npp?svg=true
-[vi]: https://img.shields.io/badge/python-2.6%2C2.7%2C3.3%2C3.4%2C3.5-green.svg
+[vi]: https://img.shields.io/badge/python-2.7%2C3.5%2C3.6%2C3.7-green.svg
[di]: https://img.shields.io/pypi/dm/logbook.svg
[al]: https://ci.appveyor.com/project/vmalloc/logbook
[pi]: https://img.shields.io/pypi/v/logbook.svg
-[pl]: https://pypi.python.org/pypi/Logbook
+[pl]: https://pypi.org/pypi/Logbook
[ci]: https://coveralls.io/repos/getlogbook/logbook/badge.svg?branch=master&servi…
[cl]: https://coveralls.io/github/getlogbook/logbook?branch=master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/logbook/__version__.py new/Logbook-1.5.2/logbook/__version__.py
--- old/Logbook-1.4.3/logbook/__version__.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/logbook/__version__.py 2019-08-21 06:33:30.000000000 +0200
@@ -1 +1 @@
-__version__ = "1.4.3"
+__version__ = "1.5.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/logbook/_fallback.py new/Logbook-1.5.2/logbook/_fallback.py
--- old/Logbook-1.4.3/logbook/_fallback.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/logbook/_fallback.py 2019-08-21 06:33:30.000000000 +0200
@@ -12,7 +12,8 @@
from logbook.helpers import get_iterator_next_method
from logbook.concurrency import (
thread_get_ident, greenlet_get_ident, thread_local, greenlet_local,
- ThreadLock, GreenletRLock, is_gevent_enabled)
+ ThreadLock, GreenletRLock, is_gevent_enabled, ContextVar, context_get_ident,
+ is_context_enabled)
_missing = object()
_MAX_CONTEXT_OBJECT_CACHE = 256
@@ -67,6 +68,14 @@
"""Pops the stacked object from the greenlet stack."""
raise NotImplementedError()
+ def push_context(self):
+ """Pushes the stacked object to the context stack."""
+ raise NotImplementedError()
+
+ def pop_context(self):
+ """Pops the stacked object from the context stack."""
+ raise NotImplementedError()
+
def push_thread(self):
"""Pushes the stacked object to the thread stack."""
raise NotImplementedError()
@@ -102,6 +111,13 @@
"""
return _cls(self, self.push_greenlet, self.pop_greenlet)
+ def contextbound(self, _cls=_StackBound):
+ """Can be used in combination with the `with` statement to
+ execute code while the object is bound to the concurrent
+ context.
+ """
+ return _cls(self, self.push_context, self.pop_context)
+
def threadbound(self, _cls=_StackBound):
"""Can be used in combination with the `with` statement to
execute code while the object is bound to the thread.
@@ -126,6 +142,7 @@
self._thread_context = thread_local()
self._greenlet_context_lock = GreenletRLock()
self._greenlet_context = greenlet_local()
+ self._context_stack = ContextVar('stack')
self._cache = {}
self._stackop = get_iterator_next_method(count())
@@ -134,15 +151,28 @@
application and context cache.
"""
use_gevent = is_gevent_enabled()
- tid = greenlet_get_ident() if use_gevent else thread_get_ident()
+ use_context = is_context_enabled()
+
+ if use_gevent:
+ tid = greenlet_get_ident()
+ elif use_context:
+ tid = context_get_ident()
+ else:
+ tid = thread_get_ident()
+
objects = self._cache.get(tid)
if objects is None:
if len(self._cache) > _MAX_CONTEXT_OBJECT_CACHE:
self._cache.clear()
objects = self._global[:]
objects.extend(getattr(self._thread_context, 'stack', ()))
+
if use_gevent:
objects.extend(getattr(self._greenlet_context, 'stack', ()))
+
+ if use_context:
+ objects.extend(self._context_stack.get([]))
+
objects.sort(reverse=True)
objects = [x[1] for x in objects]
self._cache[tid] = objects
@@ -173,6 +203,22 @@
finally:
self._greenlet_context_lock.release()
+ def push_context(self, obj):
+ self._cache.pop(context_get_ident(), None)
+ item = (self._stackop(), obj)
+ stack = self._context_stack.get(None)
+ if stack is None:
+ stack = [item]
+ self._context_stack.set(stack)
+ else:
+ stack.append(item)
+
+ def pop_context(self):
+ self._cache.pop(context_get_ident(), None)
+ stack = self._context_stack.get(None)
+ assert stack, 'no objects on stack'
+ return stack.pop()[1]
+
def push_thread(self, obj):
self._thread_context_lock.acquire()
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/logbook/_speedups.pyx new/Logbook-1.5.2/logbook/_speedups.pyx
--- old/Logbook-1.4.3/logbook/_speedups.pyx 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/logbook/_speedups.pyx 2019-08-21 06:33:30.000000000 +0200
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+# cython: language_level=2
"""
logbook._speedups
~~~~~~~~~~~~~~~~~
@@ -9,17 +10,17 @@
:license: BSD, see LICENSE for more details.
"""
-import platform
+
from logbook.concurrency import (is_gevent_enabled, thread_get_ident, greenlet_get_ident, thread_local,
- GreenletRLock, greenlet_local)
+ GreenletRLock, greenlet_local, ContextVar, context_get_ident, is_context_enabled)
from cpython.dict cimport PyDict_Clear, PyDict_SetItem
-from cpython.list cimport PyList_New, PyList_Append, PyList_Sort, \
- PyList_SET_ITEM, PyList_GET_SIZE
+from cpython.list cimport PyList_Append, PyList_Sort, PyList_GET_SIZE
+
from cpython.pythread cimport PyThread_type_lock, PyThread_allocate_lock, \
PyThread_release_lock, PyThread_acquire_lock, WAIT_LOCK
-cdef object _missing = object()
+_missing = object()
cdef enum:
_MAX_CONTEXT_OBJECT_CACHE = 256
@@ -40,7 +41,7 @@
def __get__(self, obj, type):
if obj is None:
return self
- rv = getattr3(obj, self._name, _missing)
+ rv = getattr(obj, self._name, _missing)
if rv is not _missing and rv != self.fallback:
return rv
if obj.group is None:
@@ -96,9 +97,16 @@
cdef class StackedObject:
- """Baseclass for all objects that provide stack manipulation
+ """Base class for all objects that provide stack manipulation
operations.
"""
+ cpdef push_context(self):
+ """Pushes the stacked object to the asyncio (via contextvar) stack."""
+ raise NotImplementedError()
+
+ cpdef pop_context(self):
+ """Pops the stacked object from the asyncio (via contextvar) stack."""
+ raise NotImplementedError()
cpdef push_greenlet(self):
"""Pushes the stacked object to the greenlet stack."""
@@ -155,6 +163,12 @@
"""
return _StackBound(self, self.push_application, self.pop_application)
+ cpdef contextbound(self):
+ """Can be used in combination with the `with` statement to
+ execute code while the object is bound to the asyncio context.
+ """
+ return _StackBound(self, self.push_context, self.pop_context)
+
cdef class ContextStackManager:
cdef list _global
@@ -162,6 +176,7 @@
cdef object _thread_context
cdef object _greenlet_context_lock
cdef object _greenlet_context
+ cdef object _context_stack
cdef dict _cache
cdef int _stackcnt
@@ -171,6 +186,7 @@
self._thread_context = thread_local()
self._greenlet_context_lock = GreenletRLock()
self._greenlet_context = greenlet_local()
+ self._context_stack = ContextVar('stack')
self._cache = {}
self._stackcnt = 0
@@ -180,15 +196,28 @@
cpdef iter_context_objects(self):
use_gevent = is_gevent_enabled()
- tid = greenlet_get_ident() if use_gevent else thread_get_ident()
+ use_context = is_context_enabled()
+
+ if use_gevent:
+ tid = greenlet_get_ident()
+ elif use_context:
+ tid = context_get_ident()
+ else:
+ tid = thread_get_ident()
+
objects = self._cache.get(tid)
if objects is None:
if PyList_GET_SIZE(self._cache) > _MAX_CONTEXT_OBJECT_CACHE:
PyDict_Clear(self._cache)
objects = self._global[:]
- objects.extend(getattr3(self._thread_context, 'stack', ()))
+ objects.extend(getattr(self._thread_context, 'stack', ()))
+
if use_gevent:
- objects.extend(getattr3(self._greenlet_context, 'stack', ()))
+ objects.extend(getattr(self._greenlet_context, 'stack', ()))
+
+ if use_context:
+ objects.extend(self._context_stack.get([]))
+
PyList_Sort(objects)
objects = [(<_StackItem>x).val for x in objects]
PyDict_SetItem(self._cache, tid, objects)
@@ -199,7 +228,7 @@
try:
self._cache.pop(greenlet_get_ident(), None)
item = _StackItem(self._stackop(), obj)
- stack = getattr3(self._greenlet_context, 'stack', None)
+ stack = getattr(self._greenlet_context, 'stack', None)
if stack is None:
self._greenlet_context.stack = [item]
else:
@@ -211,18 +240,35 @@
self._greenlet_context_lock.acquire()
try:
self._cache.pop(greenlet_get_ident(), None)
- stack = getattr3(self._greenlet_context, 'stack', None)
+ stack = getattr(self._greenlet_context, 'stack', None)
assert stack, 'no objects on stack'
return (<_StackItem>stack.pop()).val
finally:
self._greenlet_context_lock.release()
+ cpdef push_context(self, obj):
+ self._cache.pop(context_get_ident(), None)
+ item = _StackItem(self._stackop(), obj)
+ stack = self._context_stack.get(None)
+
+ if stack is None:
+ stack = [item]
+ self._context_stack.set(stack)
+ else:
+ PyList_Append(stack, item)
+
+ cpdef pop_context(self):
+ self._cache.pop(context_get_ident(), None)
+ stack = self._context_stack.get(None)
+ assert stack, 'no objects on stack'
+ return (<_StackItem>stack.pop()).val
+
cpdef push_thread(self, obj):
PyThread_acquire_lock(self._thread_context_lock, WAIT_LOCK)
try:
self._cache.pop(thread_get_ident(), None)
item = _StackItem(self._stackop(), obj)
- stack = getattr3(self._thread_context, 'stack', None)
+ stack = getattr(self._thread_context, 'stack', None)
if stack is None:
self._thread_context.stack = [item]
else:
@@ -234,7 +280,7 @@
PyThread_acquire_lock(self._thread_context_lock, WAIT_LOCK)
try:
self._cache.pop(thread_get_ident(), None)
- stack = getattr3(self._thread_context, 'stack', None)
+ stack = getattr(self._thread_context, 'stack', None)
assert stack, 'no objects on stack'
return (<_StackItem>stack.pop()).val
finally:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/logbook/base.py new/Logbook-1.5.2/logbook/base.py
--- old/Logbook-1.4.3/logbook/base.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/logbook/base.py 2019-08-21 06:33:30.000000000 +0200
@@ -23,9 +23,15 @@
parse_iso8601, string_types, to_safe_json, u,
xrange)
+_has_speedups = False
try:
+ if os.environ.get('DISABLE_LOGBOOK_CEXT_AT_RUNTIME'):
+ raise ImportError("Speedups disabled via DISABLE_LOGBOOK_CEXT_AT_RUNTIME")
+
from logbook._speedups import (
_missing, group_reflected_property, ContextStackManager, StackedObject)
+
+ _has_speedups = True
except ImportError:
from logbook._fallback import (
_missing, group_reflected_property, ContextStackManager, StackedObject)
@@ -73,7 +79,7 @@
logbook.set_datetime_format("local")
Other uses rely on your supplied :py:obj:`datetime_format`.
- Using `pytz <https://pypi.python.org/pypi/pytz>`_ for example::
+ Using `pytz <https://pypi.org/pypi/pytz>`_ for example::
from datetime import datetime
import logbook
@@ -206,6 +212,15 @@
popped = self.stack_manager.pop_greenlet()
assert popped is self, 'popped unexpected object'
+ def push_context(self):
+ """Pushes the context object to the context stack."""
+ self.stack_manager.push_context(self)
+
+ def pop_context(self):
+ """Pops the context object from the stack."""
+ popped = self.stack_manager.pop_context()
+ assert popped is self, 'popped unexpected object'
+
def push_thread(self):
"""Pushes the context object to the thread stack."""
self.stack_manager.push_thread(self)
@@ -257,6 +272,14 @@
for obj in reversed(self.objects):
obj.pop_greenlet()
+ def push_context(self):
+ for obj in self.objects:
+ obj.push_context()
+
+ def pop_context(self):
+ for obj in reversed(self.objects):
+ obj.pop_context()
+
class Processor(ContextObject):
"""Can be pushed to a stack to inject additional information into
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/logbook/concurrency.py new/Logbook-1.5.2/logbook/concurrency.py
--- old/Logbook-1.4.3/logbook/concurrency.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/logbook/concurrency.py 2019-08-21 06:33:30.000000000 +0200
@@ -164,3 +164,53 @@
return GreenletRLock()
else:
return ThreadRLock()
+
+
+has_contextvars = True
+try:
+ import contextvars
+except ImportError:
+ has_contextvars = False
+
+if has_contextvars:
+ from contextvars import ContextVar
+ from itertools import count
+
+ context_ident_counter = count()
+ context_ident = ContextVar('context_ident')
+
+ def context_get_ident():
+ try:
+ return context_ident.get()
+ except LookupError:
+ ident = 'context-%s' % next(context_ident_counter)
+ context_ident.set(ident)
+ return ident
+
+ def is_context_enabled():
+ try:
+ context_ident.get()
+ return True
+ except LookupError:
+ return False
+
+else:
+ class ContextVar(object):
+ def __init__(self, name):
+ self.name = name
+ self.local = thread_local()
+
+ def set(self, value):
+ self.local = value
+
+ def get(self, default=None):
+ if self.local is None:
+ return default
+
+ return default
+
+ def context_get_ident():
+ return 1
+
+ def is_context_enabled():
+ return False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/logbook/handlers.py new/Logbook-1.5.2/logbook/handlers.py
--- old/Logbook-1.4.3/logbook/handlers.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/logbook/handlers.py 2019-08-21 06:33:30.000000000 +0200
@@ -1900,6 +1900,10 @@
Handler.pop_thread(self)
self.rollover()
+ def pop_context(self):
+ Handler.pop_context(self)
+ self.rollover()
+
def pop_greenlet(self):
Handler.pop_greenlet(self)
self.rollover()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/logbook/more.py new/Logbook-1.5.2/logbook/more.py
--- old/Logbook-1.4.3/logbook/more.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/logbook/more.py 2019-08-21 06:33:30.000000000 +0200
@@ -327,7 +327,7 @@
.. versionchanged:: 1.0.0
Added Windows support if `colorama`_ is installed.
- .. _`colorama`: https://pypi.python.org/pypi/colorama
+ .. _`colorama`: https://pypi.org/pypi/colorama
"""
_use_color = None
@@ -383,7 +383,7 @@
.. versionchanged:: 1.0
Added Windows support if `colorama`_ is installed.
- .. _`colorama`: https://pypi.python.org/pypi/colorama
+ .. _`colorama`: https://pypi.org/pypi/colorama
"""
def __init__(self, *args, **kwargs):
StderrHandler.__init__(self, *args, **kwargs)
@@ -473,6 +473,10 @@
Handler.pop_thread(self)
self.flush()
+ def pop_context(self):
+ Handler.pop_context(self)
+ self.flush()
+
def pop_greenlet(self):
Handler.pop_greenlet(self)
self.flush()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/logbook/queues.py new/Logbook-1.5.2/logbook/queues.py
--- old/Logbook-1.4.3/logbook/queues.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/logbook/queues.py 2019-08-21 06:33:30.000000000 +0200
@@ -604,7 +604,10 @@
queue and sends it to a handler. Both queue and handler are
taken from the passed :class:`ThreadedWrapperHandler`.
"""
- _sentinel = object()
+ class Command(object):
+ stop = object()
+ emit = object()
+ emit_batch = object()
def __init__(self, wrapper_handler):
self.wrapper_handler = wrapper_handler
@@ -621,17 +624,23 @@
def stop(self):
"""Stops the task thread."""
if self.running:
- self.wrapper_handler.queue.put_nowait(self._sentinel)
+ self.wrapper_handler.queue.put_nowait((self.Command.stop, ))
self._thread.join()
self._thread = None
def _target(self):
while 1:
- record = self.wrapper_handler.queue.get()
- if record is self._sentinel:
+ item = self.wrapper_handler.queue.get()
+ command, data = item[0], item[1:]
+ if command is self.Command.stop:
self.running = False
break
- self.wrapper_handler.handler.handle(record)
+ elif command is self.Command.emit:
+ (record, ) = data
+ self.wrapper_handler.handler.emit(record)
+ elif command is self.Command.emit_batch:
+ record, reason = data
+ self.wrapper_handler.handler.emit_batch(record, reason)
class ThreadedWrapperHandler(WrapperHandler):
@@ -663,8 +672,17 @@
self.handler.close()
def emit(self, record):
+ item = (TWHThreadController.Command.emit, record)
try:
- self.queue.put_nowait(record)
+ self.queue.put_nowait(item)
+ except Full:
+ # silently drop
+ pass
+
+ def emit_batch(self, records, reason):
+ item = (TWHThreadController.Command.emit_batch, records, reason)
+ try:
+ self.queue.put_nowait(item)
except Full:
# silently drop
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/scripts/test_setup.py new/Logbook-1.5.2/scripts/test_setup.py
--- old/Logbook-1.4.3/scripts/test_setup.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/scripts/test_setup.py 2019-08-21 06:33:30.000000000 +0200
@@ -1,5 +1,5 @@
#! /usr/bin/python
-import pip
+from pip._internal import main as pip_main
import sys
if __name__ == '__main__':
@@ -14,5 +14,5 @@
]
print("Setting up dependencies...")
- result = pip.main(["install"] + deps)
+ result = pip_main(["install"] + deps)
sys.exit(result)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/tests/conftest.py new/Logbook-1.5.2/tests/conftest.py
--- old/Logbook-1.4.3/tests/conftest.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/tests/conftest.py 2019-08-21 06:33:30.000000000 +0200
@@ -1,3 +1,5 @@
+import sys
+
import logbook
import pytest
@@ -106,3 +108,10 @@
@request.addfinalizer
def fin():
_disable_gevent()
+
+
+def pytest_ignore_collect(path, config):
+ if 'test_asyncio.py' in path.basename and (sys.version_info.major < 3 or sys.version_info.minor < 5):
+ return True
+
+ return False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/tests/test_asyncio.py new/Logbook-1.5.2/tests/test_asyncio.py
--- old/Logbook-1.4.3/tests/test_asyncio.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Logbook-1.5.2/tests/test_asyncio.py 2019-08-21 06:33:30.000000000 +0200
@@ -0,0 +1,27 @@
+import pytest
+import logbook
+import asyncio
+from logbook.concurrency import has_contextvars
+
+ITERATIONS = 100
+
+
+(a)pytest.mark.skipif(not has_contextvars, reason="Contexvars not available")
+def test_asyncio_context_management(logger):
+ h1 = logbook.TestHandler()
+ h2 = logbook.TestHandler()
+
+ async def task(handler, msg):
+ for _ in range(ITERATIONS):
+ with handler.contextbound():
+ logger.info(msg)
+
+ await asyncio.sleep(0) # allow for context switch
+
+ asyncio.get_event_loop().run_until_complete(asyncio.gather(task(h1, 'task1'), task(h2, 'task2')))
+
+ assert len(h1.records) == ITERATIONS
+ assert all(['task1' == r.msg for r in h1.records])
+
+ assert len(h2.records) == ITERATIONS
+ assert all(['task2' == r.msg for r in h2.records])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/tests/test_queues.py new/Logbook-1.5.2/tests/test_queues.py
--- old/Logbook-1.4.3/tests/test_queues.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/tests/test_queues.py 2019-08-21 06:33:30.000000000 +0200
@@ -89,9 +89,24 @@
assert test_handler.has_warning('Hello World')
+class BatchTestHandler(logbook.TestHandler):
+ def __init__(self, *args, **kwargs):
+ super(BatchTestHandler, self).__init__(*args, **kwargs)
+ self.batches = []
+
+ def emit(self, record):
+ super(BatchTestHandler, self).emit(record)
+ self.batches.append([record])
+
+ def emit_batch(self, records, reason):
+ for record in records:
+ super(BatchTestHandler, self).emit(record)
+ self.batches.append(records)
+
+
def test_threaded_wrapper_handler(logger):
from logbook.queues import ThreadedWrapperHandler
- test_handler = logbook.TestHandler()
+ test_handler = BatchTestHandler()
with ThreadedWrapperHandler(test_handler) as handler:
logger.warn('Just testing')
logger.error('More testing')
@@ -100,6 +115,50 @@
handler.close()
assert (not handler.controller.running)
+ assert len(test_handler.records) == 2
+ assert len(test_handler.batches) == 2
+ assert all((len(records) == 1 for records in test_handler.batches))
+ assert test_handler.has_warning('Just testing')
+ assert test_handler.has_error('More testing')
+
+
+def test_threaded_wrapper_handler_emit():
+ from logbook.queues import ThreadedWrapperHandler
+ test_handler = BatchTestHandler()
+ with ThreadedWrapperHandler(test_handler) as handler:
+ lr = logbook.LogRecord('Test Logger', logbook.WARNING, 'Just testing')
+ test_handler.emit(lr)
+ lr = logbook.LogRecord('Test Logger', logbook.ERROR, 'More testing')
+ test_handler.emit(lr)
+
+ # give it some time to sync up
+ handler.close()
+
+ assert (not handler.controller.running)
+ assert len(test_handler.records) == 2
+ assert len(test_handler.batches) == 2
+ assert all((len(records) == 1 for records in test_handler.batches))
+ assert test_handler.has_warning('Just testing')
+ assert test_handler.has_error('More testing')
+
+
+def test_threaded_wrapper_handler_emit_batched():
+ from logbook.queues import ThreadedWrapperHandler
+ test_handler = BatchTestHandler()
+ with ThreadedWrapperHandler(test_handler) as handler:
+ test_handler.emit_batch([
+ logbook.LogRecord('Test Logger', logbook.WARNING, 'Just testing'),
+ logbook.LogRecord('Test Logger', logbook.ERROR, 'More testing'),
+ ], 'group')
+
+ # give it some time to sync up
+ handler.close()
+
+ assert (not handler.controller.running)
+ assert len(test_handler.records) == 2
+ assert len(test_handler.batches) == 1
+ (records, ) = test_handler.batches
+ assert len(records) == 2
assert test_handler.has_warning('Just testing')
assert test_handler.has_error('More testing')
@@ -164,10 +223,10 @@
import redis
from logbook.queues import RedisHandler
- KEY = 'redis'
+ KEY = 'redis-{}'.format(os.getpid())
FIELDS = ['message', 'host']
r = redis.Redis(decode_responses=True)
- redis_handler = RedisHandler(level=logbook.INFO, bubble=True)
+ redis_handler = RedisHandler(key=KEY, level=logbook.INFO, bubble=True)
# We don't want output for the tests, so we can wrap everything in a
# NullHandler
null_handler = logbook.NullHandler()
@@ -185,7 +244,7 @@
assert message.find(LETTERS)
# Change the key of the handler and check on redis
- KEY = 'test_another_key'
+ KEY = 'test_another_key-{}'.format(os.getpid())
redis_handler.key = KEY
with null_handler.applicationbound():
@@ -234,7 +293,8 @@
from logbook.queues import RedisHandler
null_handler = logbook.NullHandler()
- redis_handler = RedisHandler(key='lpushed', push_method='lpush',
+ KEY = 'lpushed-'.format(os.getpid())
+ redis_handler = RedisHandler(key=KEY, push_method='lpush',
level=logbook.INFO, bubble=True)
with null_handler.applicationbound():
@@ -245,10 +305,10 @@
time.sleep(1.5)
r = redis.Redis(decode_responses=True)
- logs = r.lrange('lpushed', 0, -1)
+ logs = r.lrange(KEY, 0, -1)
assert logs
assert "new item" in logs[0]
- r.delete('lpushed')
+ r.delete(KEY)
@require_module('redis')
@@ -261,7 +321,8 @@
from logbook.queues import RedisHandler
null_handler = logbook.NullHandler()
- redis_handler = RedisHandler(key='rpushed', push_method='rpush',
+ KEY = 'rpushed-' + str(os.getpid())
+ redis_handler = RedisHandler(key=KEY, push_method='rpush',
level=logbook.INFO, bubble=True)
with null_handler.applicationbound():
@@ -272,10 +333,10 @@
time.sleep(1.5)
r = redis.Redis(decode_responses=True)
- logs = r.lrange('rpushed', 0, -1)
+ logs = r.lrange(KEY, 0, -1)
assert logs
assert "old item" in logs[0]
- r.delete('rpushed')
+ r.delete(KEY)
@pytest.fixture
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/tests/test_syslog_handler.py new/Logbook-1.5.2/tests/test_syslog_handler.py
--- old/Logbook-1.4.3/tests/test_syslog_handler.py 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/tests/test_syslog_handler.py 2019-08-21 06:33:30.000000000 +0200
@@ -4,66 +4,68 @@
from contextlib import closing
import logbook
-from logbook.helpers import u
-
import pytest
-unix_socket = "/tmp/__unixsock_logbook.test"
+UNIX_SOCKET = "/tmp/__unixsock_logbook.test"
+
+DELIMITERS = {
+ socket.AF_INET: '\n'
+}
-to_test = [
+TO_TEST = [
(socket.AF_INET, socket.SOCK_DGRAM, ('127.0.0.1', 0)),
(socket.AF_INET, socket.SOCK_STREAM, ('127.0.0.1', 0)),
]
-if hasattr(socket, 'AF_UNIX'):
- to_test.append((socket.AF_UNIX, socket.SOCK_DGRAM, unix_socket))
+
+UNIX_SOCKET_AVAILABLE = hasattr(socket, 'AF_UNIX')
+
+if UNIX_SOCKET_AVAILABLE:
+ DELIMITERS[socket.AF_UNIX] = '\x00'
+ TO_TEST.append((socket.AF_UNIX, socket.SOCK_DGRAM, UNIX_SOCKET))
+
@pytest.mark.usefixtures("unix_sock_path")
-(a)pytest.mark.parametrize("sock_family,socktype,address", to_test)
-def test_syslog_handler(logger, activation_strategy,
- sock_family, socktype, address):
- delimiter = {socket.AF_UNIX: '\x00',
- socket.AF_INET: '\n'}[sock_family]
+(a)pytest.mark.parametrize("sock_family,socktype,address", TO_TEST)
+(a)pytest.mark.parametrize("app_name", [None, 'Testing'])
+def test_syslog_handler(logger, activation_strategy, sock_family, socktype, address, app_name):
+ delimiter = DELIMITERS[sock_family]
with closing(socket.socket(sock_family, socktype)) as inc:
inc.bind(address)
+
if socktype == socket.SOCK_STREAM:
inc.listen(0)
+
inc.settimeout(1)
- for app_name in [None, 'Testing']:
- if sock_family == socket.AF_UNIX:
- expected = (r'^<12>%stestlogger: Syslog is weird%s$' %
- (app_name + ':' if app_name else '',
- delimiter))
- else:
- expected = (r'^<12>1 \d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?Z %s %s %d '
- '- - %sSyslog is weird%s$' %
- (socket.gethostname(),
- app_name if app_name else 'testlogger',
- os.getpid(), 'testlogger: ' if app_name else '',
- delimiter))
-
- handler = logbook.SyslogHandler(app_name, inc.getsockname(),
- socktype=socktype)
- with activation_strategy(handler):
- logger.warn('Syslog is weird')
- try:
- if socktype == socket.SOCK_STREAM:
- with closing(inc.accept()[0]) as inc2:
- rv = inc2.recv(1024)
- else:
- rv = inc.recvfrom(1024)[0]
- except socket.error:
- assert False, 'got timeout on socket'
- rv = rv.decode('utf-8')
- assert re.match(expected, rv), \
- 'expected {}, got {}'.format(expected, rv)
+ if UNIX_SOCKET_AVAILABLE and sock_family == socket.AF_UNIX:
+ expected = (r'^<12>%stestlogger: Syslog is weird%s$' % (app_name + ':' if app_name else '', delimiter))
+ else:
+ expected = (r'^<12>1 \d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?Z %s %s %d - - %sSyslog is weird%s$' % (
+ socket.gethostname(),
+ app_name if app_name else 'testlogger',
+ os.getpid(), 'testlogger: ' if app_name else '',
+ delimiter))
+
+ handler = logbook.SyslogHandler(app_name, inc.getsockname(), socktype=socktype)
+
+ with activation_strategy(handler):
+ logger.warn('Syslog is weird')
+
+ if socktype == socket.SOCK_STREAM:
+ with closing(inc.accept()[0]) as inc2:
+ rv = inc2.recv(1024)
+ else:
+ rv = inc.recvfrom(1024)[0]
+
+ rv = rv.decode('utf-8')
+ assert re.match(expected, rv), \
+ 'expected {}, got {}'.format(expected, rv)
-(a)pytest.fixture
-def unix_sock_path(request):
- returned = unix_socket
- @request.addfinalizer
- def cleanup():
- if os.path.exists(returned):
- os.unlink(returned)
- return returned
+(a)pytest.fixture
+def unix_sock_path():
+ try:
+ yield UNIX_SOCKET
+ finally:
+ if os.path.exists(UNIX_SOCKET):
+ os.unlink(UNIX_SOCKET)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Logbook-1.4.3/tox.ini new/Logbook-1.5.2/tox.ini
--- old/Logbook-1.4.3/tox.ini 2019-01-16 21:34:24.000000000 +0100
+++ new/Logbook-1.5.2/tox.ini 2019-08-21 06:33:30.000000000 +0200
@@ -1,35 +1,32 @@
[tox]
-envlist=py27,py34,py35,py36,pypy,docs
-skipsdist=True
+envlist = py{27,35,36,37}{,-speedups},pypy,py37-docs
+skipsdist = True
[testenv]
-whitelist_externals=
- rm
-deps=
- py{27}: mock
- pytest
- Cython
-changedir={toxinidir}
-commands=
- {envbindir}/cython logbook/_speedups.pyx
- {envpython} {toxinidir}/setup.py develop
- {envpython} {toxinidir}/scripts/test_setup.py
- py.test {toxinidir}/tests
- rm -f {toxinidir}/logbook/_speedups.\{so,c\}
+whitelist_externals =
+ rm
+deps =
+ py{27}: mock
+ pytest
+ speedups: Cython
+setenv =
+ !speedups: DISABLE_LOGBOOK_CEXT=1
+ !speedups: DISABLE_LOGBOOK_CEXT_AT_RUNTIME=1
+changedir = {toxinidir}
+commands =
+ {envpython} -m pip install -e {toxinidir}[all]
-[testenv:pypy]
-deps=
- mock
- pytest
-commands=
- {envpython} {toxinidir}/setup.py develop
- {envpython} {toxinidir}/scripts/test_setup.py
- py.test {toxinidir}/tests
+ # Make sure that speedups are available/not available, as needed.
+ speedups: {envpython} -c "from logbook.base import _has_speedups; exit(0 if _has_speedups else 1)"
+ !speedups: {envpython} -c "from logbook.base import _has_speedups; exit(1 if _has_speedups else 0)"
-[testenv:docs]
-deps=
- Sphinx==1.1.3
-changedir=docs
-commands=
- sphinx-build -W -b html . _build/html
- sphinx-build -W -b linkcheck . _build/linkcheck
+ {envpython} {toxinidir}/scripts/test_setup.py
+ py.test {toxinidir}/tests
+
+[testenv:py37-docs]
+deps =
+ Sphinx>=1.3
+changedir = docs
+commands =
+ sphinx-build -W -b html . _build/html
+ sphinx-build -W -b linkcheck . _build/linkcheck
1
0
Hello community,
here is the log from the commit of package python-Faker for openSUSE:Factory checked in at 2019-09-30 15:54:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Faker (Old)
and /work/SRC/openSUSE:Factory/.python-Faker.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Faker"
Mon Sep 30 15:54:31 2019 rev:13 rq:732881 version:2.0.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Faker/python-Faker.changes 2019-08-05 11:18:10.502516115 +0200
+++ /work/SRC/openSUSE:Factory/.python-Faker.new.2352/python-Faker.changes 2019-09-30 15:54:33.365989914 +0200
@@ -1,0 +2,11 @@
+Tue Sep 24 08:58:15 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 2.0.2:
+ * Add nationalities for locale pt_PT. Thanks @tng10.
+ * Add ios() and android() to user_agent provider. Thanks @gsilvan.
+ * Update zh_CN provinces. Thanks @casen27.
+ * Fix typos, misspellings. Add locations, names, dates in hi_IN providers. Thanks @kathawala.
+ * Bump required version text-unidecode to 1.3. Thanks @moggers87.
+ * Bug fix for pyfloat going over max_value. Thanks @fgs-dbudwin.
+
+-------------------------------------------------------------------
Old:
----
Faker-2.0.0.tar.gz
New:
----
Faker-2.0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Faker.spec ++++++
--- /var/tmp/diff_new_pack.R9Zbqs/_old 2019-09-30 15:54:34.157987807 +0200
+++ /var/tmp/diff_new_pack.R9Zbqs/_new 2019-09-30 15:54:34.161987797 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-Faker
-Version: 2.0.0
+Version: 2.0.2
Release: 0
Summary: Python package that generates fake data
License: MIT
@@ -35,7 +35,7 @@
BuildRequires: %{python_module random2}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10}
-BuildRequires: %{python_module text-unidecode >= 1.2}
+BuildRequires: %{python_module text-unidecode >= 1.3}
BuildRequires: %{python_module validators >= 0.13.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -43,7 +43,7 @@
Requires: python-python-dateutil >= 2.4
Requires: python-setuptools
Requires: python-six >= 1.10
-Requires: python-text-unidecode >= 1.2
+Requires: python-text-unidecode >= 1.3
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
++++++ Faker-2.0.0.tar.gz -> Faker-2.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/CHANGELOG.rst new/Faker-2.0.2/CHANGELOG.rst
--- old/Faker-2.0.0/CHANGELOG.rst 2019-07-15 16:41:26.000000000 +0200
+++ new/Faker-2.0.2/CHANGELOG.rst 2019-09-17 18:57:50.000000000 +0200
@@ -1,6 +1,20 @@
Changelog
=========
+`2.0.2 - 17-September-2019 <https://github.com/joke2k/faker/compare/v2.0.2...v2.0.1>`__
+---------------------------------------------------------------------------------------
+
+* Fix typos, misspellings. Add locations, names, dates in ``hi_IN`` providers. Thanks @kathawala.
+* Bump required version ``text-unidecode`` to 1.3. Thanks @moggers87.
+* Bug fix for ``pyfloat`` going over ``max_value``. Thanks @fgs-dbudwin.
+
+`2.0.1 - 20-August-2019 <https://github.com/joke2k/faker/compare/v2.0.1...v2.0.0>`__
+------------------------------------------------------------------------------------
+
+* Add nationalities for locale ``pt_PT``. Thanks @tng10.
+* Add ``ios()`` and ``android()`` to ``user_agent`` provider. Thanks @gsilvan.
+* Update ``zh_CN`` provinces. Thanks @casen27.
+
`2.0.0 - 15-July-2019 <https://github.com/joke2k/faker/compare/v2.0.0...v1.0.8>`__
----------------------------------------------------------------------------------
* Breaking change: Only allow providers to use ``OrderedDict`` s, to avoid any more ``PYTHONHASHSEED`` problems. Thanks @adamchainz.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/Faker.egg-info/PKG-INFO new/Faker-2.0.2/Faker.egg-info/PKG-INFO
--- old/Faker-2.0.0/Faker.egg-info/PKG-INFO 2019-07-15 16:58:24.000000000 +0200
+++ new/Faker-2.0.2/Faker.egg-info/PKG-INFO 2019-09-17 18:59:01.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: Faker
-Version: 2.0.0
+Version: 2.0.2
Summary: Faker is a Python package that generates fake data for you.
Home-page: https://github.com/joke2k/faker
Author: joke2k
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/Faker.egg-info/SOURCES.txt new/Faker-2.0.2/Faker.egg-info/SOURCES.txt
--- old/Faker-2.0.0/Faker.egg-info/SOURCES.txt 2019-07-15 16:58:24.000000000 +0200
+++ new/Faker-2.0.2/Faker.egg-info/SOURCES.txt 2019-09-17 18:59:01.000000000 +0200
@@ -140,6 +140,7 @@
faker/providers/date_time/ar_EG/__init__.py
faker/providers/date_time/en_US/__init__.py
faker/providers/date_time/fr_FR/__init__.py
+faker/providers/date_time/hi_IN/__init__.py
faker/providers/date_time/hr_HR/__init__.py
faker/providers/date_time/hu_HU/__init__.py
faker/providers/date_time/hy_AM/__init__.py
@@ -154,6 +155,7 @@
faker/providers/geo/de_AT/__init__.py
faker/providers/geo/el_GR/__init__.py
faker/providers/geo/en_US/__init__.py
+faker/providers/geo/pt_PT/__init__.py
faker/providers/internet/__init__.py
faker/providers/internet/ar_AA/__init__.py
faker/providers/internet/bg_BG/__init__.py
@@ -404,6 +406,7 @@
tests/providers/test_phone_number.py
tests/providers/test_python.py
tests/providers/test_ssn.py
+tests/providers/test_user_agent.py
tests/utils/__init__.py
tests/utils/random_state.json
tests/utils/test_utils.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/Faker.egg-info/requires.txt new/Faker-2.0.2/Faker.egg-info/requires.txt
--- old/Faker-2.0.0/Faker.egg-info/requires.txt 2019-07-15 16:58:24.000000000 +0200
+++ new/Faker-2.0.2/Faker.egg-info/requires.txt 2019-09-17 18:59:01.000000000 +0200
@@ -1,6 +1,6 @@
python-dateutil>=2.4
six>=1.10
-text-unidecode==1.2
+text-unidecode==1.3
[:python_version<"3.3"]
ipaddress
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/MANIFEST.in new/Faker-2.0.2/MANIFEST.in
--- old/Faker-2.0.0/MANIFEST.in 2019-07-15 16:44:46.000000000 +0200
+++ new/Faker-2.0.2/MANIFEST.in 2019-08-07 16:26:54.000000000 +0200
@@ -8,7 +8,7 @@
recursive-include tests *.py
global-exclude *.py[cod] __pycache__ *.so
-exclude Makefile tox.ini .coveragerc .bumpversion.cfg .dockerignore
+exclude Makefile tox.ini .coveragerc .bumpversion.cfg .dockerignore .isort.cfg
exclude ISSUE_TEMPLATE.md PULL_REQUEST_TEMPLATE.md
exclude appveyor.yml readthedocs.yml
exclude build32bit.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/PKG-INFO new/Faker-2.0.2/PKG-INFO
--- old/Faker-2.0.0/PKG-INFO 2019-07-15 16:58:25.000000000 +0200
+++ new/Faker-2.0.2/PKG-INFO 2019-09-17 18:59:02.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: Faker
-Version: 2.0.0
+Version: 2.0.2
Summary: Faker is a Python package that generates fake data for you.
Home-page: https://github.com/joke2k/faker
Author: joke2k
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/RELEASE_PROCESS.rst new/Faker-2.0.2/RELEASE_PROCESS.rst
--- old/Faker-2.0.0/RELEASE_PROCESS.rst 2019-07-15 16:35:50.000000000 +0200
+++ new/Faker-2.0.2/RELEASE_PROCESS.rst 2019-08-07 16:21:33.000000000 +0200
@@ -2,9 +2,8 @@
---------------
1. Compile entries in ``CHANGELOG.rst``. Each entry should:
-
- * Be in the past tense (eg "Fix datetime on Windows")
- * End with acknowledging the PR author(s): "Thanks @<github username>."
+ * Be in the past tense (eg "Fix datetime on Windows")
+ * End with acknowledging the PR author(s): "Thanks @<github username>."
2. Run ``bumpversion <patch|minor|major>``.
3. Check the commit generated by ``bumpversion``, then ``git push``.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/VERSION new/Faker-2.0.2/VERSION
--- old/Faker-2.0.0/VERSION 2019-07-15 16:57:52.000000000 +0200
+++ new/Faker-2.0.2/VERSION 2019-09-17 18:58:22.000000000 +0200
@@ -1 +1 @@
-2.0.0
+2.0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/__init__.py new/Faker-2.0.2/faker/__init__.py
--- old/Faker-2.0.0/faker/__init__.py 2019-07-15 16:57:52.000000000 +0200
+++ new/Faker-2.0.2/faker/__init__.py 2019-09-17 18:58:22.000000000 +0200
@@ -1,6 +1,6 @@
from faker.generator import Generator # noqa F401
from faker.factory import Factory # noqa F401
-VERSION = '2.0.0'
+VERSION = '2.0.2'
Faker = Factory.create
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/build_docs.py new/Faker-2.0.2/faker/build_docs.py
--- old/Faker-2.0.0/faker/build_docs.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/build_docs.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,7 +1,6 @@
# coding=utf-8
-from __future__ import print_function
-from __future__ import unicode_literals
+from __future__ import print_function, unicode_literals
import os
import pprint
@@ -9,7 +8,6 @@
import six
-
DOCS_ROOT = os.path.abspath(os.path.join('..', 'docs'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/cli.py new/Faker-2.0.2/faker/cli.py
--- old/Faker-2.0.0/faker/cli.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/cli.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,22 +1,18 @@
# coding=utf-8
-from __future__ import unicode_literals
-from __future__ import print_function
+from __future__ import print_function, unicode_literals
+import argparse
+import logging
import os
+import random
import sys
-import argparse
-import random
import six
-from faker import Faker, documentor
-from faker import VERSION
+from faker import VERSION, Faker, documentor
from faker.config import AVAILABLE_LOCALES, DEFAULT_LOCALE, META_PROVIDERS_MODULES
-import logging
-
-
__author__ = 'joke2k'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/config.py new/Faker-2.0.2/faker/config.py
--- old/Faker-2.0.0/faker/config.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/config.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,5 +1,6 @@
# coding=utf-8
from importlib import import_module
+
from faker.utils.loading import find_available_locales, find_available_providers
DEFAULT_LOCALE = 'en_US'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/documentor.py new/Faker-2.0.2/faker/documentor.py
--- old/Faker-2.0.0/faker/documentor.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/documentor.py 2019-08-07 16:33:32.000000000 +0200
@@ -4,10 +4,10 @@
import inspect
-from .compat import getargspec
-
from faker import utils
+from .compat import getargspec
+
class Documentor(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/factory.py new/Faker-2.0.2/faker/factory.py
--- old/Faker-2.0.0/faker/factory.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/factory.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,19 +1,17 @@
# coding=utf-8
-from __future__ import unicode_literals
-from __future__ import absolute_import
+from __future__ import absolute_import, unicode_literals
-from importlib import import_module
import locale as pylocale
-
import logging
import sys
+from importlib import import_module
+
from faker import Generator
-from faker.config import DEFAULT_LOCALE, PROVIDERS, AVAILABLE_LOCALES
+from faker.config import AVAILABLE_LOCALES, DEFAULT_LOCALE, PROVIDERS
from faker.utils.loading import list_module
-
logger = logging.getLogger(__name__)
# identify if python is being run in interactive mode. If so, disable logging.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/generator.py new/Faker-2.0.2/faker/generator.py
--- old/Faker-2.0.0/faker/generator.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/generator.py 2019-08-07 16:33:32.000000000 +0200
@@ -2,8 +2,8 @@
from __future__ import unicode_literals
-import re
import random as random_module
+import re
_re_token = re.compile(r'\{\{(\s?)(\w+)(\s?)\}\}')
random = random_module.Random()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/providers/__init__.py new/Faker-2.0.2/faker/providers/__init__.py
--- old/Faker-2.0.0/faker/providers/__init__.py 2019-07-15 16:39:47.000000000 +0200
+++ new/Faker-2.0.2/faker/providers/__init__.py 2019-08-07 16:33:32.000000000 +0200
@@ -7,7 +7,6 @@
from faker.utils.distribution import choices_distribution, choices_distribution_unique
-
_re_hash = re.compile(r'#')
_re_perc = re.compile(r'%')
_re_excl = re.compile(r'!')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/providers/address/hi_IN/__init__.py new/Faker-2.0.2/faker/providers/address/hi_IN/__init__.py
--- old/Faker-2.0.0/faker/providers/address/hi_IN/__init__.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/providers/address/hi_IN/__init__.py 2019-09-17 18:55:32.000000000 +0200
@@ -36,7 +36,7 @@
'अन्तर्गत',
'अलांग',
'अलीगढ',
- 'दादरा और नागर हवेली',
+ 'दादरा और नगर हवेली',
'अमरावती',
'अमरोहा',
'अनन्तपुर',
@@ -44,9 +44,6 @@
'जिससेबेलारी',
'अनंतनाग',
'भागलपुर',
- 'पेपरबोर्डस',
- 'त्रिबेनी',
- 'टिसूज',
'भद्रक',
'बचेली',
'बहादुरगंज',
@@ -60,22 +57,14 @@
'दालखोला',
'देवास',
'चंडीगढ',
- 'फादर',
- 'चिन्नफ',
'चिपलुन',
'चक्रधरपुर',
'चंबा',
'फतहपुर',
'फतेहपुर',
'फतेहगढ',
- 'फतहपुर',
- 'फतहपुर',
- 'चित्तूर',
- 'चित्रकूट',
'सभापतिने',
'देवगढ़',
- 'द्वारारस्वीकृति',
- 'दालखोला',
'धर्मापुरी',
'पाकाला',
'धारवाड',
@@ -88,6 +77,9 @@
'जिलोंपर',
'विस्तारण',
'मोतिहारी',
+ 'लखनऊ',
+ 'मुंबई',
+ 'हैदराबाद',
)
states = (
@@ -102,13 +94,13 @@
'गोवा',
'मध्य प्रदेश',
'महाराष्ट्र',
- 'कश्मीर',
+ 'जम्मू और कश्मीर',
'केरल',
'कर्नाटक',
'मणिपुर',
'मिजोरम',
'मेघालय',
- 'सिबक्कम',
+ 'सिक्किम',
'राजस्थान',
'पंजाब',
'उडीसा',
@@ -118,24 +110,24 @@
'त्रिपुरा',
'पश्चिमी बंगाल',
'अंडमान और निकोबार',
- 'द्वीप समूह',
'दमन और दीव',
- 'दादरा और नागर हवेली',
+ 'दादरा और नगर हवेली',
'दिल्ली',
'पांडिचेरी',
- 'लक्षद्वीप')
+ 'लक्षद्वीप',
+ )
countries = (
- 'आर्मेनिया',
+ 'आर्मीनिया',
'यू.के.',
'फ्रांस',
- 'अजेपटीना',
- 'ब्राजील',
+ 'फलस्तीन',
+ 'मिस्र',
+ 'ब्राज़ील',
'ईरान',
'यूनान',
'स्पेन',
- 'हमारे',
- 'जॉजिऩया',
+ 'जॉर्जिया',
'लेबनान',
'सायप्रस',
'सीरिया',
@@ -143,12 +135,9 @@
'रूस',
'संयुक्त राज्य अमरीका',
'नेदर्लान्ड',
- 'फ्रांस',
'ऑस्ट्रेलिया',
'एंटीगुआ',
'बार्बुडा',
- 'अर्जेंटीना',
- 'आर्मेनिया',
'ऑस्ट्रिया',
'अज़रबाइजान',
'बारबाडोस',
@@ -164,11 +153,9 @@
'बोस्निया',
'हर्जेगोविना',
'बोत्सवाना',
- 'ब्राजील',
'ब्रुनेई',
'बुल्गारिया',
- 'बुर्किना',
- 'फ़ासो',
+ 'बुर्किना फ़ासो',
'बर्मा',
'बुरूंडी',
'डोमिनिकन रिपब्लिक',
@@ -178,18 +165,15 @@
'गेबोन',
'गाम्बिया',
'जर्मनी',
- 'जार्जिया ग्रेनेडा',
+ 'ग्रेनेडा',
'घाना',
- 'यूनान',
'ग्रेट ब्रिटेन',
'हंगरी',
'भारत',
+ 'हिन्दुस्तान',
'इराक',
'आयरलैंड',
'इंडोनेशिया',
- 'इसराइल',
- 'आइलैंड',
- 'ईरान',
'इटली',
'जमैका',
'जॉर्डन',
@@ -201,7 +185,7 @@
'लातविया',
'लाओस',
'उत्तर कोरिया',
- 'दक्षिण कोसोवो',
+ 'कोसोवो',
'कुवैत',
'लेबनान',
'लिचटीनस्टीन',
@@ -211,15 +195,13 @@
'लाइबेरिया',
'लेसोथो',
'नेपाल',
- 'न्यूजीलैंड',
+ 'न्यूज़ीलैण्ड',
'निकारागुआ',
'नाइजर',
'नाउरू',
- 'लुसिया',
- 'रूस',
+ 'सेंट लुसिया',
'रोमानिया',
- 'अरब',
- 'अमीरात',
+ 'अरब अमीरात',
'यूएई',
'युगांडा',
'यूक्रेन',
@@ -233,8 +215,17 @@
'वियतनाम',
'यमन',
'ज़ायर',
- 'जाबम्बया',
- 'जिम्बाब्वे',
+ 'ज़ाम्बिया',
+ 'ज़िम्बाब्वे',
+ 'पाकिस्तान',
+ 'सउदी अरब',
+ 'ओमान',
+ 'क़तर',
+ 'ट्यूनीशिया',
+ 'मोरक्को',
+ 'तुर्की',
+ 'श्रीलंका',
+ 'अफ़ग़ानिस्तान',
)
def city_name(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/providers/address/zh_CN/__init__.py new/Faker-2.0.2/faker/providers/address/zh_CN/__init__.py
--- old/Faker-2.0.0/faker/providers/address/zh_CN/__init__.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/providers/address/zh_CN/__init__.py 2019-08-20 16:58:20.000000000 +0200
@@ -22,10 +22,12 @@
"{{province}}{{city}}{{district}}{{street_address}} {{postcode}}",)
provinces = (
- "内蒙古自治区", "山西省", "河北省", "吉林省", "江苏省", "辽宁省", "黑龍江省",
+ "北京市", "上海市", "天津市", "重庆市",
+ "内蒙古自治区", "山西省", "河北省", "吉林省", "江苏省", "辽宁省", "黑龙江省",
"安徽省", "山东省", "浙江省", "江西省", "福建省", "湖南省", "湖北省",
"河南省", "广东省", "广西壮族自治区", "贵州省", "海南省", "四川省", "云南省",
"陕西省", "甘肃省", "宁夏回族自治区", "青海省", "新疆维吾尔自治区", "西藏自治区",
+ "台湾省", "香港特别行政区", "澳门特别行政区",
)
districts = (
"西夏", "永川", "秀英", "高港", "清城", "兴山", "锡山", "清河",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/providers/date_time/hi_IN/__init__.py new/Faker-2.0.2/faker/providers/date_time/hi_IN/__init__.py
--- old/Faker-2.0.0/faker/providers/date_time/hi_IN/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Faker-2.0.2/faker/providers/date_time/hi_IN/__init__.py 2019-09-17 18:55:32.000000000 +0200
@@ -0,0 +1,40 @@
+# coding: utf-8
+
+from __future__ import unicode_literals
+from .. import Provider as DateTimeProvider
+
+
+class Provider(DateTimeProvider):
+
+ def day_of_week(self):
+ day = self.date('%w')
+ DAY_NAMES = {
+ "0": "सोमवार",
+ "1": "मंगलवार",
+ "2": "बुधवार",
+ "3": "गुरुवार",
+ "4": "जुम्मा",
+ "5": "शनिवार",
+ "6": "रविवार",
+ }
+
+ return DAY_NAMES[day]
+
+ def month_name(self):
+ month = self.month()
+ MONTH_NAMES = {
+ "01": "जनवरी",
+ "02": "फ़रवरी",
+ "03": "मार्च",
+ "04": "अप्रैल",
+ "05": "मई",
+ "06": "जून",
+ "07": "जुलाई",
+ "08": "अगस्त",
+ "09": "सितंबर",
+ "10": "अक्टूबर",
+ "11": "नवंबर",
+ "12": "दिसंबर",
+ }
+
+ return MONTH_NAMES[month]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/providers/geo/pt_PT/__init__.py new/Faker-2.0.2/faker/providers/geo/pt_PT/__init__.py
--- old/Faker-2.0.0/faker/providers/geo/pt_PT/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Faker-2.0.2/faker/providers/geo/pt_PT/__init__.py 2019-08-07 16:25:11.000000000 +0200
@@ -0,0 +1,30 @@
+# coding=utf-8
+
+from __future__ import unicode_literals
+from .. import Provider as GeoProvider
+
+
+class Provider(GeoProvider):
+
+ nationalities = (
+ "Afegã", "Albanesa", "Arménia", "Angolana", "Argentina", "Austríaca", "Australiana", "Azerbaijã", "Belga",
+ "Bulgara", "Boliviana", "Brasileira", "Bielorussa", "Canadiana", "Congolesa (República Democrática do Congo)",
+ "Congolesa (República do Congo)", "Suíça", "Marfinense", "Chilena", "Chinesa", "Colombiana", "Costa-Riquenha",
+ "Cubana", "Cabo-verdiana", "Cipriota", "Checa", "Alemã", "Dinamarquesa", "Dominicana", "Argelina",
+ "Equatoriana", "Estónia", "Egípcia", "Espanhola", "Etíope", "Finlândesa", "Francesa", "Grega",
+ "Guineense (Bissau)", "Croata", "Húngara", "Indonésia", "Irlandesa", "Israelita", "Indiana", "Iraquiana",
+ "Iraniana", "Islandesa", "Italiana", "Jamaicana", "Japonesa", "Queniana", "Coreana", "Libanesa", "Lituana",
+ "Luxemburguesa", "Letã", "Marroquina", "Moldava", "Birmanesa", "Maltesa", "Mexicana", "Moçambicana",
+ "Nigeriana", "Holandesa", "Norueguesa", "Nepalesa", "Neozelandesa", "Peruana", "Filipina", "Paquistanesa",
+ "Polaca", "Portuguesa", "Paraguaia", "Romena", "Russa", "Ruandesa", "Sudanesa", "Sueca", "Eslovena", "Eslovaca",
+ "Senegalesa", "Somali", "Santomense", "Salvadorenha", "Tailandesa", "Tunisina", "Turca", "Ucraniana",
+ "Britânica", "Americana", "Uruguaia", "Venezuelana", "Vietnamita", "Sul-Africana", "Sérvia", "Andorrenha",
+ "Bósnia", "Camaronesa", "Georgiana", "Ganesa", "Gambiana", "Hondurenha", "Haitiana", "Cazaque", "Libanesa ",
+ "Monegasca", "Maliana", "Mongol", "Mauritana", "Malaia", "Panamiana", "Saudita", "Singapurense", "Togolesa",
+ )
+
+ def nationality(self):
+ """
+ :example 'Portuguesa'
+ """
+ return self.random_element(self.nationalities)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/providers/person/hi_IN/__init__.py new/Faker-2.0.2/faker/providers/person/hi_IN/__init__.py
--- old/Faker-2.0.0/faker/providers/person/hi_IN/__init__.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/providers/person/hi_IN/__init__.py 2019-09-17 18:55:32.000000000 +0200
@@ -10,7 +10,51 @@
'{{last_name}}, {{first_name}}',
)
+ # First 20 names from here
+ # https://www.babycenter.in/l25020672/top-20-indian-boys-names-of-2016-photos
+ # Next 20 names from here
+ # https://www.babycenter.in/l25020674/top-20-indian-girls-names-of-2016-photos
first_names = (
+ 'मुहम्मद',
+ 'आरव',
+ 'अर्जुन',
+ 'रायन',
+ 'आद्विक',
+ 'अथर्व',
+ 'रेयांश',
+ 'अयान',
+ 'विहान',
+ 'साई',
+ 'अद्वैत',
+ 'शौर्य',
+ 'विआन',
+ 'आरुष',
+ 'इशान',
+ 'अयांश',
+ 'पार्थ',
+ 'देन्यल',
+ 'किआन',
+ 'विवान',
+ 'आद्या',
+ 'अनन्या',
+ 'शनाया',
+ 'फ़ातिमा',
+ 'श्री',
+ 'अनाया',
+ 'अनिका',
+ 'मायरा',
+ 'इनाया',
+ 'अमायरा',
+ 'आन्वी',
+ 'स्वरा',
+ 'ज़ारा',
+ 'मरियम',
+ 'आराध्या',
+ 'तन्वी',
+ 'दीया',
+ 'अद्विका',
+ 'ईवा',
+ 'आव्या',
'अभय',
'आदित्य',
'अजित',
@@ -93,7 +137,14 @@
'श्यामा',
'सुलभा',
'तृष्णा',
- 'विद्या')
+ 'विद्या',
+ 'अली',
+ 'हासन',
+ 'हुसैन',
+ 'ज़ाकिर',
+ 'रिज़वान',
+ 'फ़रहान',
+ 'ज़ोया')
last_names = (
'पाटिल',
@@ -180,4 +231,10 @@
'मान',
'श्रीविमल',
'कुमार',
- 'मंडल')
+ 'मंडल',
+ 'अली',
+ 'हासन',
+ 'हुसैन',
+ 'खान',
+ 'अब्बासी',
+ 'नूरानी')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/providers/python/__init__.py new/Faker-2.0.2/faker/providers/python/__init__.py
--- old/Faker-2.0.0/faker/providers/python/__init__.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/providers/python/__init__.py 2019-09-17 18:55:32.000000000 +0200
@@ -60,7 +60,7 @@
if max_value is None:
max_value = min_value + self.random_int()
- left_number = self.random_int(min_value, max_value)
+ left_number = self.random_int(min_value, max_value - 1)
else:
sign = '+' if positive else self.random_element(('+', '-'))
left_number = self.random_number(left_digits)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/providers/user_agent/__init__.py new/Faker-2.0.2/faker/providers/user_agent/__init__.py
--- old/Faker-2.0.0/faker/providers/user_agent/__init__.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/providers/user_agent/__init__.py 2019-08-07 16:25:11.000000000 +0200
@@ -2,6 +2,7 @@
from __future__ import unicode_literals
+import string
from datetime import datetime
from .. import BaseProvider
@@ -23,6 +24,20 @@
mac_processors = ('Intel', 'PPC', 'U; Intel', 'U; PPC')
+ android_versions = (
+ '1.0', '1.1', '1.5', '1.6', '2.0', '2.0.1', '2.1', '2.2', '2.2.1', '2.2.2', '2.2.3', '2.3', '2.3.1', '2.3.2',
+ '2.3.3', '2.3.4', '2.3.5', '2.3.6', '2.3.7', '3.0', '3.1', '3.2', '3.2.1', '3.2.2', '3.2.3', '3.2.4', '3.2.5',
+ '3.2.6', '4.0', '4.0.1', '4.0.2', '4.0.3', '4.0.4', '4.1', '4.1.1', '4.1.2', '4.2', '4.2.1', '4.2.2', '4.3',
+ '4.3.1', '4.4', '4.4.1', '4.4.2', '4.4.3', '4.4.4', '5.0', '5.0.1', '5.0.2', '5.1', '5.1.1', '6.0', '6.0.1',
+ '7.0', '7.1', '7.1.1', '7.1.2', '8.0.0', '8.1.0', '9',
+ )
+
+ apple_devices = ('iPhone', 'iPad')
+
+ ios_versions = (
+ '3.1.3', '4.2.1', '5.1.1', '6.1.6', '7.1.2', '9.3.5', '9.3.6', '10.3.3', '10.3.4', '12.4',
+ )
+
def mac_processor(self):
return self.random_element(self.mac_processors)
@@ -35,10 +50,13 @@
def chrome(self, version_from=13, version_to=63,
build_from=800, build_to=899):
- saf = str(self.generator.random.randint(531, 536)) + \
- str(self.generator.random.randint(0, 2))
+ saf = '{0}.{1}'.format(self.generator.random.randint(531, 536),
+ self.generator.random.randint(0, 2))
+ bld = self.lexify(self.numerify('##?###'), string.ascii_uppercase)
tmplt = '({0}) AppleWebKit/{1} (KHTML, like Gecko)' \
' Chrome/{2}.0.{3}.0 Safari/{4}'
+ tmplt_ios = '({0}) AppleWebKit/{1} (KHTML, like Gecko)' \
+ ' CriOS/{2}.0.{3}.0 Mobile/{4} Safari/{1}'
platforms = (
tmplt.format(self.linux_platform_token(),
saf,
@@ -55,6 +73,16 @@
self.generator.random.randint(version_from, version_to),
self.generator.random.randint(build_from, build_to),
saf),
+ tmplt.format('Linux; {0}'.format(self.android_platform_token()),
+ saf,
+ self.generator.random.randint(version_from, version_to),
+ self.generator.random.randint(build_from, build_to),
+ saf),
+ tmplt_ios.format(self.ios_platform_token(),
+ saf,
+ self.generator.random.randint(version_from, version_to),
+ self.generator.random.randint(build_from, build_to),
+ bld),
)
return 'Mozilla/5.0 ' + self.random_element(platforms)
@@ -79,6 +107,12 @@
tmplt_win = '({0}; {1}; rv:1.9.{2}.20) {3}'
tmplt_lin = '({0}; rv:1.9.{1}.20) {2}'
tmplt_mac = '({0}; rv:1.9.{1}.20) {2}'
+ tmplt_and = '({0}; Mobile; rv:{1}.0) Gecko/{1}.0 Firefox/{1}.0'
+ tmplt_ios = '({0}) AppleWebKit/{1} (KHTML, like Gecko) FxiOS/{2}.{3}.0 Mobile/{4} Safari/{1}'
+ saf = '{0}.{1}'.format(self.generator.random.randint(531, 536),
+ self.generator.random.randint(0, 2))
+ bld = self.lexify(self.numerify('##?###'), string.ascii_uppercase)
+ bld2 = self.lexify(self.numerify('#?####'), string.ascii_lowercase)
platforms = (
tmplt_win.format(self.windows_platform_token(),
self.generator.locale().replace('_', '-'),
@@ -90,6 +124,13 @@
tmplt_mac.format(self.mac_platform_token(),
self.generator.random.randint(2, 6),
self.generator.random.choice(ver)),
+ tmplt_and.format(self.android_platform_token(),
+ self.generator.random.randint(5, 68)),
+ tmplt_ios.format(self.ios_platform_token(),
+ saf,
+ self.generator.random.randint(9, 18),
+ bld2,
+ bld),
)
return 'Mozilla/5.0 ' + self.random_element(platforms)
@@ -171,3 +212,12 @@
self.generator.random.randint(5, 12),
self.generator.random.randint(0, 9),
)
+
+ def android_platform_token(self):
+ return 'Android {0}'.format(self.random_element(self.android_versions))
+
+ def ios_platform_token(self):
+ return '{0}; CPU {0} OS {1} like Mac OS X'.format(
+ self.random_element(self.apple_devices),
+ self.random_element(self.ios_versions).replace('.', '_'),
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/utils/datasets.py new/Faker-2.0.2/faker/utils/datasets.py
--- old/Faker-2.0.0/faker/utils/datasets.py 2017-11-27 18:14:38.000000000 +0100
+++ new/Faker-2.0.2/faker/utils/datasets.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,8 +1,9 @@
# coding=utf-8
+import operator
+
from collections import Counter
from functools import reduce
-import operator
def add_dicts(*args):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/utils/datetime_safe.py new/Faker-2.0.2/faker/utils/datetime_safe.py
--- old/Faker-2.0.0/faker/utils/datetime_safe.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/utils/datetime_safe.py 2019-08-07 16:33:32.000000000 +0200
@@ -12,11 +12,13 @@
# '1850/08/02 was a Friday'
from __future__ import unicode_literals
-from datetime import date as real_date
-from datetime import datetime as real_datetime
+
import re
import time
+from datetime import date as real_date
+from datetime import datetime as real_datetime
+
class date(real_date):
def strftime(self, fmt):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/utils/distribution.py new/Faker-2.0.2/faker/utils/distribution.py
--- old/Faker-2.0.0/faker/utils/distribution.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/utils/distribution.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,6 +1,7 @@
# coding=utf-8
import bisect
+
from faker.generator import random as mod_random
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/utils/loading.py new/Faker-2.0.2/faker/utils/loading.py
--- old/Faker-2.0.0/faker/utils/loading.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/utils/loading.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,7 +1,8 @@
import os
+import pkgutil
import sys
+
from importlib import import_module
-import pkgutil
def get_path(module):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/faker/utils/text.py new/Faker-2.0.2/faker/utils/text.py
--- old/Faker-2.0.0/faker/utils/text.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/faker/utils/text.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,10 +1,9 @@
# coding=utf-8
import re
-
-import six
import unicodedata
+import six
_re_pattern = re.compile(r'[^\w\s-]', flags=re.U)
_re_pattern_allow_dots = re.compile(r'[^\.\w\s-]', flags=re.U)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/setup.py new/Faker-2.0.2/setup.py
--- old/Faker-2.0.0/setup.py 2019-07-12 18:06:49.000000000 +0200
+++ new/Faker-2.0.2/setup.py 2019-09-17 18:55:32.000000000 +0200
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# coding=utf-8
-import os
import io
+import os
-from setuptools import setup, find_packages
+from setuptools import find_packages, setup
here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, 'README.rst'), encoding='utf-8') as fp:
@@ -66,7 +66,7 @@
install_requires=[
"python-dateutil>=2.4",
"six>=1.10",
- "text-unidecode==1.2",
+ "text-unidecode==1.3",
],
tests_require=[
"validators>=0.13.0",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/tests/mymodule/en_US/__init__.py new/Faker-2.0.2/tests/mymodule/en_US/__init__.py
--- old/Faker-2.0.0/tests/mymodule/en_US/__init__.py 2019-07-12 17:15:17.000000000 +0200
+++ new/Faker-2.0.2/tests/mymodule/en_US/__init__.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,4 +1,5 @@
from __future__ import unicode_literals
+
from faker.providers import BaseProvider
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/tests/providers/test_geo.py new/Faker-2.0.2/tests/providers/test_geo.py
--- old/Faker-2.0.0/tests/providers/test_geo.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/tests/providers/test_geo.py 2019-08-07 16:25:31.000000000 +0200
@@ -5,8 +5,10 @@
import re
import unittest
from decimal import Decimal
+from six import string_types
from faker import Faker
+from faker.providers.geo.pt_PT import Provider as PtPtProvider
class TestGlobal(unittest.TestCase):
@@ -93,3 +95,14 @@
def test_local_longitude(self):
local_longitude = self.factory.local_longitude()
assert re.match(r"1[1-5]\.\d+", str(local_longitude))
+
+
+class TestPtPT(unittest.TestCase):
+
+ def setUp(self):
+ self.factory = Faker('pt_PT')
+
+ def test_nationality(self):
+ nationality = self.factory.nationality()
+ assert isinstance(nationality, string_types)
+ assert nationality in PtPtProvider.nationalities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/tests/providers/test_user_agent.py new/Faker-2.0.2/tests/providers/test_user_agent.py
--- old/Faker-2.0.0/tests/providers/test_user_agent.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Faker-2.0.2/tests/providers/test_user_agent.py 2019-08-07 16:25:31.000000000 +0200
@@ -0,0 +1,26 @@
+# coding=utf-8
+
+from __future__ import unicode_literals
+
+import unittest
+import re
+
+from faker import Faker
+from faker.providers.user_agent import Provider as UaProvider
+
+
+class TestUserAgent(unittest.TestCase):
+ """ Tests user_agent """
+
+ def setUp(self):
+ self.factory = Faker()
+ self.ua = UaProvider(self.factory)
+
+ def test_android_platform_token(self):
+ for _ in range(0, 1000):
+ assert re.match(r"^(Android) (\d+)(\.\d){0,2}", self.ua.android_platform_token())
+
+ def test_ios_platform_token(self):
+ for _ in range(0, 1000):
+ assert re.match(r"^(iPhone|iPad); CPU (iPhone|iPad) OS (\d+)(_\d){0,2} like Mac OS X",
+ self.ua.ios_platform_token())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/tests/test_base_provider.py new/Faker-2.0.2/tests/test_base_provider.py
--- old/Faker-2.0.0/tests/test_base_provider.py 2019-07-12 17:43:49.000000000 +0200
+++ new/Faker-2.0.2/tests/test_base_provider.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,5 +1,5 @@
-import unittest
import string
+import unittest
import six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/tests/test_factory.py new/Faker-2.0.2/tests/test_factory.py
--- old/Faker-2.0.0/tests/test_factory.py 2019-07-15 16:39:47.000000000 +0200
+++ new/Faker-2.0.2/tests/test_factory.py 2019-09-17 18:55:32.000000000 +0200
@@ -3,19 +3,19 @@
from __future__ import unicode_literals
import re
-import unittest
import string
import sys
+import unittest
from collections import OrderedDict
from ipaddress import ip_address, ip_network
-import six
import pytest
+import six
-from faker import Generator, Faker
+from faker import Faker, Generator
from faker.generator import random
-from faker.utils import text, decorators
+from faker.utils import decorators, text
class BarProvider(object):
@@ -466,6 +466,16 @@
with pytest.raises(ValueError):
provider.pyfloat(left_digits=0, right_digits=0)
+ def test_pyfloat_in_range(self):
+ # tests for https://github.com/joke2k/faker/issues/994
+ factory = Faker()
+
+ factory.seed_instance(5)
+ result = factory.pyfloat(min_value=0, max_value=1)
+
+ assert result >= 0.0
+ assert result <= 1.0
+
def test_negative_pyfloat(self):
# tests for https://github.com/joke2k/faker/issues/813
factory = Faker()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/tests/test_generator.py new/Faker-2.0.2/tests/test_generator.py
--- old/Faker-2.0.0/tests/test_generator.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/tests/test_generator.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,4 +1,5 @@
import unittest
+
from faker import Generator
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-2.0.0/tests/utils/test_utils.py new/Faker-2.0.2/tests/utils/test_utils.py
--- old/Faker-2.0.0/tests/utils/test_utils.py 2019-07-12 17:17:07.000000000 +0200
+++ new/Faker-2.0.2/tests/utils/test_utils.py 2019-08-07 16:33:32.000000000 +0200
@@ -1,14 +1,14 @@
-from faker.utils.loading import find_available_locales
-from faker.utils.distribution import choices_distribution, choices_distribution_unique
-from faker.utils.datasets import add_dicts
-from faker.config import PROVIDERS
-from faker.generator import random
-from faker.utils.loading import find_available_providers
-from faker.config import META_PROVIDERS_MODULES
-from importlib import import_module
-import unittest
import json
import os
+import unittest
+
+from importlib import import_module
+
+from faker.config import META_PROVIDERS_MODULES, PROVIDERS
+from faker.generator import random
+from faker.utils.datasets import add_dicts
+from faker.utils.distribution import choices_distribution, choices_distribution_unique
+from faker.utils.loading import find_available_locales, find_available_providers
TEST_DIR = os.path.dirname(__file__)
1
0
Hello community,
here is the log from the commit of package python-CherryPy for openSUSE:Factory checked in at 2019-09-30 15:54:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-CherryPy (Old)
and /work/SRC/openSUSE:Factory/.python-CherryPy.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-CherryPy"
Mon Sep 30 15:54:17 2019 rev:22 rq:732878 version:18.2.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-CherryPy/python-CherryPy.changes 2019-07-30 13:03:00.162419165 +0200
+++ /work/SRC/openSUSE:Factory/.python-CherryPy.new.2352/python-CherryPy.changes 2019-09-30 15:54:24.670013057 +0200
@@ -1,0 +2,11 @@
+Tue Sep 24 08:49:15 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 18.2.0:
+ * File-based sessions no longer attempt to remove the lock files
+ when releasing locks, instead deferring to the default behavior
+ of zc.lockfile. Fixes :issue:`1391` and :issue:`1779`.
+ * Add native support for 308 Permanent Redirect usable via raise
+ cherrypy.HTTPRedirect('/new_uri', 308).
+- Drop merged patch pytest5.patch
+
+-------------------------------------------------------------------
Old:
----
CherryPy-18.1.2.tar.gz
pytest5.patch
New:
----
CherryPy-18.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-CherryPy.spec ++++++
--- /var/tmp/diff_new_pack.fLVfTG/_old 2019-09-30 15:54:25.990009544 +0200
+++ /var/tmp/diff_new_pack.fLVfTG/_new 2019-09-30 15:54:25.994009533 +0200
@@ -19,14 +19,13 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-CherryPy
-Version: 18.1.2
+Version: 18.2.0
Release: 0
Summary: Object-Oriented HTTP framework
License: BSD-3-Clause
Group: Development/Languages/Python
URL: http://www.cherrypy.org
Source: https://files.pythonhosted.org/packages/source/C/CherryPy/CherryPy-%{versio…
-Patch0: pytest5.patch
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -70,7 +69,6 @@
%prep
%setup -q -n CherryPy-%{version}
-%patch0 -p1
# do not require cov/xdist/etc
sed -i -e '/addopts/d' pytest.ini
@@ -79,12 +77,12 @@
%install
%python_install
+%python_expand rm -r %{buildroot}%{$python_sitelib}/cherrypy/test
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/cherryd
%check
-# gh#cherrypy/cherrypy#1781
-%pytest -k 'not (test_wait_publishes_periodically or test_null_bytes)'
+%pytest -k 'not test_null_bytes'
%post
%python_install_alternative cherryd
++++++ CherryPy-18.1.2.tar.gz -> CherryPy-18.2.0.tar.gz ++++++
++++ 1728 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-CairoSVG for openSUSE:Factory checked in at 2019-09-30 15:54:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-CairoSVG (Old)
and /work/SRC/openSUSE:Factory/.python-CairoSVG.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-CairoSVG"
Mon Sep 30 15:54:05 2019 rev:7 rq:732870 version:2.4.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-CairoSVG/python-CairoSVG.changes 2019-09-23 12:02:42.245951994 +0200
+++ /work/SRC/openSUSE:Factory/.python-CairoSVG.new.2352/python-CairoSVG.changes 2019-09-30 15:54:09.266054051 +0200
@@ -1,0 +2,7 @@
+Tue Sep 24 08:46:49 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 2.4.2:
+ * Fix race condition in tests
+ * Fix scale for images with no viewBox
+
+-------------------------------------------------------------------
Old:
----
CairoSVG-2.4.1.tar.gz
New:
----
CairoSVG-2.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-CairoSVG.spec ++++++
--- /var/tmp/diff_new_pack.AWCCT0/_old 2019-09-30 15:54:09.934052273 +0200
+++ /var/tmp/diff_new_pack.AWCCT0/_new 2019-09-30 15:54:09.938052263 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-CairoSVG
-Version: 2.4.1
+Version: 2.4.2
Release: 0
Summary: A Python SVG converter based on Cairo
License: LGPL-3.0-or-later
@@ -68,7 +68,7 @@
%python_clone -a %{buildroot}/%{_bindir}/cairosvg
%check
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix}
+%pytest
%post
%python_install_alternative cairosvg
++++++ CairoSVG-2.4.1.tar.gz -> CairoSVG-2.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CairoSVG-2.4.1/CairoSVG.egg-info/PKG-INFO new/CairoSVG-2.4.2/CairoSVG.egg-info/PKG-INFO
--- old/CairoSVG-2.4.1/CairoSVG.egg-info/PKG-INFO 2019-08-21 12:10:32.000000000 +0200
+++ new/CairoSVG-2.4.2/CairoSVG.egg-info/PKG-INFO 2019-09-10 16:06:10.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CairoSVG
-Version: 2.4.1
+Version: 2.4.2
Summary: A Simple SVG Converter based on Cairo
Home-page: http://www.cairosvg.org/
Author: Guillaume Ayoub
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CairoSVG-2.4.1/PKG-INFO new/CairoSVG-2.4.2/PKG-INFO
--- old/CairoSVG-2.4.1/PKG-INFO 2019-08-21 12:10:32.000000000 +0200
+++ new/CairoSVG-2.4.2/PKG-INFO 2019-09-10 16:06:11.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CairoSVG
-Version: 2.4.1
+Version: 2.4.2
Summary: A Simple SVG Converter based on Cairo
Home-page: http://www.cairosvg.org/
Author: Guillaume Ayoub
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CairoSVG-2.4.1/cairosvg/VERSION new/CairoSVG-2.4.2/cairosvg/VERSION
--- old/CairoSVG-2.4.1/cairosvg/VERSION 2019-08-21 12:03:38.000000000 +0200
+++ new/CairoSVG-2.4.2/cairosvg/VERSION 2019-09-10 16:04:33.000000000 +0200
@@ -1 +1 @@
-2.4.1
\ No newline at end of file
+2.4.2
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CairoSVG-2.4.1/cairosvg/surface.py new/CairoSVG-2.4.2/cairosvg/surface.py
--- old/CairoSVG-2.4.1/cairosvg/surface.py 2019-05-29 17:27:14.000000000 +0200
+++ new/CairoSVG-2.4.2/cairosvg/surface.py 2019-09-08 21:40:06.000000000 +0200
@@ -189,6 +189,8 @@
self.font_size = size(self, '12pt')
self.stroke_and_fill = True
width, height, viewbox = node_format(self, tree)
+ if viewbox is None:
+ viewbox = (0, 0, width, height)
if output_width and output_height:
width, height = output_width, output_height
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CairoSVG-2.4.1/cairosvg/test_api.py new/CairoSVG-2.4.2/cairosvg/test_api.py
--- old/CairoSVG-2.4.1/cairosvg/test_api.py 2019-02-15 13:46:16.000000000 +0100
+++ new/CairoSVG-2.4.2/cairosvg/test_api.py 2019-08-22 12:07:42.000000000 +0200
@@ -144,10 +144,10 @@
def test_script():
"""Test the ``cairosvg`` script and the ``main`` function."""
- expected_png = svg2png(SVG_SAMPLE)
- expected_pdf = svg2pdf(SVG_SAMPLE)
+ expected_png = svg2png(SVG_SAMPLE)[:100]
+ expected_pdf = svg2pdf(SVG_SAMPLE)[:100]
- def test_main(args, exit_=False, input_=None):
+ def test_main(args, exit_=False, input_=None, full=False):
"""Test main called with given ``args``.
If ``exit_`` is ``True``, check that ``SystemExit`` is raised. We then
@@ -179,7 +179,7 @@
sys.stdout.flush()
output = output_buffer.getvalue()
sys.stdin, sys.stdout = old_stdin, old_stdout
- return output
+ return output if full else output[:100]
with tempfile.NamedTemporaryFile(delete=False) as file_object:
file_object.write(SVG_SAMPLE)
@@ -198,9 +198,8 @@
assert test_main(['-'], input_=svg_filename) == expected_pdf
# Test DPI
- output = test_main([svg_filename, '-d', '10', '-f', 'png'])
+ output = test_main([svg_filename, '-d', '10', '-f', 'png'], full=True)
image = cairo.ImageSurface.create_from_png(io.BytesIO(output))
- print(image.get_width(), image.get_height())
assert image.get_width() == 40
assert image.get_height() == 50
@@ -209,17 +208,17 @@
temp_1 = os.path.join(temp, 'result_1')
# Default to PDF
assert not test_main([svg_filename, '-o', temp_1])
- assert read_file(temp_1) == expected_pdf
+ assert read_file(temp_1)[:100] == expected_pdf
temp_2 = os.path.join(temp, 'result_2.png')
# Guess from the file extension
assert not test_main([svg_filename, '-o', temp_2])
- assert read_file(temp_2) == expected_png
+ assert read_file(temp_2)[:100] == expected_png
temp_3 = os.path.join(temp, 'result_3.png')
# Explicit -f wins
assert not test_main([svg_filename, '-o', temp_3, '-f', 'pdf'])
- assert read_file(temp_3) == expected_pdf
+ assert read_file(temp_3)[:100] == expected_pdf
finally:
shutil.rmtree(temp)
1
0
Hello community,
here is the log from the commit of package python-tqdm for openSUSE:Factory checked in at 2019-09-30 15:54:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tqdm (Old)
and /work/SRC/openSUSE:Factory/.python-tqdm.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tqdm"
Mon Sep 30 15:54:00 2019 rev:23 rq:732611 version:4.36.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tqdm/python-tqdm.changes 2019-08-27 10:11:28.587979169 +0200
+++ /work/SRC/openSUSE:Factory/.python-tqdm.new.2352/python-tqdm.changes 2019-09-30 15:54:01.390075011 +0200
@@ -1,0 +2,34 @@
+Sat Sep 21 19:13:08 UTC 2019 - Arun Persaud <arun(a)gmx.de>
+
+- update to version 4.36.1:
+ * fix CLI entrypoint
+
+- changes from version 4.36.0:
+ * expose more custom format params
+ * potential thread safety fix (#548)
+ * update submodule architecture (#198 -> #800)
+ + backward-compatibility
+ + expose utils
+ + rename main -> cli
+ + add/fix tests
+ + fix minor cached var optimisation
+ + gui partial upgrade (#790)
+ + notebook upgrade (#790)
+ support {bar} in bar_format (#594)
+ inherit methods including set_*(refresh) (#740 -> #741)
+ + ready for contrib releases (#252)
+ * support custom bar_format with unknown total
+ * fix tqdm_notebook red block on explicit file=None (#791)
+ * update notebook to fully support custom bar_format (#594, #649)
+ * misc tidy
+ + warnings
+ + linting
+ + update submodule contribution guide (#252)
+ + parallel (py)make test
+ + fix Zenodo metadata
+ * update documentation
+ + pandas, notebook, gui (#245)
+ + indentation
+ + update multiprocessing and multithreading examples (#796)
+
+-------------------------------------------------------------------
Old:
----
tqdm-4.35.0.tar.gz
New:
----
tqdm-4.36.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-tqdm.spec ++++++
--- /var/tmp/diff_new_pack.dXmkPp/_old 2019-09-30 15:54:02.334072499 +0200
+++ /var/tmp/diff_new_pack.dXmkPp/_new 2019-09-30 15:54:02.338072488 +0200
@@ -28,7 +28,7 @@
%bcond_with test
%endif
Name: python-tqdm%{suffix}
-Version: 4.35.0
+Version: 4.36.1
Release: 0
Summary: An extensible progress meter
License: MPL-2.0 AND MIT
++++++ tqdm-4.35.0.tar.gz -> tqdm-4.36.1.tar.gz ++++++
++++ 6043 lines of diff (skipped)
1
0