From nobody Tue Aug 09 10:44:52 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M28pY40F6z4YWYK; Tue, 9 Aug 2022 10:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M28pY2Pwgz3Wq2; Tue, 9 Aug 2022 10:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660041893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ty/2bhs+Ls3/XqPTP/TPNBxGAxh+RFolhl9XeiU7yVk=; b=byjvyNPvxtZz6QTfUbEqbWfuVn+dw/0yCJ87Katk0AJhCH0QADP0Z0N6aIEQeOrk11+IJy GSV7PLZR1P0vac+ZkI3UGLhCkeSyw3F/7DllSYXYC6ssMuW6ZKWsuMrJ7wxYkinKZ6Fp1P YTJt+tNKfuTjaT2j2wqScztpjLKSOlrzgk7LRqk6IBtvOpFJKMJ1INYDHXLSTSbE4a64S/ E7yhBNsEVSRvLWtYYrsP1ngki3NmZ9twcCIzDtY/tPwP/f+eHSjC3YL8cpcF/3L4gwj/lS tqVFQTDsxOlSE8ULSTNnGEYwiXIhjVdMSTi3GQeWPQ9fc0lCP0FhclJPKqPzDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M28pY0dszzTcN; Tue, 9 Aug 2022 10:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 279AiqMf072972; Tue, 9 Aug 2022 10:44:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 279AiqD4072971; Tue, 9 Aug 2022 10:44:52 GMT (envelope-from git) Date: Tue, 9 Aug 2022 10:44:52 GMT Message-Id: <202208091044.279AiqD4072971@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dave Cottlehuber Subject: git: 28de41d46b1a - main - sysutils/py-mitogen: update to 0.3.3 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28de41d46b1ae5162ef5ba379386c3611497749a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660041893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ty/2bhs+Ls3/XqPTP/TPNBxGAxh+RFolhl9XeiU7yVk=; b=ocKxrOAaNLi0dPiI77OnJsSS4moivWfe/jyJErZPXbZUxDZm4hlwa/LW97Y1OblJ9Oe/RY kKvry0kF34P3u2zdoVyP7G/o8F0//4k+k0UDi6KuG1Oq0GqnWriNp5+8t9izqeN6YrtrHH jMdRgIHmEKq9MHwJSvfDa17IbIovJGeqMt5sBy5LSeA35u3v/yCpJcBRT7dPhhIt3WtoCy qMPWGSDSIgqY8XMl6pl38BxkELbkQKzLyao8/wLC28svouY6MipFfXFF81NDSZ5Xx5hJHl l+hsyIkYag9YB78829OoKYka+PhfFPn6laFLRZwhubSwPt35oIf1bcFUOkhghw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660041893; a=rsa-sha256; cv=none; b=GQNQYKPx4+28vXM7dHphGujvoqJJeOwBlTG5MdOgS5uDF03g1VjDjrrHA4DPbmC9s/ctxH E8z6Wl9wKuntrqclE4QB/qsXx525SOCyYeGcafJdxJw9X27rX9JG1ziwlCM2ZMq/kRH8lz qwgJ5TQUq/IMamK/GrA9iqjJWvctLHK1mU7uLfM/EML1GOpcnzuqTDf2KzsHPHqkA+O1Lx BPzyYS3eAZu7yRQrqVTckD8LnGqfaj9xfvi1kZOb8sgog1Yy8de7kvxEXCtOl0/1EYrzns mT36UV0ZyWSkf1WmOtlxYQHIVRI6eDD7HFdSIaW+aKVwHyRUHXMNAFPG1T6HLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/ports/commit/?id=28de41d46b1ae5162ef5ba379386c3611497749a commit 28de41d46b1ae5162ef5ba379386c3611497749a Author: Dave Cottlehuber AuthorDate: 2022-08-09 10:44:34 +0000 Commit: Dave Cottlehuber CommitDate: 2022-08-09 10:44:34 +0000 sysutils/py-mitogen: update to 0.3.3 - monkeypatch python3.9 support until upstream does a release Sponsored by: SkunkWerks, GmbH --- sysutils/py-mitogen/Makefile | 2 +- sysutils/py-mitogen/distinfo | 8 +- .../files/patch-ansible__mitogen_loaders.py | 11 ++ sysutils/py-mitogen/files/patch-mitogen_core.py | 32 --- sysutils/py-mitogen/files/patch-mitogen_master.py | 214 --------------------- 5 files changed, 15 insertions(+), 252 deletions(-) diff --git a/sysutils/py-mitogen/Makefile b/sysutils/py-mitogen/Makefile index 258ba5b37a29..5835b417fea5 100644 --- a/sysutils/py-mitogen/Makefile +++ b/sysutils/py-mitogen/Makefile @@ -1,5 +1,5 @@ PORTNAME= mitogen -DISTVERSION= 0.3.2 +DISTVERSION= 0.3.3 CATEGORIES= sysutils python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/sysutils/py-mitogen/distinfo b/sysutils/py-mitogen/distinfo index d34920fb5b9e..bab25fa9a6d6 100644 --- a/sysutils/py-mitogen/distinfo +++ b/sysutils/py-mitogen/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1653396026 -SHA256 (mitogen-0.3.2.tar.gz) = 49e1e391cb4fa3627e290fea656a3c38cce990778137f013291d7e7085304c3d -SIZE (mitogen-0.3.2.tar.gz) = 218661 -SHA256 (913.patch) = 29e678a1eb6fbea615b25f3114f17cd5504ae2a11bb691124bef253ca2e9ba98 -SIZE (913.patch) = 16016 +TIMESTAMP = 1659648435 +SHA256 (mitogen-0.3.3.tar.gz) = db9dbc1ca8acb59f8f70c25a0fbdf11698b1a8b8355f39a8c540e0874496fb34 +SIZE (mitogen-0.3.3.tar.gz) = 219703 diff --git a/sysutils/py-mitogen/files/patch-ansible__mitogen_loaders.py b/sysutils/py-mitogen/files/patch-ansible__mitogen_loaders.py new file mode 100644 index 000000000000..61cc5690f103 --- /dev/null +++ b/sysutils/py-mitogen/files/patch-ansible__mitogen_loaders.py @@ -0,0 +1,11 @@ +--- ansible_mitogen/loaders.py.orig 2022-08-09 10:30:15 UTC ++++ ansible_mitogen/loaders.py +@@ -48,7 +48,7 @@ ANSIBLE_VERSION_MIN = (2, 10) + + + ANSIBLE_VERSION_MIN = (2, 10) +-ANSIBLE_VERSION_MAX = (2, 12) ++ANSIBLE_VERSION_MAX = (2, 13) + + NEW_VERSION_MSG = ( + "Your Ansible version (%s) is too recent. The most recent version\n" diff --git a/sysutils/py-mitogen/files/patch-mitogen_core.py b/sysutils/py-mitogen/files/patch-mitogen_core.py deleted file mode 100644 index 66abd739671b..000000000000 --- a/sysutils/py-mitogen/files/patch-mitogen_core.py +++ /dev/null @@ -1,32 +0,0 @@ ---- mitogen/core.py.orig 2022-01-12 07:45:19 UTC -+++ mitogen/core.py -@@ -1357,6 +1357,16 @@ class Importer(object): - fp.close() - - def find_module(self, fullname, path=None): -+ """ -+ Return a loader (ourself) or None, for the module with fullname. -+ -+ Implements importlib.abc.MetaPathFinder.find_module(). -+ Deprecrated in Python 3.4+, replaced by find_spec(). -+ Raises ImportWarning in Python 3.10+. -+ -+ fullname A (fully qualified?) module name, e.g. "os.path". -+ path __path__ of parent packge. None for a top level module. -+ """ - if hasattr(_tls, 'running'): - return None - -@@ -1478,6 +1488,12 @@ class Importer(object): - callback() - - def load_module(self, fullname): -+ """ -+ Return the loaded module specified by fullname. -+ -+ Implements importlib.abc.Loader.load_module(). -+ Deprecated in Python 3.4+, replaced by create_module() & exec_module(). -+ """ - fullname = to_text(fullname) - _v and self._log.debug('requesting %s', fullname) - self._refuse_imports(fullname) diff --git a/sysutils/py-mitogen/files/patch-mitogen_master.py b/sysutils/py-mitogen/files/patch-mitogen_master.py deleted file mode 100644 index 6e669e792c55..000000000000 --- a/sysutils/py-mitogen/files/patch-mitogen_master.py +++ /dev/null @@ -1,214 +0,0 @@ ---- mitogen/master.py.orig 2022-01-12 07:45:19 UTC -+++ mitogen/master.py -@@ -122,6 +122,13 @@ def is_stdlib_name(modname): - """ - Return :data:`True` if `modname` appears to come from the standard library. - """ -+ # `imp.is_builtin()` isn't a documented as part of Python's stdlib API. -+ # -+ # """ -+ # Main is a little special - imp.is_builtin("__main__") will return False, -+ # but BuiltinImporter is still the most appropriate initial setting for -+ # its __loader__ attribute. -+ # """ -- comment in CPython pylifecycle.c:add_main_module() - if imp.is_builtin(modname) != 0: - return True - -@@ -512,42 +519,57 @@ class PkgutilMethod(FinderMethod): - Find `fullname` using :func:`pkgutil.find_loader`. - """ - try: -+ # If fullname refers to a submodule that's not already imported -+ # then the containing package is imported. - # Pre-'import spec' this returned None, in Python3.6 it raises - # ImportError. - loader = pkgutil.find_loader(fullname) - except ImportError: - e = sys.exc_info()[1] -- LOG.debug('%r._get_module_via_pkgutil(%r): %s', -- self, fullname, e) -+ LOG.debug('%r: find_loader(%r) failed: %s', self, fullname, e) - return None - -- IOLOG.debug('%r._get_module_via_pkgutil(%r) -> %r', -- self, fullname, loader) - if not loader: -+ LOG.debug('%r: find_loader(%r) returned %r, aborting', -+ self, fullname, loader) - return - - try: -- path, is_special = _py_filename(loader.get_filename(fullname)) -- source = loader.get_source(fullname) -- is_pkg = loader.is_package(fullname) -- -- # workaround for special python modules that might only exist in memory -- if is_special and is_pkg and not source: -- source = '\n' -+ path = loader.get_filename(fullname) - except (AttributeError, ImportError): -- # - Per PEP-302, get_source() and is_package() are optional, -- # calling them may throw AttributeError. - # - get_filename() may throw ImportError if pkgutil.find_loader() - # picks a "parent" package's loader for some crap that's been - # stuffed in sys.modules, for example in the case of urllib3: - # "loader for urllib3.contrib.pyopenssl cannot handle - # requests.packages.urllib3.contrib.pyopenssl" - e = sys.exc_info()[1] -- LOG.debug('%r: loading %r using %r failed: %s', -- self, fullname, loader, e) -+ LOG.debug('%r: %r.get_file_name(%r) failed: %r', self, loader, fullname, e) - return - -+ path, is_special = _py_filename(path) -+ -+ try: -+ source = loader.get_source(fullname) -+ except AttributeError: -+ # Per PEP-302, get_source() is optional, -+ e = sys.exc_info()[1] -+ LOG.debug('%r: %r.get_source() failed: %r', self, loader, fullname, e) -+ return -+ -+ try: -+ is_pkg = loader.is_package(fullname) -+ except AttributeError: -+ # Per PEP-302, is_package() is optional, -+ e = sys.exc_info()[1] -+ LOG.debug('%r: %r.is_package(%r) failed: %r', self, loader, fullname, e) -+ return -+ -+ # workaround for special python modules that might only exist in memory -+ if is_special and is_pkg and not source: -+ source = '\n' -+ - if path is None or source is None: -+ LOG.debug('%r: path=%r, source=%r, aborting', self, path, source) - return - - if isinstance(source, mitogen.core.UnicodeType): -@@ -567,23 +589,37 @@ class SysModulesMethod(FinderMethod): - """ - Find `fullname` using its :data:`__file__` attribute. - """ -- module = sys.modules.get(fullname) -+ try: -+ module = sys.modules[fullname] -+ except KeyError: -+ LOG.debug('%r: sys.modules[%r] absent, aborting', self, fullname) -+ return -+ - if not isinstance(module, types.ModuleType): -- LOG.debug('%r: sys.modules[%r] absent or not a regular module', -- self, fullname) -+ LOG.debug('%r: sys.modules[%r] is %r, aborting', -+ self, fullname, module) - return - -- LOG.debug('_get_module_via_sys_modules(%r) -> %r', fullname, module) -- alleged_name = getattr(module, '__name__', None) -- if alleged_name != fullname: -- LOG.debug('sys.modules[%r].__name__ is incorrect, assuming ' -- 'this is a hacky module alias and ignoring it. ' -- 'Got %r, module object: %r', -- fullname, alleged_name, module) -+ try: -+ resolved_name = module.__name__ -+ except AttributeError: -+ LOG.debug('%r: %r has no __name__, aborting', self, module) - return - -- path, _ = _py_filename(getattr(module, '__file__', '')) -+ if resolved_name != fullname: -+ LOG.debug('%r: %r.__name__ is %r, aborting', -+ self, module, resolved_name) -+ return -+ -+ try: -+ path = module.__file__ -+ except AttributeError: -+ LOG.debug('%r: %r has no __file__, aborting', self, module) -+ return -+ -+ path, _ = _py_filename(path) - if not path: -+ LOG.debug('%r: %r.__file__ is %r, aborting', self, module, path) - return - - LOG.debug('%r: sys.modules[%r]: found %s', self, fullname, path) -@@ -628,10 +664,24 @@ class ParentEnumerationMethod(FinderMethod): - module object or any parent package's :data:`__path__`, since they have all - been overwritten. Some men just want to watch the world burn. - """ -+ -+ @staticmethod -+ def _iter_parents(fullname): -+ """ -+ >>> list(ParentEnumerationMethod._iter_parents('a')) -+ [('', 'a')] -+ >>> list(ParentEnumerationMethod._iter_parents('a.b.c')) -+ [('a.b', 'c'), ('a', 'b'), ('', 'a')] -+ """ -+ while fullname: -+ fullname, _, modname = str_rpartition(fullname, u'.') -+ yield fullname, modname -+ - def _find_sane_parent(self, fullname): - """ - Iteratively search :data:`sys.modules` for the least indirect parent of -- `fullname` that is loaded and contains a :data:`__path__` attribute. -+ `fullname` that's from the same package and has a :data:`__path__` -+ attribute. - - :return: - `(parent_name, path, modpath)` tuple, where: -@@ -644,21 +694,40 @@ class ParentEnumerationMethod(FinderMethod): - * `modpath`: list of module name components leading from `path` - to the target module. - """ -- path = None - modpath = [] -- while True: -- pkgname, _, modname = str_rpartition(to_text(fullname), u'.') -+ for pkgname, modname in self._iter_parents(fullname): - modpath.insert(0, modname) - if not pkgname: - return [], None, modpath - -- pkg = sys.modules.get(pkgname) -- path = getattr(pkg, '__path__', None) -- if pkg and path: -- return pkgname.split('.'), path, modpath -+ try: -+ pkg = sys.modules[pkgname] -+ except KeyError: -+ LOG.debug('%r: sys.modules[%r] absent, skipping', self, pkgname) -+ continue - -- LOG.debug('%r: %r lacks __path__ attribute', self, pkgname) -- fullname = pkgname -+ try: -+ resolved_pkgname = pkg.__name__ -+ except AttributeError: -+ LOG.debug('%r: %r has no __name__, skipping', self, pkg) -+ continue -+ -+ if resolved_pkgname != pkgname: -+ LOG.debug('%r: %r.__name__ is %r, skipping', -+ self, pkg, resolved_pkgname) -+ continue -+ -+ try: -+ path = pkg.__path__ -+ except AttributeError: -+ LOG.debug('%r: %r has no __path__, skipping', self, pkg) -+ continue -+ -+ if not path: -+ LOG.debug('%r: %r.__path__ is %r, skipping', self, pkg, path) -+ continue -+ -+ return pkgname.split('.'), path, modpath - - def _found_package(self, fullname, path): - path = os.path.join(path, '__init__.py')