Hello community, here is the log from the commit of package python-rfc3986 for openSUSE:Factory checked in at 2019-03-07 10:49:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rfc3986 (Old) and /work/SRC/openSUSE:Factory/.python-rfc3986.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rfc3986" Thu Mar 7 10:49:41 2019 rev:6 rq:681803 version:1.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-rfc3986/python-rfc3986.changes 2018-12-24 11:46:20.453189201 +0100 +++ /work/SRC/openSUSE:Factory/.python-rfc3986.new.28833/python-rfc3986.changes 2019-03-07 10:50:29.573852662 +0100 @@ -1,0 +2,20 @@ +Tue Mar 5 15:02:39 UTC 2019 - Thomas Bechtold <[email protected]> + +- update to 1.2.0: + * Update abnf_regexp.py + * Update uri.py + * Add test cases for 933d429f + * Allow percent-encoded bytes in host + * Remove unnecessary whitespace + * Correct name throughout the project + * Percent-encode % chars + * Minor tweak for cleaner logic + * Add test cases specifically for % detection + * Make package building Windows-friendly + * Tack on changes for #35 + * Drop Python 3.3, add Python 3.6 and 3.7 + * Update for new organization home + * Bump version to 1.2.0 + * Use the encoding param in to_str and to_bytes + +------------------------------------------------------------------- Old: ---- rfc3986-1.1.0.tar.gz New: ---- rfc3986-1.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rfc3986.spec ++++++ --- /var/tmp/diff_new_pack.F3ApIe/_old 2019-03-07 10:50:31.925852036 +0100 +++ /var/tmp/diff_new_pack.F3ApIe/_new 2019-03-07 10:50:31.929852036 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-rfc3986 # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-rfc3986 -Version: 1.1.0 +Version: 1.2.0 Release: 0 Summary: Python module for validating URI references per RFC 3986 License: Apache-2.0 ++++++ rfc3986-1.1.0.tar.gz -> rfc3986-1.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/AUTHORS.rst new/rfc3986-1.2.0/AUTHORS.rst --- old/rfc3986-1.1.0/AUTHORS.rst 2017-01-19 15:23:04.000000000 +0100 +++ new/rfc3986-1.2.0/AUTHORS.rst 2018-12-04 15:03:12.000000000 +0100 @@ -1,9 +1,14 @@ Development Lead ---------------- -- Ian Cordasco <[email protected]> +- Ian Stapleton Cordasco <[email protected]> Contributors ------------ -None yet! +- Thomas Weißschuh +- Kostya Esmukov +- Derek Higgins +- Victor Stinner +- Viktor Haag +- Seth Michael Larson diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/PKG-INFO new/rfc3986-1.2.0/PKG-INFO --- old/rfc3986-1.1.0/PKG-INFO 2017-07-18 14:18:10.000000000 +0200 +++ new/rfc3986-1.2.0/PKG-INFO 2018-12-04 15:03:31.000000000 +0100 @@ -1,9 +1,9 @@ Metadata-Version: 1.1 Name: rfc3986 -Version: 1.1.0 +Version: 1.2.0 Summary: Validating URI References per RFC 3986 Home-page: http://rfc3986.readthedocs.io -Author: Ian Cordasco +Author: Ian Stapleton Cordasco Author-email: [email protected] License: Apache 2.0 Description: rfc3986 @@ -207,7 +207,7 @@ free to email Ian and find out how you can help. The git repository for this project is maintained at - https://github.com/sigmavirus24/rfc3986 + https://github.com/python-hyper/rfc3986 .. _RFC 3986: http://tools.ietf.org/html/rfc3986 .. _Apache License Version 2.0: https://www.apache.org/licenses/LICENSE-2.0 @@ -220,7 +220,7 @@ Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 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/rfc3986-1.1.0/README.rst new/rfc3986-1.2.0/README.rst --- old/rfc3986-1.1.0/README.rst 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/README.rst 2017-07-26 13:57:53.000000000 +0200 @@ -199,7 +199,7 @@ free to email Ian and find out how you can help. The git repository for this project is maintained at -https://github.com/sigmavirus24/rfc3986 +https://github.com/python-hyper/rfc3986 .. _RFC 3986: http://tools.ietf.org/html/rfc3986 .. _Apache License Version 2.0: https://www.apache.org/licenses/LICENSE-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/docs/source/conf.py new/rfc3986-1.2.0/docs/source/conf.py --- old/rfc3986-1.1.0/docs/source/conf.py 2017-05-10 14:06:41.000000000 +0200 +++ new/rfc3986-1.2.0/docs/source/conf.py 2017-07-27 01:16:26.000000000 +0200 @@ -55,8 +55,8 @@ # General information about the project. project = u'rfc3986' -copyright = u'2017, Ian Cordasco' -author = u'Ian Cordasco' +copyright = u'2017, Ian Stapleton Cordasco' +author = u'Ian Stapleton Cordasco' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -136,7 +136,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'rfc3986.tex', u'rfc3986 Documentation', - u'Ian Cordasco', 'manual'), + u'Ian Stapleton Cordasco', 'manual'), ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/docs/source/release-notes/1.0.0.rst new/rfc3986-1.2.0/docs/source/release-notes/1.0.0.rst --- old/rfc3986-1.1.0/docs/source/release-notes/1.0.0.rst 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/docs/source/release-notes/1.0.0.rst 2017-07-26 13:23:29.000000000 +0200 @@ -23,4 +23,4 @@ .. links .. _issue #2: - https://github.com/sigmavirus24/rfc3986/issues/2 + https://github.com/python-hyper/rfc3986/issues/2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/docs/source/release-notes/1.1.0.rst new/rfc3986-1.2.0/docs/source/release-notes/1.1.0.rst --- old/rfc3986-1.1.0/docs/source/release-notes/1.1.0.rst 2017-07-18 13:58:28.000000000 +0200 +++ new/rfc3986-1.2.0/docs/source/release-notes/1.1.0.rst 2017-07-26 13:23:37.000000000 +0200 @@ -12,4 +12,4 @@ .. links .. _GitHub #26: - https://github.com/sigmavirus24/rfc3986/pull/26 + https://github.com/python-hyper/rfc3986/pull/26 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/docs/source/release-notes/1.2.0.rst new/rfc3986-1.2.0/docs/source/release-notes/1.2.0.rst --- old/rfc3986-1.1.0/docs/source/release-notes/1.2.0.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/rfc3986-1.2.0/docs/source/release-notes/1.2.0.rst 2018-12-04 15:03:12.000000000 +0100 @@ -0,0 +1,28 @@ +1.2.0 -- 2018-12-04 +------------------- + +- Attempt to detect percent-encoded URI components and + encode ``%`` characters if required. + + See also `GitHub #38`_ + +- Allow percent-encoded bytes within host. + + See also `GitHub #39`_ + +- Correct the IPv6 regular expression by adding a missing variation. + +- Fix hashing for URIReferences on Python 3. + + See also `GitHub !35`_ + +.. links + +.. _GitHub !35: + https://github.com/python-hyper/rfc3986/pull/35 + +.. _GitHub #38: + https://github.com/python-hyper/rfc3986/pull/38 + +.. _GitHub #39: + https://github.com/python-hyper/rfc3986/pull/39 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/docs/source/release-notes/index.rst new/rfc3986-1.2.0/docs/source/release-notes/index.rst --- old/rfc3986-1.1.0/docs/source/release-notes/index.rst 2017-07-18 13:54:44.000000000 +0200 +++ new/rfc3986-1.2.0/docs/source/release-notes/index.rst 2018-12-04 15:03:12.000000000 +0100 @@ -10,6 +10,7 @@ .. toctree:: + 1.2.0 1.1.0 1.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/setup.py new/rfc3986-1.2.0/setup.py --- old/rfc3986-1.1.0/setup.py 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/setup.py 2018-12-04 15:03:12.000000000 +0100 @@ -21,11 +21,11 @@ version=rfc3986.__version__, description='Validating URI References per RFC 3986', long_description=readme, - author='Ian Cordasco', + author='Ian Stapleton Cordasco', author_email='[email protected]', url='http://rfc3986.readthedocs.io', packages=packages, - package_dir={'': 'src/'}, + package_dir={'': 'src'}, package_data={'': ['LICENSE']}, include_package_data=True, license='Apache 2.0', @@ -37,9 +37,9 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ), ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/__init__.py new/rfc3986-1.2.0/src/rfc3986/__init__.py --- old/rfc3986-1.1.0/src/rfc3986/__init__.py 2017-07-18 14:16:53.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/__init__.py 2018-12-04 15:03:12.000000000 +0100 @@ -30,11 +30,11 @@ from .parseresult import ParseResult __title__ = 'rfc3986' -__author__ = 'Ian Cordasco' +__author__ = 'Ian Stapleton Cordasco' __author_email__ = '[email protected]' __license__ = 'Apache v2.0' __copyright__ = 'Copyright 2014 Rackspace' -__version__ = '1.1.0' +__version__ = '1.2.0' __all__ = ( 'ParseResult', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/abnf_regexp.py new/rfc3986-1.2.0/src/rfc3986/abnf_regexp.py --- old/rfc3986-1.1.0/src/rfc3986/abnf_regexp.py 2017-07-17 23:21:23.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/abnf_regexp.py 2018-12-04 15:03:12.000000000 +0100 @@ -20,16 +20,16 @@ SUB_DELIMS = SUB_DELIMITERS = "!$&'()*+,;=" SUB_DELIMITERS_SET = set(SUB_DELIMITERS) # Escape the '*' for use in regular expressions -SUB_DELIMITERS_RE = "!$&'()\*+,;=" +SUB_DELIMITERS_RE = r"!$&'()\*+,;=" RESERVED_CHARS_SET = GENERIC_DELIMITERS_SET.union(SUB_DELIMITERS_SET) ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' DIGIT = '0123456789' # https://tools.ietf.org/html/rfc3986#section-2.3 UNRESERVED = UNRESERVED_CHARS = ALPHA + DIGIT + '._!-' UNRESERVED_CHARS_SET = set(UNRESERVED_CHARS) -NON_PCT_ENCODED_SET = RESERVED_CHARS_SET.union(UNRESERVED_CHARS_SET).union('%') +NON_PCT_ENCODED_SET = RESERVED_CHARS_SET.union(UNRESERVED_CHARS_SET) # We need to escape the '-' in this case: -UNRESERVED_RE = 'A-Za-z0-9._~\-' +UNRESERVED_RE = r'A-Za-z0-9._~\-' # Percent encoded character values PERCENT_ENCODED = PCT_ENCODED = '%[A-Fa-f0-9]{2}' @@ -59,9 +59,9 @@ # modified to ignore other matches that are not important to the parsing of # the reference so we can also simply use SRE_Match#groups. URL_PARSING_RE = ( - '(?:(?P<scheme>{scheme}):)?(?://(?P<authority>{authority}))?' - '(?P<path>{path})(?:\?(?P<query>{query}))?' - '(?:#(?P<fragment>{fragment}))?' + r'(?:(?P<scheme>{scheme}):)?(?://(?P<authority>{authority}))?' + r'(?P<path>{path})(?:\?(?P<query>{query}))?' + r'(?:#(?P<fragment>{fragment}))?' ).format(**COMPONENT_PATTERN_DICT) @@ -71,7 +71,7 @@ # Host patterns, see: http://tools.ietf.org/html/rfc3986#section-3.2.2 # The pattern for a regular name, e.g., www.google.com, api.github.com -REGULAR_NAME_RE = REG_NAME = '(({0})*|[{1}]*)'.format( +REGULAR_NAME_RE = REG_NAME = '((?:{0}|[{1}])*)'.format( '%[0-9A-Fa-f]{2}', SUB_DELIMITERS_RE + UNRESERVED_RE ) # The pattern for an IPv4 address, e.g., 192.168.255.255, 127.0.0.1, @@ -107,7 +107,7 @@ '((%(hex)s:){0,6}%(hex)s)?::' % _subs, ] -IPv6_RE = '(({0})|({1})|({2})|({3})|({4})|({5})|({6})|({7}))'.format( +IPv6_RE = '(({0})|({1})|({2})|({3})|({4})|({5})|({6})|({7})|({8}))'.format( *variations ) @@ -120,7 +120,7 @@ ZONE_ID = '(?:[' + UNRESERVED_RE + ']|' + PCT_ENCODED + ')+' IPv6_ADDRZ_RE = IPv6_RE + '%25' + ZONE_ID -IP_LITERAL_RE = '\[({0}|(?:{1})|{2})\]'.format( +IP_LITERAL_RE = r'\[({0}|(?:{1})|{2})\]'.format( IPv6_RE, IPv6_ADDRZ_RE, IPv_FUTURE_RE, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/builder.py new/rfc3986-1.2.0/src/rfc3986/builder.py --- old/rfc3986-1.1.0/src/rfc3986/builder.py 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/builder.py 2017-07-27 01:37:22.000000000 +0200 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2017 Ian Cordasco +# Copyright (c) 2017 Ian Stapleton Cordasco # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/compat.py new/rfc3986-1.2.0/src/rfc3986/compat.py --- old/rfc3986-1.1.0/src/rfc3986/compat.py 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/compat.py 2018-12-04 15:03:12.000000000 +0100 @@ -40,15 +40,15 @@ unicode = str # Python 3.x -def to_str(b, encoding): +def to_str(b, encoding='utf-8'): """Ensure that b is text in the specified encoding.""" if hasattr(b, 'decode') and not isinstance(b, unicode): - b = b.decode('utf-8') + b = b.decode(encoding) return b -def to_bytes(s, encoding): +def to_bytes(s, encoding='utf-8'): """Ensure that s is converted to bytes from the encoding.""" if hasattr(s, 'encode') and not isinstance(s, bytes): - s = s.encode('utf-8') + s = s.encode(encoding) return s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/misc.py new/rfc3986-1.2.0/src/rfc3986/misc.py --- old/rfc3986-1.1.0/src/rfc3986/misc.py 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/misc.py 2018-12-04 15:03:12.000000000 +0100 @@ -75,13 +75,13 @@ # Scheme validation, see: http://tools.ietf.org/html/rfc3986#section-3.1 SCHEME_MATCHER = re.compile('^{0}$'.format(abnf_regexp.SCHEME_RE)) -RELATIVE_REF_MATCHER = re.compile('^%s(\?%s)?(#%s)?$' % ( +RELATIVE_REF_MATCHER = re.compile(r'^%s(\?%s)?(#%s)?$' % ( abnf_regexp.RELATIVE_PART_RE, abnf_regexp.QUERY_RE, abnf_regexp.FRAGMENT_RE, )) # See http://tools.ietf.org/html/rfc3986#section-4.3 -ABSOLUTE_URI_MATCHER = re.compile('^%s:%s(\?%s)?$' % ( +ABSOLUTE_URI_MATCHER = re.compile(r'^%s:%s(\?%s)?$' % ( abnf_regexp.COMPONENT_PATTERN_DICT['scheme'], abnf_regexp.HIER_PART_RE, abnf_regexp.QUERY_RE[1:-1], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/normalizers.py new/rfc3986-1.2.0/src/rfc3986/normalizers.py --- old/rfc3986-1.1.0/src/rfc3986/normalizers.py 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/normalizers.py 2018-12-04 15:03:12.000000000 +0100 @@ -129,7 +129,13 @@ if uri_component is None: return uri_component + # Try to see if the component we're encoding is already percent-encoded + # so we can skip all '%' characters but still encode all others. + percent_encodings = len(PERCENT_MATCHER.findall( + compat.to_str(uri_component, encoding))) + uri_bytes = compat.to_bytes(uri_component, encoding) + is_percent_encoded = percent_encodings == uri_bytes.count(b'%') encoded_uri = bytearray() @@ -137,7 +143,8 @@ # Will return a single character bytestring on both Python 2 & 3 byte = uri_bytes[i:i+1] byte_ord = ord(byte) - if byte_ord < 128 and byte.decode() in misc.NON_PCT_ENCODED: + if ((is_percent_encoded and byte == b'%') + or (byte_ord < 128 and byte.decode() in misc.NON_PCT_ENCODED)): encoded_uri.extend(byte) continue encoded_uri.extend('%{0:02x}'.format(byte_ord).encode()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/parseresult.py new/rfc3986-1.2.0/src/rfc3986/parseresult.py --- old/rfc3986-1.1.0/src/rfc3986/parseresult.py 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/parseresult.py 2017-07-27 01:37:23.000000000 +0200 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015 Ian Cordasco +# Copyright (c) 2015 Ian Stapleton Cordasco # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/uri.py new/rfc3986-1.2.0/src/rfc3986/uri.py --- old/rfc3986-1.1.0/src/rfc3986/uri.py 2017-07-18 13:36:32.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/uri.py 2018-12-04 15:03:12.000000000 +0100 @@ -1,7 +1,7 @@ """Module containing the implementation of the URIReference class.""" # -*- coding: utf-8 -*- # Copyright (c) 2014 Rackspace -# Copyright (c) 2015 Ian Cordasco +# Copyright (c) 2015 Ian Stapleton Cordasco # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -97,6 +97,8 @@ ref.encoding = encoding return ref + __hash__ = tuple.__hash__ + def __eq__(self, other): """Compare this reference to another.""" other_ref = other diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986/validators.py new/rfc3986-1.2.0/src/rfc3986/validators.py --- old/rfc3986-1.1.0/src/rfc3986/validators.py 2017-07-17 23:21:23.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986/validators.py 2017-07-27 01:37:23.000000000 +0200 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2017 Ian Cordasco +# Copyright (c) 2017 Ian Stapleton Cordasco # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/src/rfc3986.egg-info/PKG-INFO new/rfc3986-1.2.0/src/rfc3986.egg-info/PKG-INFO --- old/rfc3986-1.1.0/src/rfc3986.egg-info/PKG-INFO 2017-07-18 14:18:10.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986.egg-info/PKG-INFO 2018-12-04 15:03:31.000000000 +0100 @@ -1,9 +1,9 @@ Metadata-Version: 1.1 Name: rfc3986 -Version: 1.1.0 +Version: 1.2.0 Summary: Validating URI References per RFC 3986 Home-page: http://rfc3986.readthedocs.io -Author: Ian Cordasco +Author: Ian Stapleton Cordasco Author-email: [email protected] License: Apache 2.0 Description: rfc3986 @@ -207,7 +207,7 @@ free to email Ian and find out how you can help. The git repository for this project is maintained at - https://github.com/sigmavirus24/rfc3986 + https://github.com/python-hyper/rfc3986 .. _RFC 3986: http://tools.ietf.org/html/rfc3986 .. _Apache License Version 2.0: https://www.apache.org/licenses/LICENSE-2.0 @@ -220,7 +220,7 @@ Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 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/rfc3986-1.1.0/src/rfc3986.egg-info/SOURCES.txt new/rfc3986-1.2.0/src/rfc3986.egg-info/SOURCES.txt --- old/rfc3986-1.1.0/src/rfc3986.egg-info/SOURCES.txt 2017-07-18 14:18:10.000000000 +0200 +++ new/rfc3986-1.2.0/src/rfc3986.egg-info/SOURCES.txt 2018-12-04 15:03:31.000000000 +0100 @@ -24,6 +24,7 @@ docs/source/release-notes/0.4.2.rst docs/source/release-notes/1.0.0.rst docs/source/release-notes/1.1.0.rst +docs/source/release-notes/1.2.0.rst docs/source/release-notes/index.rst docs/source/user/building.rst docs/source/user/parsing.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/tests/base.py new/rfc3986-1.2.0/tests/base.py --- old/rfc3986-1.1.0/tests/base.py 2017-07-17 23:21:23.000000000 +0200 +++ new/rfc3986-1.2.0/tests/base.py 2018-12-04 15:03:12.000000000 +0100 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015 Ian Cordasco +# Copyright (c) 2015 Ian Stapleton Cordasco # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -119,6 +119,20 @@ assert uri.scheme is None assert uri.authority == relative_uri[2:] + def test_handles_percent_in_path(self, uri_path_with_percent): + """Test that self.test_class encodes the % character properly.""" + uri = self.test_class.from_string(uri_path_with_percent) + print(uri.path) + assert uri.path == '/%25%20' + + def test_handles_percent_in_query(self, uri_query_with_percent): + uri = self.test_class.from_string(uri_query_with_percent) + assert uri.query == 'a=%25' + + def test_handles_percent_in_fragment(self, uri_fragment_with_percent): + uri = self.test_class.from_string(uri_fragment_with_percent) + assert uri.fragment == 'perc%25ent' + class BaseTestUnsplits: test_class = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/tests/conftest.py new/rfc3986-1.2.0/tests/conftest.py --- old/rfc3986-1.1.0/tests/conftest.py 2017-07-17 23:21:23.000000000 +0200 +++ new/rfc3986-1.2.0/tests/conftest.py 2018-12-04 15:03:12.000000000 +0100 @@ -15,6 +15,7 @@ '[21DA:D3:0:2F3B:2AA:FF:FE28:9C5A]', '[FE80::2AA:FF:FE9A:4CA2]', '[FF02::2]', + '[FFFF::]', '[FF02:3::5]', '[FF02:0:0:0:0:0:0:2]', '[FF02:30:0:0:0:0:0:5]', @@ -22,6 +23,7 @@ 'www.example.com', 'localhost', 'http-bin.org', + '%2Fvar%2Frun%2Fsocket' ] invalid_hosts = [ @@ -115,4 +117,20 @@ def invalid_uri(request): return 'https://%s' % request.param + [email protected](params=valid_hosts) +def uri_path_with_percent(request): + return 'https://%s/%% ' % request.param + + [email protected](params=valid_hosts) +def uri_query_with_percent(request): + return 'https://%s?a=%%' % request.param + + [email protected](params=valid_hosts) +def uri_fragment_with_percent(request): + return 'https://%s#perc%%ent' % request.param + + sys.path.insert(0, '.') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/tests/test_builder.py new/rfc3986-1.2.0/tests/test_builder.py --- old/rfc3986-1.1.0/tests/test_builder.py 2017-05-10 13:58:27.000000000 +0200 +++ new/rfc3986-1.2.0/tests/test_builder.py 2018-12-04 15:03:12.000000000 +0100 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2017 Ian Cordasco +# Copyright (c) 2017 Ian Stapleton Cordasco # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -135,6 +135,7 @@ ([('a', 'b+c')], 'a=b%2Bc'), ([('a', 'b'), ('c', 'd')], 'a=b&c=d'), ([('a', 'b'), ('username', '@d')], 'a=b&username=%40d'), + ([('percent', '%')], 'percent=%25'), ]) def test_add_query_from(query_items, expected): """Verify the behaviour of add_query_from.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/tests/test_normalizers.py new/rfc3986-1.2.0/tests/test_normalizers.py --- old/rfc3986-1.1.0/tests/test_normalizers.py 2017-01-19 15:23:04.000000000 +0100 +++ new/rfc3986-1.2.0/tests/test_normalizers.py 2018-12-04 15:03:12.000000000 +0100 @@ -3,7 +3,8 @@ from rfc3986.uri import URIReference from rfc3986.normalizers import ( - normalize_scheme, normalize_percent_characters, remove_dot_segments + normalize_scheme, normalize_percent_characters, + remove_dot_segments, encode_component, ) @@ -76,3 +77,19 @@ uri = URIReference( None, 'example.com', None, None, 'fiz%DF').normalize() assert uri.fragment == 'fiz%DF' + + [email protected]( + ["component", "encoded_component"], + [ + ('/%', '/%25'), + ('/%a', '/%25a'), + ('/%ag', '/%25ag'), + ('/%af', '/%af'), + ('/%20/%', '/%2520/%25'), + ('/%20%25', '/%20%25'), + ('/%21%22%23%ah%12%ff', '/%2521%2522%2523%25ah%2512%25ff'), + ] +) +def test_detect_percent_encoded_component(component, encoded_component): + assert encode_component(component, 'utf-8') == encoded_component diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rfc3986-1.1.0/tests/test_parseresult.py new/rfc3986-1.2.0/tests/test_parseresult.py --- old/rfc3986-1.1.0/tests/test_parseresult.py 2017-01-19 15:23:04.000000000 +0100 +++ new/rfc3986-1.2.0/tests/test_parseresult.py 2017-07-27 01:37:24.000000000 +0200 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2015 Ian Cordasco +# Copyright (c) 2015 Ian Stapleton Cordasco # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at
