Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-devpi-common for
openSUSE:Factory checked in at 2022-10-12 18:25:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-devpi-common (Old)
and /work/SRC/openSUSE:Factory/.python-devpi-common.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-devpi-common"
Wed Oct 12 18:25:53 2022 rev:3 rq:1010149 version:3.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-devpi-common/python-devpi-common.changes
2021-08-03 22:49:31.396440235 +0200
+++
/work/SRC/openSUSE:Factory/.python-devpi-common.new.2275/python-devpi-common.changes
2022-10-12 18:27:37.626077598 +0200
@@ -1,0 +2,11 @@
+Wed Oct 12 03:05:13 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- Update to version 3.7.0
+ Features
+ Add hash_type and fragment attributes to URL class.
+ Replace pkg_resources usage with packaging.
+ Bug Fixes
+ Fix #895: return content of data-yanked.
+ Fixed some cases where name and version weren???t split off correctly from
filename.
+
+-------------------------------------------------------------------
Old:
----
devpi-common-3.6.0.tar.gz
New:
----
devpi-common-3.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-devpi-common.spec ++++++
--- /var/tmp/diff_new_pack.xITlTl/_old 2022-10-12 18:27:38.034078497 +0200
+++ /var/tmp/diff_new_pack.xITlTl/_new 2022-10-12 18:27:38.042078514 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-devpi-common
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# 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-devpi-common
-Version: 3.6.0
+Version: 3.7.0
Release: 0
Summary: Utilities jointly used by devpi-server and devpi-client
License: MIT
++++++ devpi-common-3.6.0.tar.gz -> devpi-common-3.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/CHANGELOG
new/devpi-common-3.7.0/CHANGELOG
--- old/devpi-common-3.6.0/CHANGELOG 2020-09-13 12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/CHANGELOG 2022-08-16 11:12:42.000000000 +0200
@@ -2,6 +2,27 @@
.. towncrier release notes start
+
+3.7.0 (2022-08-16)
+==================
+
+
+Features
+--------
+
+- Add ``hash_type`` and ``fragment`` attributes to URL class.
+
+- Replace ``pkg_resources`` usage with ``packaging``.
+
+
+Bug Fixes
+---------
+
+- Fix #895: return content of data-yanked.
+
+- Fixed some cases where name and version weren't split off correctly from
filename.
+
+
3.6.0 (2020-09-13)
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/PKG-INFO
new/devpi-common-3.7.0/PKG-INFO
--- old/devpi-common-3.6.0/PKG-INFO 2020-09-13 12:09:18.000000000 +0200
+++ new/devpi-common-3.7.0/PKG-INFO 2022-08-16 11:12:47.907570600 +0200
@@ -1,75 +1,11 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: devpi-common
-Version: 3.6.0
+Version: 3.7.0
Summary: utilities jointly used by devpi-server and devpi-client
Home-page: https://github.com/devpi/devpi
-Maintainer: Holger Krekel
-Maintainer-email: [email protected]
+Maintainer: Florian Schulze
+Maintainer-email: [email protected]
License: MIT
-Description:
- This package contains utility functions used by devpi-server and
devpi-client.
-
- See http://doc.devpi.net for more information.
-
-
- =========
- Changelog
- =========
-
-
-
- .. towncrier release notes start
-
- 3.6.0 (2020-09-13)
- ==================
-
- Features
- --------
-
- - Hide password from URL representation.
-
- - Allow replacement of individual netloc parts with URL.replace method.
-
-
- 3.5.0 (2020-05-04)
- ==================
-
- Features
- --------
-
- - fix #792: support data-yanked attribute in HTMLPage parser.
-
- - Replace "cached_property" with "lazy" package, which uses __dict__
directly for much faster reads.
-
-
- 3.4.0 (2019-06-28)
- ==================
-
- Features
- --------
-
- - Added full query string support to URL object.
-
-
- 3.3.2 (2019-04-04)
- ==================
-
- Bug Fixes
- ---------
-
- - Fix #641: support change of return code from string to integer in
tox 3.8.x.
-
-
- 3.3.1 (2018-09-18)
- ==================
-
- Bug Fixes
- ---------
-
- - Fix uploading documentation in devpi-client < 4.1.0.
-
-
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
@@ -81,3 +17,80 @@
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+License-File: LICENSE
+
+
+This package contains utility functions used by devpi-server and devpi-client.
+
+See http://doc.devpi.net for more information.
+
+
+=========
+Changelog
+=========
+
+
+
+.. towncrier release notes start
+
+
+3.7.0 (2022-08-16)
+==================
+
+
+Features
+--------
+
+- Add ``hash_type`` and ``fragment`` attributes to URL class.
+
+- Replace ``pkg_resources`` usage with ``packaging``.
+
+
+Bug Fixes
+---------
+
+- Fix #895: return content of data-yanked.
+
+- Fixed some cases where name and version weren't split off correctly from
filename.
+
+
+3.6.0 (2020-09-13)
+==================
+
+Features
+--------
+
+- Hide password from URL representation.
+
+- Allow replacement of individual netloc parts with URL.replace method.
+
+
+3.5.0 (2020-05-04)
+==================
+
+Features
+--------
+
+- fix #792: support data-yanked attribute in HTMLPage parser.
+
+- Replace "cached_property" with "lazy" package, which uses __dict__ directly
for much faster reads.
+
+
+3.4.0 (2019-06-28)
+==================
+
+Features
+--------
+
+- Added full query string support to URL object.
+
+
+3.3.2 (2019-04-04)
+==================
+
+Bug Fixes
+---------
+
+- Fix #641: support change of return code from string to integer in tox 3.8.x.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/__init__.py
new/devpi-common-3.7.0/devpi_common/__init__.py
--- old/devpi-common-3.6.0/devpi_common/__init__.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common/__init__.py 2022-08-16
11:12:42.000000000 +0200
@@ -1,2 +1,2 @@
#
-__version__ = '3.6.0'
+__version__ = '3.7.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/archive.py
new/devpi-common-3.7.0/devpi_common/archive.py
--- old/devpi-common-3.6.0/devpi_common/archive.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common/archive.py 2022-08-16
11:12:42.000000000 +0200
@@ -6,9 +6,11 @@
import zipfile
import py
+
class UnsupportedArchive(ValueError):
pass
+
def Archive(path_or_file):
""" return in-memory Archive object, wrapping ZipArchive or TarArchive
with uniform methods. If an error is raised, any passed in file will
@@ -62,6 +64,7 @@
def __exit__(self, *args):
self.close()
+
class TarArchive(BaseArchive):
def __init__(self, file):
super(TarArchive, self).__init__(file)
@@ -91,6 +94,7 @@
%(member.name,))
self._archive.extractall(str(to_path))
+
class ZipArchive(BaseArchive):
def __init__(self, file):
super(ZipArchive, self).__init__(file)
@@ -124,6 +128,7 @@
with fpath.open("wb") as f:
f.write(unzipfile.read(name))
+
def zip_dir(basedir, dest=None):
if dest is None:
f = py.io.BytesIO()
@@ -137,6 +142,7 @@
if dest is None:
return f.getvalue()
+
def _writezip(zip, basedir):
for p in basedir.visit():
if p.check(dir=1):
@@ -148,6 +154,7 @@
path = p.relto(basedir)
zip.writestr(path, p.read("rb"))
+
def zip_dict(contentdict):
f = py.io.BytesIO()
zip = zipfile.ZipFile(f, "w")
@@ -155,6 +162,7 @@
zip.close()
return f.getvalue()
+
def _writezip_fromdict(zip, contentdict, prefixes=()):
for name, val in contentdict.items():
if isinstance(val, dict):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/metadata.py
new/devpi-common-3.7.0/devpi_common/metadata.py
--- old/devpi-common-3.6.0/devpi_common/metadata.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common/metadata.py 2022-08-16
11:12:42.000000000 +0200
@@ -1,7 +1,8 @@
import posixpath
import re
import py
-from pkg_resources import parse_version, Requirement
+from packaging.version import parse as parse_version
+from packaging.requirements import Requirement as BaseRequirement
from .types import CompareMixin
from .types import cached_property
from .validation import normalize_name
@@ -13,11 +14,12 @@
_releasefile_suffix_rx = re.compile(
- r"(\.zip|\.tar\.gz|\.tgz|\.tar\.bz2|"
+ r"(\.deb|\.dmg|\.msi|\.zip|\.tar\.gz|\.tgz|\.tar\.bz2|"
r"\.doc\.zip|"
r"\.macosx-\d+.*|"
r"\.linux-.*|"
- r"\.[^\.]*\.rpm|"
+ r"\-[^-]+?\.src\.rpm|"
+ r"\-[^-]+?\.rpm|"
r"\.win-amd68-py[23]\.\d\..*|"
r"\.win32-py[23]\.\d\..*|"
r"\.win.*\..*|"
@@ -68,12 +70,14 @@
return ("any", "bdist_dumb")
pyversion, ext = m.groups()
if pyversion == "2.py3": # "universal" wheel with no C
- pyversion = "2.7" # arbitrary but pypi/devpi makes no special use
- # of "pyversion" anyway?!
+ # arbitrary but pypi/devpi makes no special use
+ # of "pyversion" anyway?!
+ pyversion = "2.7"
elif "." not in pyversion:
pyversion = ".".join(pyversion)
return (pyversion, _ext2type[ext])
+
def splitbasename(path, checkarch=True):
nameversion, ext = splitext_archive(path)
if ext == '.whl':
@@ -108,6 +112,8 @@
DOCZIPSUFFIX = ".doc.zip"
+
+
def splitext_archive(basename):
basename = getattr(basename, "basename", basename)
if basename.lower().endswith(DOCZIPSUFFIX):
@@ -120,6 +126,7 @@
base = base[:-4]
return base, ext
+
class Version(CompareMixin):
def __init__(self, versionstring):
self.string = versionstring
@@ -147,6 +154,8 @@
class BasenameMeta(CompareMixin):
def __init__(self, obj, sameproject=False):
self.obj = obj
+ # none of the below should be done lazily, as devpi_server.mirror
+ # essentially uses this to validate parsed links
basename = getattr(obj, "basename", obj)
if not isinstance(basename, py.builtin._basestring):
raise ValueError("need object with basename attribute")
@@ -170,6 +179,7 @@
for link in links), reverse=True)
return [x.obj for x in s]
+
def get_latest_version(seq, stable=False):
if not seq:
return
@@ -199,5 +209,20 @@
return True
+class Requirement(BaseRequirement):
+ @property
+ def project_name(self):
+ return self.name
+
+ @property
+ def specs(self):
+ return [
+ (spec.operator, spec.version)
+ for spec in self.specifier._specs]
+
+ def __contains__(self, version):
+ return self.specifier.contains(version)
+
+
def parse_requirement(s):
- return Requirement.parse(s)
+ return Requirement(s)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/proc.py
new/devpi-common-3.7.0/devpi_common/proc.py
--- old/devpi-common-3.6.0/devpi_common/proc.py 2020-09-13 12:09:14.000000000
+0200
+++ new/devpi-common-3.7.0/devpi_common/proc.py 2022-08-16 11:12:42.000000000
+0200
@@ -1,6 +1,7 @@
import sys
from subprocess import Popen, CalledProcessError, PIPE
+
def check_output(*args, **kwargs):
# subprocess.check_output does not exist on python26
if "universal_newlines" not in kwargs:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/request.py
new/devpi-common-3.7.0/devpi_common/request.py
--- old/devpi-common-3.6.0/devpi_common/request.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common/request.py 2022-08-16
11:12:42.000000000 +0200
@@ -3,6 +3,7 @@
from requests.adapters import HTTPAdapter
from requests.exceptions import ConnectionError, RequestException,
BaseHTTPError, SSLError
+
class RetrySession(Session):
def __init__(self, max_retries):
super(RetrySession, self).__init__()
@@ -10,6 +11,7 @@
self.mount('https://', HTTPAdapter(max_retries=max_retries))
self.mount('http://', HTTPAdapter(max_retries=max_retries))
+
def new_requests_session(agent=None, max_retries=None):
if agent is None:
agent = "devpi"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/types.py
new/devpi-common-3.7.0/devpi_common/types.py
--- old/devpi-common-3.6.0/devpi_common/types.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common/types.py 2022-08-16
11:12:42.000000000 +0200
@@ -20,6 +20,7 @@
fget.__name__ = name
return property(fget)
+
def canraise(Error):
def wrap(func):
func.Error = Error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/url.py
new/devpi-common-3.7.0/devpi_common/url.py
--- old/devpi-common-3.6.0/devpi_common/url.py 2020-09-13 12:09:14.000000000
+0200
+++ new/devpi-common-3.7.0/devpi_common/url.py 2022-08-16 11:12:42.000000000
+0200
@@ -50,7 +50,7 @@
cloaked = repr(cloaked.url.encode("utf8"))
if sys.version_info >= (3,0):
cloaked = cloaked.lstrip("b")
- return "URL(%s)" % cloaked
+ return "%s(%s)" % (self.__class__.__name__, cloaked)
def __eq__(self, other):
return self.url == getattr(other, "url", other)
@@ -60,24 +60,32 @@
def geturl_nofragment(self):
""" return url without fragment """
- scheme, netloc, url, params, query, ofragment = self._parsed
- return URL(urlunsplit((scheme, netloc, url, query, "")))
+ return self.replace(fragment="")
- @property
+ @cached_property
+ def parsed_hash_spec(self):
+ return parse_hash_spec(self.fragment)
+
+ @cached_property
def hash_spec(self):
- hashalgo, hash_value = parse_hash_spec(self._parsed[-1])
+ hashalgo, hash_value = self.parsed_hash_spec
if hashalgo:
- hashtype = self._parsed[-1].split("=")[0]
- return "%s=%s" %(hashtype, hash_value)
+ return "%s=%s" % (self.hash_type, hash_value)
return ""
- @property
+ @cached_property
+ def hash_type(self):
+ hashalgo, hash_value = self.parsed_hash_spec
+ if hashalgo:
+ return self.fragment.split("=")[0]
+
+ @cached_property
def hash_algo(self):
- return parse_hash_spec(self._parsed[-1])[0]
+ return parse_hash_spec(self.fragment)[0]
- @property
+ @cached_property
def hash_value(self):
- return parse_hash_spec(self._parsed[-1])[1]
+ return parse_hash_spec(self.fragment)[1]
def replace(self, **kwargs):
_parsed = self._parsed
@@ -124,31 +132,31 @@
url.append(value)
return URL(urlunsplit(url))
- @property
+ @cached_property
def netloc(self):
return self._parsed.netloc
- @property
+ @cached_property
def username(self):
return self._parsed.username
- @property
+ @cached_property
def password(self):
return self._parsed.password
- @property
+ @cached_property
def hostname(self):
return self._parsed.hostname
- @property
+ @cached_property
def port(self):
return self._parsed.port
- @property
+ @cached_property
def scheme(self):
return self._parsed.scheme
- @property
+ @cached_property
def url_nofrag(self):
return self.geturl_nofragment().url
@@ -166,11 +174,11 @@
return False
return x.scheme in ("http", "https")
- @property
+ @cached_property
def path(self):
return self._parsed.path
- @property
+ @cached_property
def query(self):
return self._parsed.query
@@ -180,29 +188,33 @@
def get_query_items(self, *args, **kwargs):
return parse_qsl(self.query, *args, **kwargs)
- @property
+ @cached_property
def basename(self):
return posixpath.basename(unquote(self._parsed.path))
- @property
+ @cached_property
def parentbasename(self):
return
posixpath.basename(posixpath.dirname(unquote(self._parsed.path)))
- @property
+ @cached_property
+ def fragment(self):
+ return self._parsed.fragment
+
+ @cached_property
def eggfragment(self):
- frag = self._parsed.fragment
+ frag = self.fragment
if frag.startswith("egg="):
return frag[4:]
- @property
+ @cached_property
def md5(self):
- val = self._parsed.fragment
+ val = self.fragment
if val.startswith("md5="):
return ensure_unicode(val[4:])
- @property
+ @cached_property
def sha256(self):
- val = self._parsed.fragment
+ val = self.fragment
if val.startswith("sha256="):
return ensure_unicode(val[4:])
@@ -225,7 +237,7 @@
prefix = "../" * (len(parts1)-i-1)
return prefix + "/".join(parts2[i:])
rest = parts2[len(parts1):]
- if parts1[-1]: # ends not in slash
+ if parts1[-1]: # ends not in slash
rest.insert(0, parts1[-1])
return "/".join(rest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/validation.py
new/devpi-common-3.7.0/devpi_common/validation.py
--- old/devpi-common-3.6.0/devpi_common/validation.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common/validation.py 2022-08-16
11:12:42.000000000 +0200
@@ -17,6 +17,7 @@
name = ensure_unicode(name)
return safe_name_rex.sub('-', name).lower()
+
def safe_version(version):
"""Convert an arbitrary string to a standard version string
@@ -26,9 +27,11 @@
version = version.replace(' ','.')
return safe_name_rex.sub('-', version)
+
def is_valid_archive_name(filename):
return safe_filenames.match(filename)
+
def validate_metadata(data):
# from
https://bitbucket.org/pypa/pypi/src/1e31fd3cc7a72e4aa54a2bd79d50be5c8c0a3b1e/webui.py?at=default#cl-2124
@@ -68,7 +71,6 @@
raise ValueError("Invalid package name. Names must end with "
"an ASCII letter or digit")
-
# Traditionally, package names are restricted only for
# technical reasons; / is not allowed because it may be
# possible to break path names for file and documentation
@@ -76,9 +78,8 @@
if '/' in data['name']:
raise ValueError("Invalid package name")
-
# again, this is a restriction required by the implementation and not
- # mentiond in documentation; ensure name and version are valid for URLs
+ # mentioned in documentation; ensure name and version are valid for URLs
if re.search('[<>%#"]', data['name'] + data['version']):
raise ValueError('Invalid package name or version (URL safety)')
@@ -113,4 +114,3 @@
# if d.has_key(entry):
# continue
# raise ValueError, 'Invalid classifier "%s"'%entry
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common/vendor/_pip.py
new/devpi-common-3.7.0/devpi_common/vendor/_pip.py
--- old/devpi-common-3.6.0/devpi_common/vendor/_pip.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common/vendor/_pip.py 2022-08-16
11:12:42.000000000 +0200
@@ -14,15 +14,16 @@
from devpi_common.url import urljoin
+
class HTMLPage(object):
"""Represents one page, along with its URL"""
- ## FIXME: these regexes are horrible hacks:
+ # FIXME: these regexes are horrible hacks:
_homepage_re = re.compile(r'<th>\s*home\s*page', re.I)
_download_re = re.compile(r'<th>\s*download\s+url', re.I)
- ## These aren't so aweful:
+ # These aren't so awful:
_rel_re = re.compile(r"""<[^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*>""", re.I)
- _href_re = re.compile('href=(?:"([^"]*)"|\'([^\']*)\'|([^>\\s\\n]*))',
re.I|re.S)
+ _href_re = re.compile('href=(?:"([^"]*)"|\'([^\']*)\'|([^>\\s\\n]*))',
re.I | re.S)
_base_re = re.compile(r"""<base\s+href\s*=\s*['"]?([^'">]+)""", re.I)
def __init__(self, content, url, headers=None):
@@ -33,7 +34,6 @@
def __str__(self):
return self.url
-
@property
def base_url(self):
if not hasattr(self, "_base_url"):
@@ -79,7 +79,7 @@
continue
pyrequire = anchor.get('data-requires-python')
- yanked = 'data-yanked' in anchor
+ yanked = anchor.get('data-yanked')
yield Link(url, self, requires_python=pyrequire, yanked=yanked)
def rel_links(self, rels=('homepage', 'download')):
@@ -155,4 +155,3 @@
def __repr__(self):
return '<Link %s>' % self
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/devpi_common.egg-info/PKG-INFO
new/devpi-common-3.7.0/devpi_common.egg-info/PKG-INFO
--- old/devpi-common-3.6.0/devpi_common.egg-info/PKG-INFO 2020-09-13
12:09:18.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common.egg-info/PKG-INFO 2022-08-16
11:12:47.000000000 +0200
@@ -1,75 +1,11 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: devpi-common
-Version: 3.6.0
+Version: 3.7.0
Summary: utilities jointly used by devpi-server and devpi-client
Home-page: https://github.com/devpi/devpi
-Maintainer: Holger Krekel
-Maintainer-email: [email protected]
+Maintainer: Florian Schulze
+Maintainer-email: [email protected]
License: MIT
-Description:
- This package contains utility functions used by devpi-server and
devpi-client.
-
- See http://doc.devpi.net for more information.
-
-
- =========
- Changelog
- =========
-
-
-
- .. towncrier release notes start
-
- 3.6.0 (2020-09-13)
- ==================
-
- Features
- --------
-
- - Hide password from URL representation.
-
- - Allow replacement of individual netloc parts with URL.replace method.
-
-
- 3.5.0 (2020-05-04)
- ==================
-
- Features
- --------
-
- - fix #792: support data-yanked attribute in HTMLPage parser.
-
- - Replace "cached_property" with "lazy" package, which uses __dict__
directly for much faster reads.
-
-
- 3.4.0 (2019-06-28)
- ==================
-
- Features
- --------
-
- - Added full query string support to URL object.
-
-
- 3.3.2 (2019-04-04)
- ==================
-
- Bug Fixes
- ---------
-
- - Fix #641: support change of return code from string to integer in
tox 3.8.x.
-
-
- 3.3.1 (2018-09-18)
- ==================
-
- Bug Fixes
- ---------
-
- - Fix uploading documentation in devpi-client < 4.1.0.
-
-
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
@@ -81,3 +17,80 @@
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+License-File: LICENSE
+
+
+This package contains utility functions used by devpi-server and devpi-client.
+
+See http://doc.devpi.net for more information.
+
+
+=========
+Changelog
+=========
+
+
+
+.. towncrier release notes start
+
+
+3.7.0 (2022-08-16)
+==================
+
+
+Features
+--------
+
+- Add ``hash_type`` and ``fragment`` attributes to URL class.
+
+- Replace ``pkg_resources`` usage with ``packaging``.
+
+
+Bug Fixes
+---------
+
+- Fix #895: return content of data-yanked.
+
+- Fixed some cases where name and version weren't split off correctly from
filename.
+
+
+3.6.0 (2020-09-13)
+==================
+
+Features
+--------
+
+- Hide password from URL representation.
+
+- Allow replacement of individual netloc parts with URL.replace method.
+
+
+3.5.0 (2020-05-04)
+==================
+
+Features
+--------
+
+- fix #792: support data-yanked attribute in HTMLPage parser.
+
+- Replace "cached_property" with "lazy" package, which uses __dict__ directly
for much faster reads.
+
+
+3.4.0 (2019-06-28)
+==================
+
+Features
+--------
+
+- Added full query string support to URL object.
+
+
+3.3.2 (2019-04-04)
+==================
+
+Bug Fixes
+---------
+
+- Fix #641: support change of return code from string to integer in tox 3.8.x.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/devpi-common-3.6.0/devpi_common.egg-info/requires.txt
new/devpi-common-3.7.0/devpi_common.egg-info/requires.txt
--- old/devpi-common-3.6.0/devpi_common.egg-info/requires.txt 2020-09-13
12:09:18.000000000 +0200
+++ new/devpi-common-3.7.0/devpi_common.egg-info/requires.txt 2022-08-16
11:12:47.000000000 +0200
@@ -1,3 +1,4 @@
lazy
+packaging
py>=1.4.20
requests>=2.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/setup.py
new/devpi-common-3.7.0/setup.py
--- old/devpi-common-3.6.0/setup.py 2020-09-13 12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/setup.py 2022-08-16 11:12:42.000000000 +0200
@@ -30,15 +30,17 @@
name="devpi-common",
description="utilities jointly used by devpi-server and devpi-client",
long_description="\n\n".join([README, CHANGELOG]),
- version='3.6.0',
+ version='3.7.0',
packages=['devpi_common', 'devpi_common.vendor'],
install_requires=[
"lazy",
+ "packaging",
"py>=1.4.20",
"requests>=2.3.0"],
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
url="https://github.com/devpi/devpi",
- maintainer="Holger Krekel",
- maintainer_email="[email protected]",
+ maintainer="Florian Schulze",
+ maintainer_email="[email protected]",
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/testing/test_archive.py
new/devpi-common-3.7.0/testing/test_archive.py
--- old/devpi-common-3.6.0/testing/test_archive.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/testing/test_archive.py 2022-08-16
11:12:42.000000000 +0200
@@ -10,10 +10,12 @@
datadir = py.path.local(__file__).dirpath("data")
+
def check_files(tmpdir):
assert tmpdir.join("1").isfile()
assert tmpdir.join("sub", "1").isfile()
+
def _writedir(tmpdir, contentdict, prefixes=()):
for name, val in contentdict.items():
if isinstance(val, dict):
@@ -25,6 +27,7 @@
else:
tmpdir.ensure(*(prefixes + (name,))).write(val)
+
def create_tarfile_fromdict(tmpdir, contentdict):
tar = py.path.local.sysfind("tar")
if not tar:
@@ -35,10 +38,11 @@
_writedir(tardir, contentdict)
files = [x.relto(tardir) for x in tardir.visit(lambda x: x.isfile())]
with tardir.as_cwd():
- popen = Popen([str(tar), "cvf", "-" ] + files, stdout=PIPE)
+ popen = Popen([str(tar), "cvf", "-"] + files, stdout=PIPE)
out, err = popen.communicate()
return out
+
@pytest.fixture(params=["tar", "zip"])
def archive_path(request, tmpdir):
contentdict = {"1": "file1", "sub": {"1": "subfile"}}
@@ -50,8 +54,9 @@
p.write(content, "wb")
return p
+
class TestArchive:
- @pytest.yield_fixture(params=["path", "file"])
+ @pytest.fixture(params=["path", "file"])
def archive(self, request, archive_path):
if request.param == "path":
arch = Archive(archive_path)
@@ -95,15 +100,12 @@
out, err = capsys.readouterr()
assert "sub/1" in out
+
def test_tarfile_outofbound(tmpdir):
with Archive(datadir.join("slash.tar.gz")) as archive:
with pytest.raises(ValueError):
archive.extract(tmpdir)
-#def test_zipfile_outofbound(tmpdir):
-# archive = get_archive(datadir.join("slash.zip").read())
-# with pytest.raises(ValueError):
-# archive.extract(tmpdir)
def test_zip_dict(tmpdir):
content = zip_dict({"one": {"nested": "1"}, "two": {}})
@@ -112,6 +114,7 @@
assert tmpdir.join("one", "nested").read() == "1"
assert tmpdir.join("two").isdir()
+
def test_zip_dir(tmpdir):
source = tmpdir.join("source")
newdest = tmpdir.join("newdest")
@@ -129,4 +132,3 @@
archive.extract(newdest)
assert newdest.join("file").isfile()
assert newdest.join("sub", "subfile").isfile()
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/testing/test_lazydecorator.py
new/devpi-common-3.7.0/testing/test_lazydecorator.py
--- old/devpi-common-3.6.0/testing/test_lazydecorator.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/testing/test_lazydecorator.py 2022-08-16
11:12:42.000000000 +0200
@@ -1,9 +1,10 @@
-from devpi_common.types import lazydecorator
+from devpi_common.types import lazydecorator
+from textwrap import dedent
-pytest_plugins = "pytester"
def test_simpler():
dec = lazydecorator()
+
class A:
@dec(5)
@dec(1, kw=3)
@@ -13,6 +14,7 @@
a = A()
l2 = []
+
def anotherdec(arg, kw=None):
def wrapped(func):
l2.append((func, arg, kw))
@@ -24,12 +26,14 @@
assert l2[0] == (a.f, 1, 3)
assert l2[1] == (a.f, 5, None)
+
def test_simpler_dict():
dec = lazydecorator()
@dec()
def f():
pass
+
@dec(x=1)
def g():
pass
@@ -39,15 +43,19 @@
assert l[0] == (f, (), {})
assert l[1] == (g, (), dict(x=1))
+
def test_multi():
dec = lazydecorator()
+
class A:
@dec(1)
def c(self):
pass
+
@dec(2)
def b(self):
pass
+
@dec(3)
def a(self):
pass
@@ -55,6 +63,7 @@
a = A()
l2 = []
+
def anotherdec(arg, kw=None):
def wrapped(func):
l2.append((func, arg))
@@ -67,8 +76,10 @@
assert l2[1] == (a.b, 2)
assert l2[2] == (a.a, 3)
-def test_simpler_mod(testdir):
- p = testdir.makepyfile("""
+
+def test_simpler_mod(tmpdir):
+ p = tmpdir.join("mod.py")
+ p.write(dedent("""
from devpi_common.types import lazydecorator
dec = lazydecorator()
@@ -76,16 +87,17 @@
@dec("hello")
def f():
pass
- """)
+ """))
mod = p.pyimport()
l = []
+
def anotherdec(arg):
def wrapped(func):
l.append((arg, func))
return func
return wrapped
+
mod.dec.discover_and_call(mod, anotherdec)
assert len(l) == 2
assert l == [("hello", mod.f), ("world", mod.f)]
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/testing/test_metadata.py
new/devpi-common-3.7.0/testing/test_metadata.py
--- old/devpi-common-3.6.0/testing/test_metadata.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/testing/test_metadata.py 2022-08-16
11:12:42.000000000 +0200
@@ -23,11 +23,11 @@
("Cambiatuscromos", "0.1.1alpha", ".linux-x86_64.exe")),
("Aesthete-0.4.2.win32.exe", ("Aesthete", "0.4.2", ".win32.exe")),
("DTL-1.0.5.win-amd64.exe", ("DTL", "1.0.5", ".win-amd64.exe")),
- ("Cheetah-2.2.2-1.x86_64.rpm", ("Cheetah", "2.2.2-1", ".x86_64.rpm")),
- ("Cheetah-2.2.2-1.src.rpm", ("Cheetah", "2.2.2-1", ".src.rpm")),
- ("Cheetah-2.2.2-1.x85.rpm", ("Cheetah", "2.2.2-1", ".x85.rpm")),
- ("Cheetah-2.2.2.dev1.x85.rpm", ("Cheetah", "2.2.2.dev1", ".x85.rpm")),
- ("Cheetah-2.2.2.dev1.noarch.rpm", ("Cheetah", "2.2.2.dev1",
".noarch.rpm")),
+ ("Cheetah-2.2.2-1.x86_64.rpm", ("Cheetah", "2.2.2", "-1.x86_64.rpm")),
+ ("Cheetah-2.2.2-1.src.rpm", ("Cheetah", "2.2.2", "-1.src.rpm")),
+ ("Cheetah-2.2.2-1.x85.rpm", ("Cheetah", "2.2.2", "-1.x85.rpm")),
+ ("Cheetah-2.2.2.dev1-1.x85.rpm", ("Cheetah", "2.2.2.dev1", "-1.x85.rpm")),
+ ("Cheetah-2.2.2.dev1-1.noarch.rpm", ("Cheetah", "2.2.2.dev1",
"-1.noarch.rpm")),
("deferargs.tar.gz", ("deferargs", "", ".tar.gz")),
("hello-1.0.doc.zip", ("hello", "1.0", ".doc.zip")),
("Twisted-12.0.0.win32-py2.7.msi",
@@ -42,6 +42,7 @@
result = splitbasename(releasename)
assert result == expected
+
@pytest.mark.parametrize(("releasename", "expected"), [
("x-2.3.zip", ("source", "sdist")),
("x-2.3-0.4.0.win32-py3.1.exe", ("3.1", "bdist_wininst")),
@@ -58,6 +59,7 @@
result = get_pyversion_filetype(releasename)
assert result == expected
+
@pytest.mark.parametrize(("releasename", "expected"), [
("pytest-2.3.4.zip", ("pytest-2.3.4", ".zip")),
("green-0.4.0-py2.5-win32.egg", ("green-0.4.0-py2.5-win32", ".egg")),
@@ -103,6 +105,7 @@
ver2 = Version("1.1")
assert max([ver1, ver2]) == ver2
+
class TestBasenameMeta:
def test_doczip(self):
meta1 = BasenameMeta("x-1.0.doc.zip")
@@ -161,5 +164,3 @@
assert req.project_name == "hello"
assert "1.0" in req
assert "0.9" not in req
-
--1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/testing/test_proc.py
new/devpi-common-3.7.0/testing/test_proc.py
--- old/devpi-common-3.6.0/testing/test_proc.py 2020-09-13 12:09:14.000000000
+0200
+++ new/devpi-common-3.7.0/testing/test_proc.py 2022-08-16 11:12:42.000000000
+0200
@@ -3,6 +3,7 @@
from devpi_common.proc import CalledProcessError
from devpi_common.proc import check_output
+
@pytest.fixture
def hg():
hg = py.path.local.sysfind("hg")
@@ -10,10 +11,11 @@
pytest.skip("no hg")
return str(hg)
+
def test_check_output(hg):
assert check_output([hg, "--version"])
+
def test_checkoutput_error(hg):
with pytest.raises(CalledProcessError):
check_output([hg, "qlwkje"])
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/testing/test_request.py
new/devpi-common-3.7.0/testing/test_request.py
--- old/devpi-common-3.6.0/testing/test_request.py 2020-09-13
12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/testing/test_request.py 2022-08-16
11:12:42.000000000 +0200
@@ -34,6 +34,7 @@
assert sys.version.split()[0] in ua
assert "*" not in ua
+
def test_exception_attributes():
session = new_requests_session()
assert isinstance(session.Errors, tuple)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/testing/test_url.py
new/devpi-common-3.7.0/testing/test_url.py
--- old/devpi-common-3.6.0/testing/test_url.py 2020-09-13 12:09:14.000000000
+0200
+++ new/devpi-common-3.7.0/testing/test_url.py 2022-08-16 11:12:42.000000000
+0200
@@ -57,10 +57,12 @@
url = URL("http://a/py.tar.gz#md5=123123")
assert url.md5 == "123123"
assert url.hash_algo == hashlib.md5
+ assert url.hash_type == "md5"
assert url.hash_value == "123123"
url = URL("http://a/py.tar.gz?foo=bar#md5=123123")
assert url.md5 == "123123"
assert url.hash_algo == hashlib.md5
+ assert url.hash_type == "md5"
assert url.hash_value == "123123"
assert url.query == "foo=bar"
@@ -72,17 +74,23 @@
def test_hashtypes(self, hashtype, hash_value):
link = URL('py-1.4.12.zip#%s=%s' % (hashtype, hash_value))
assert link.hash_algo == getattr(hashlib, hashtype)
+ link.hash_type == hashtype
assert link.hash_value == hash_value
link = URL('py-1.4.12.zip?foo=bar#%s=%s' % (hashtype, hash_value))
assert link.hash_algo == getattr(hashlib, hashtype)
+ link.hash_type == hashtype
assert link.hash_value == hash_value
assert link.query == "foo=bar"
def test_nohashtypes(self):
link = URL("whateveer#lqk=123")
- assert link.hash_value is None and link.hash_algo is None
+ assert link.hash_value is None
+ assert link.hash_algo is None
+ assert link.hash_type is None
link = URL("whateveer?foo=bar#lqk=123")
- assert link.hash_value is None and link.hash_algo is None
+ assert link.hash_value is None
+ assert link.hash_algo is None
+ assert link.hash_type is None
assert link.query == "foo=bar"
@pytest.mark.parametrize("url,path,expected", [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/devpi-common-3.6.0/tox.ini
new/devpi-common-3.7.0/tox.ini
--- old/devpi-common-3.6.0/tox.ini 2020-09-13 12:09:14.000000000 +0200
+++ new/devpi-common-3.7.0/tox.ini 2022-08-16 11:12:42.000000000 +0200
@@ -4,15 +4,17 @@
flake8-ignore =
* E501
setup.py E121 E123
- *.py E114 E116 E126 E127 E128 E202 E225 E226 E227 E231 E261 E265 E266 E272
E301 E302 E303 E305 E306 E741 W391
+ *.py E126 E127 E128 E225 E226 E231 E265 E272 E301 E741
[tox]
-envlist = py27,py34,py38,pypy,pypy3
-
+envlist = py27,py35,py38,pypy,pypy3
[testenv]
-deps = py34: colorama<=0.4.1 ; sys_platform == 'win32'
- pytest
- pytest-flake8
-
+addopts = py3: -W once::ResourceWarning
+deps =
+ pytest
+ pytest-flake8 < 1.1.0;python_version=="2.7"
+ pytest-flake8;python_version!="2.7"
+ flake8<5
+ py35: pyparsing<3
commands = py.test {posargs}