Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-mocket for openSUSE:Factory checked in at 2021-01-15 19:43:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-mocket (Old) and /work/SRC/openSUSE:Factory/.python-mocket.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mocket" Fri Jan 15 19:43:58 2021 rev:9 rq:862099 version:3.9.35 Changes: -------- --- /work/SRC/openSUSE:Factory/python-mocket/python-mocket.changes 2020-12-21 12:35:21.446957894 +0100 +++ /work/SRC/openSUSE:Factory/.python-mocket.new.28504/python-mocket.changes 2021-01-15 19:44:20.217849859 +0100 @@ -1,0 +2,6 @@ +Sun Jan 3 10:37:41 UTC 2021 - Sebastian Wagner <sebix+novell....@sebix.at> + +- update to version 3.9.35: + - Removing Python 2 compatibility layer (#134). + +------------------------------------------------------------------- Old: ---- mocket-3.9.4.tar.gz New: ---- mocket-3.9.35.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-mocket.spec ++++++ --- /var/tmp/diff_new_pack.iPwttO/_old 2021-01-15 19:44:20.805850822 +0100 +++ /var/tmp/diff_new_pack.iPwttO/_new 2021-01-15 19:44:20.805850822 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-mocket # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,7 @@ %bcond_with test %endif Name: python-mocket%{psuffix} -Version: 3.9.4 +Version: 3.9.35 Release: 0 Summary: Python socket mock framework License: BSD-3-Clause ++++++ mocket-3.9.4.tar.gz -> mocket-3.9.35.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/PKG-INFO new/mocket-3.9.35/PKG-INFO --- old/mocket-3.9.4/PKG-INFO 2020-12-02 23:09:34.530291300 +0100 +++ new/mocket-3.9.35/PKG-INFO 2021-01-02 15:20:32.112968000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: mocket -Version: 3.9.4 +Version: 3.9.35 Summary: Socket Mock Framework - for all kinds of socket animals, web-clients included - with gevent/asyncio/SSL support Home-page: https://github.com/mindflayer/python-mocket Author: Giorgio Salluzzo @@ -35,6 +35,8 @@ ========== Starting from *3.7.0*, Mocket major version will follow the same numbering pattern as Python's and therefore indicate the most recent Python version that is supported. + FYI: the last version compatible with Python 2.7 is *3.9.4*, bugfixing or backporting of features introduced after that release will only be available as commercial support. + Support it ========== *Star* the project on GitHub, *Buy Me a Coffee* clicking the button below or, even better, contribute with patches or documentation. @@ -342,7 +344,6 @@ Classifier: Development Status :: 6 - Mature Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/Pipfile new/mocket-3.9.35/Pipfile --- old/mocket-3.9.4/Pipfile 2020-12-02 23:09:20.000000000 +0100 +++ new/mocket-3.9.35/Pipfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -[[source]] -url = "https://pypi.python.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -python-magic = ">=0.4.5" -six = ">=1.5.0" -decorator = ">=4.0.0" -urllib3 = ">=1.25.3" -http-parser = ">=0.9.0" - -[dev-packages] -pre-commit = "*" -pytest = ">4.6" -pytest-cov = "*" -mock = "*" -requests = "*" -redis = "*" -gevent = "*" -sure = "*" -pook = "*" -flake8 = "*" -twine = "*" -anaconda-client = "*" -pipfile = "*" -wheel = "*" - -[requires] -python_version = "3.8" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/README.rst new/mocket-3.9.35/README.rst --- old/mocket-3.9.4/README.rst 2020-11-09 11:49:45.000000000 +0100 +++ new/mocket-3.9.35/README.rst 2021-01-02 15:19:24.000000000 +0100 @@ -27,6 +27,8 @@ ========== Starting from *3.7.0*, Mocket major version will follow the same numbering pattern as Python's and therefore indicate the most recent Python version that is supported. +FYI: the last version compatible with Python 2.7 is *3.9.4*, bugfixing or backporting of features introduced after that release will only be available as commercial support. + Support it ========== *Star* the project on GitHub, *Buy Me a Coffee* clicking the button below or, even better, contribute with patches or documentation. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket/__init__.py new/mocket-3.9.35/mocket/__init__.py --- old/mocket-3.9.4/mocket/__init__.py 2020-12-02 23:09:20.000000000 +0100 +++ new/mocket-3.9.35/mocket/__init__.py 2021-01-02 15:19:24.000000000 +0100 @@ -7,4 +7,4 @@ __all__ = ("mocketize", "Mocket", "MocketEntry", "Mocketizer") -__version__ = "3.9.4" +__version__ = "3.9.35" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket/async_mocket.py new/mocket-3.9.35/mocket/async_mocket.py --- old/mocket-3.9.4/mocket/async_mocket.py 2020-10-09 19:05:44.000000000 +0200 +++ new/mocket-3.9.35/mocket/async_mocket.py 2021-01-02 15:19:24.000000000 +0100 @@ -1,50 +1,19 @@ -from sys import version_info - -import decorator - -from mocket import Mocket, Mocketizer +from mocket import Mocketizer def get_async_mocketize(): - major, minor = version_info[:2] - if major == 3 and minor >= 5: - - class AsyncMocketizer(Mocketizer): - async def __aenter__(self): - Mocket.enable( - namespace=self.namespace, - truesocket_recording_dir=self.truesocket_recording_dir, - ) - if self.instance: - self.check_and_call("mocketize_setup") - - async def __aexit__(self, type, value, tb): - if self.instance: - self.check_and_call("mocketize_teardown") - Mocket.disable() - - @staticmethod - def async_wrap(test=None, truesocket_recording_dir=None): - async def wrapper(t, *args, **kw): - instance = args[0] if args else None - namespace = ".".join( - ( - instance.__class__.__module__, - instance.__class__.__name__, - t.__name__, - ) - ) - async with AsyncMocketizer( - instance, - namespace=namespace, - truesocket_recording_dir=truesocket_recording_dir, - ): - await t(*args, **kw) - return wrapper - - return decorator.decorator(wrapper, test) + class AsyncMocketizer(Mocketizer): + async def __aenter__(*args, **kwargs): + return Mocketizer.__enter__(*args, **kwargs) + + async def __aexit__(*args, **kwargs): + return Mocketizer.__exit__(*args, **kwargs) + + @staticmethod + def async_wrap(*args, **kwargs): + return Mocketizer.wrap(*args, **kwargs) - return AsyncMocketizer.async_wrap + return AsyncMocketizer.async_wrap async_mocketize = get_async_mocketize() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket/compat.py new/mocket-3.9.35/mocket/compat.py --- old/mocket-3.9.4/mocket/compat.py 2020-10-09 19:05:44.000000000 +0200 +++ new/mocket-3.9.35/mocket/compat.py 2021-01-02 15:19:24.000000000 +0100 @@ -1,41 +1,15 @@ import codecs import os import shlex -import sys -from socket import error as sock_error - -import six encoding = os.getenv("MOCKET_ENCODING", "utf-8") -text_type = six.text_type -byte_type = six.binary_type -basestring = six.string_types - -PY2 = sys.version_info[0] == 2 -if PY2: - import collections as collections_abc - from BaseHTTPServer import BaseHTTPRequestHandler - from urlparse import urlsplit, parse_qs, unquote - - def unquote_utf8(qs): - if isinstance(qs, text_type): - qs = qs.encode(encoding) - s = unquote(qs) - if isinstance(s, byte_type): - return s.decode(encoding) - else: - return s - - FileNotFoundError = IOError - BlockingIOError = sock_error -else: - import collections.abc as collections_abc - from http.server import BaseHTTPRequestHandler - from urllib.parse import urlsplit, parse_qs, unquote as unquote_utf8 +text_type = str +byte_type = bytes +basestring = (str,) - FileNotFoundError = FileNotFoundError - BlockingIOError = BlockingIOError +FileNotFoundError = FileNotFoundError +BlockingIOError = BlockingIOError try: from json.decoder import JSONDecodeError @@ -56,10 +30,7 @@ def shsplit(s): - if PY2: - s = encode_to_bytes(s) - else: - s = decode_from_bytes(s) + s = decode_from_bytes(s) return shlex.split(s) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket/mocket.py new/mocket-3.9.35/mocket/mocket.py --- old/mocket-3.9.4/mocket/mocket.py 2020-11-09 17:07:57.000000000 +0100 +++ new/mocket-3.9.35/mocket/mocket.py 2021-01-02 15:19:24.000000000 +0100 @@ -1,4 +1,5 @@ import collections +import collections.abc as collections_abc import errno import hashlib import io @@ -20,7 +21,6 @@ JSONDecodeError, basestring, byte_type, - collections_abc, decode_from_bytes, encode_to_bytes, text_type, @@ -77,14 +77,11 @@ if isinstance(sock, MocketSocket): self.sock = sock self.sock._host = server_hostname - if true_ssl_context: - self.sock.true_socket = true_ssl_socket( - sock=self.sock.true_socket, - server_hostname=server_hostname, - _context=true_ssl_context(protocol=SSL_PROTOCOL), - ) - else: # Python 2. - self.sock.true_socket = true_ssl_socket(sock=self.sock.true_socket) + self.sock.true_socket = true_ssl_socket( + sock=self.sock.true_socket, + server_hostname=server_hostname, + _context=true_ssl_context(protocol=SSL_PROTOCOL), + ) elif isinstance(sock, int) and true_ssl_context: self.context = true_ssl_context(sock) @@ -586,6 +583,7 @@ ) if self.instance: self.check_and_call("mocketize_setup") + return self def __exit__(self, type, value, tb): if self.instance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket/mockhttp.py new/mocket-3.9.35/mocket/mockhttp.py --- old/mocket-3.9.4/mocket/mockhttp.py 2020-10-11 12:45:14.000000000 +0200 +++ new/mocket-3.9.35/mocket/mockhttp.py 2021-01-02 15:19:24.000000000 +0100 @@ -1,17 +1,9 @@ -from __future__ import unicode_literals - import re import time +from http.server import BaseHTTPRequestHandler +from urllib.parse import parse_qs, unquote, urlsplit -from .compat import ( - BaseHTTPRequestHandler, - decode_from_bytes, - do_the_magic, - encode_to_bytes, - parse_qs, - unquote_utf8, - urlsplit, -) +from .compat import decode_from_bytes, do_the_magic, encode_to_bytes from .mocket import Mocket, MocketEntry try: @@ -41,7 +33,7 @@ self.path = self.parser.get_path() self.headers = self.parser.get_headers() self.querystring = parse_qs( - unquote_utf8(self.parser.get_query_string()), keep_blank_values=True + unquote(self.parser.get_query_string()), keep_blank_values=True ) if self.querystring: self.path += "?{}".format(self.parser.get_query_string()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket/mockredis.py new/mocket-3.9.35/mocket/mockredis.py --- old/mocket-3.9.4/mocket/mockredis.py 2020-10-11 12:45:14.000000000 +0200 +++ new/mocket-3.9.35/mocket/mockredis.py 2021-01-02 15:19:24.000000000 +0100 @@ -1,5 +1,3 @@ -from __future__ import unicode_literals - from itertools import chain from .compat import byte_type, decode_from_bytes, encode_to_bytes, shsplit, text_type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket.egg-info/PKG-INFO new/mocket-3.9.35/mocket.egg-info/PKG-INFO --- old/mocket-3.9.4/mocket.egg-info/PKG-INFO 2020-12-02 23:09:34.000000000 +0100 +++ new/mocket-3.9.35/mocket.egg-info/PKG-INFO 2021-01-02 15:20:31.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: mocket -Version: 3.9.4 +Version: 3.9.35 Summary: Socket Mock Framework - for all kinds of socket animals, web-clients included - with gevent/asyncio/SSL support Home-page: https://github.com/mindflayer/python-mocket Author: Giorgio Salluzzo @@ -35,6 +35,8 @@ ========== Starting from *3.7.0*, Mocket major version will follow the same numbering pattern as Python's and therefore indicate the most recent Python version that is supported. + FYI: the last version compatible with Python 2.7 is *3.9.4*, bugfixing or backporting of features introduced after that release will only be available as commercial support. + Support it ========== *Star* the project on GitHub, *Buy Me a Coffee* clicking the button below or, even better, contribute with patches or documentation. @@ -342,7 +344,6 @@ Classifier: Development Status :: 6 - Mature Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket.egg-info/SOURCES.txt new/mocket-3.9.35/mocket.egg-info/SOURCES.txt --- old/mocket-3.9.4/mocket.egg-info/SOURCES.txt 2020-12-02 23:09:34.000000000 +0100 +++ new/mocket-3.9.35/mocket.egg-info/SOURCES.txt 2021-01-02 15:20:31.000000000 +0100 @@ -1,6 +1,5 @@ LICENSE MANIFEST.in -Pipfile README.rst requirements.txt setup.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/mocket.egg-info/requires.txt new/mocket-3.9.35/mocket.egg-info/requires.txt --- old/mocket-3.9.4/mocket.egg-info/requires.txt 2020-12-02 23:09:34.000000000 +0100 +++ new/mocket-3.9.35/mocket.egg-info/requires.txt 2021-01-02 15:20:31.000000000 +0100 @@ -1,7 +1,6 @@ decorator>=4.0.0 http-parser>=0.9.0 python-magic>=0.4.5 -six>=1.5.0 urllib3>=1.25.3 [dev] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/requirements.txt new/mocket-3.9.35/requirements.txt --- old/mocket-3.9.4/requirements.txt 2020-12-02 23:09:34.000000000 +0100 +++ new/mocket-3.9.35/requirements.txt 2021-01-02 15:20:31.000000000 +0100 @@ -1,5 +1,4 @@ python-magic>=0.4.5 -six>=1.5.0 decorator>=4.0.0 urllib3>=1.25.3 http-parser>=0.9.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mocket-3.9.4/setup.py new/mocket-3.9.35/setup.py --- old/mocket-3.9.4/setup.py 2020-12-02 22:59:42.000000000 +0100 +++ new/mocket-3.9.35/setup.py 2021-01-02 15:19:24.000000000 +0100 @@ -49,13 +49,12 @@ "dev": [], "pook": pook_requires, # plugins version supporting mocket.plugins.pook.MocketEngine }, - test_suite="runtests.runtests", + test_suite="run_tests.main", license="BSD", classifiers=[ "Development Status :: 6 - Mature", "Intended Audience :: Developers", "Operating System :: OS Independent", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7",