[ https://issues.apache.org/jira/browse/PYLUCENE-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16649379#comment-16649379 ]
Shangning Xu commented on PYLUCENE-44: -------------------------------------- This is really an issue with Arch Linux. Though [Setuptools v34.0.0|https://setuptools.readthedocs.io/en/latest/history.html#v34-0-0] suggested devendoring {{packaging}}, the developers actually didn't complete it. They created a package named [{{packaging}}|https://github.com/pypa/packaging] but distributions like Ubuntu don't install it by default, because {{pkg_resources.extern.packaging}} still works. The real problem is that Arch Linux takes a step forward and *complete the devendoring*. When packing Setuptools for Arch, {{pkg_resources.extern}} is [removed|https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/python-setuptools#n25] both for Python 2 and 3. Then the package {{packaging}} is made a dependency of Setuptools. So, in other distributions e.g. Ubuntu, {{python-packaging}} must be installed to do {{import packaging}} (in Python 2). In Arch, {{import packaging}} is the only way. Since I'm packing JCC for Arch, I'll fix the import downstream. > pkg_resources.extern.packaging.version is Deprecated > ---------------------------------------------------- > > Key: PYLUCENE-44 > URL: https://issues.apache.org/jira/browse/PYLUCENE-44 > Project: PyLucene > Issue Type: Bug > Environment: Arch Linux > Python 3.7.0 > setuptools 40.4.3 > Ant 1.10.5 > Pip 18.0 > Reporter: Shangning Xu > Priority: Major > > {{pkg_resources.extern.packaging.version}} introduced in PYLUCENE-43 to > replace {{SetupToolsVersion}} is actually deprecated *before* > {{SetupToolsVersion}} ({{SetupToolsVersion}} is removed in setuptools > [v39.0.0|https://setuptools.readthedocs.io/en/latest/history.html#v39-0-0], > while {{pkg_resources.extern}} is in > [v34.0.0|https://setuptools.readthedocs.io/en/latest/history.html#v34-0-0]). > The correct solution is to replace > {code:java} > from pkg_resources.extern.packaging.version import Version > {code} > with > {code:java} > from packaging.version import Version > {code} > in Line 215 of {{setup.py}}. The solution can be found in the release notes > of [setuptools > v39.0.0|https://setuptools.readthedocs.io/en/latest/history.html#v39-0-0] and > a [Github issue|https://github.com/anntzer/pypi2pkgbuild/issues/2]. > Maybe this setuptools drama may worth a minor version bump? -- This message was sent by Atlassian JIRA (v7.6.3#76005)