On Tue, Feb 01, 2022 at 02:22:35PM +0000, Julian Gilbey wrote:
> Package: python3-flatbuffers
> Version: 1.12.1~git20200711.33e2d80+dfsg1-0.6
> Severity: normal
> 
> I get the following warning issued by a package trying to import
> flatbuffers via pkg_resources:
> 
> /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: 
> PkgResourcesDeprecationWarning: 1.12.1-git20200711.33e2d80-dfsg1-0.6 is an 
> invalid version and will not be supported in a future release
>   warnings.warn(
> 
> See the VERSION_PATTERN regex in
> /usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py
> for the definition of valid version numbers accepted by pkg_resources.
> In particular, changing "-git" to "+git" in the Python version number
> is sufficient to fix this issue.

I am wrong about this: PEP 440 (https://peps.python.org/pep-0440/)
specifies the version number format; it says:

    To ensure local version identifiers can be readily incorporated as
    part of filenames and URLs, and to avoid formatting
    inconsistencies in hexadecimal hash representations, local version
    labels MUST be limited to the following set of permitted
    characters:

    ASCII letters ([a-zA-Z])
    ASCII digits ([0-9])
    periods (.)

I suggest in debian/rules changing VERSION=$(DEB_VERSION) to
VERSION=$(DEB_VERSION_UPSTREAM) to remove the Debian revision part;
the "-git" in the package version will still need changing to "+git"
though.

Best wishes,

   Julian

Reply via email to