Bugzilla Automation <[email protected]> has asked freebsd-python (Nobody)
<[email protected]> for maintainer-feedback:
Bug 300268: devel/py-py_interface: Fix import on Python 3.10+ (erl_term imports
collections.MutableMapping)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300268
--- Description ---
py_interface cannot be imported on any Python since 3.10 (3.12, the
current default, shown):
$ python3.12 -c 'import py_interface.erl_term'
ImportError: cannot import name 'MutableMapping' from 'collections'
(/usr/local/lib/python3.12/collections/__init__.py)
py_interface/erl_term.py:55 does
"from collections import MutableMapping as DictMixin". The ABC aliases
in collections were removed in Python 3.10. erl_term is the term codec
and is imported by erl_node and erl_node_conn, the main API, so the
whole package is unusable.
The patch imports MutableMapping from collections.abc instead and bumps
PORTREVISION.
Misc changes:
- the portlint warnings in pkg-descr are fixed
- the patch in files/ gets a header saying what it does and its upstream
status (Description, Issue ID, Changeset, TODO)
Impact: no ports depend on it.
Tested: poudriere bulk -C -t on 15.1-RELEASE amd64 with
DEFAULT_VERSIONS+=python=3.13 and poudriere bulk on 14.5-RELEASE amd64
with Python 3.12: builds, passes check-plist, and all 9 modules import
from the built package. A TermToBinary/BinaryToTerm round-trip works
on 3.12.
Upstream: 2.3 (2018-03-13) is the latest release and the upstream
repository has had no commits since 2018-01-03, so there is nowhere to
send this.