Your message dated Mon, 24 Mar 2025 15:08:02 +0000
with message-id <[email protected]>
and subject line Re: Bug#972855: python3-humanize: due to use_scm_version, 
humanize.__version__ reports 0.0.0
has caused the Debian Bug report #972855,
regarding python3-humanize: due to use_scm_version, humanize.__version__ 
reports 0.0.0
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
972855: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972855
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3-humanize
Version: 3.1.0-1
Severity: important

Dear Maintainer,

Similarly to black [1], I suspect use_scm_version in humanize's setup.py
[2] breaks humanize.__version__ when built by debian (more accurately,
it breaks pkg_resources.get_distribution(__name__).version).

Not really a big deal except other tools / packages rely on said version:

% dpkg -l python3-humanize | tail -1
ii  python3-humanize 3.1.0-1      all          Python Humanize library (Python 
3)
% python3 -c 'import humanize; print(humanize.__version__)'
0.0.0
% grep '^Version:' 
/usr/lib/python3/dist-packages/humanize-0.0.0.egg-info/PKG-INFO
Version: 0.0.0
% pgcli
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 567, in 
_build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 884, in 
require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 775, in 
resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (humanize 0.0.0 
(/usr/lib/python3/dist-packages), Requirement.parse('humanize>=0.5.1'), 
{'pgcli'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pgcli", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3239, 
in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3222, 
in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3251, 
in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 569, in 
_build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 582, in 
_build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 770, in 
resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'humanize>=0.5.1' distribution was not 
found and is required by pgcli


Not really sure how this can be fixed considering the source package is
downloaded from PyPi, i.e. there's no SCM version information anymore at
this point.

The source tarball however *does* carry the correct version number
(3.1.0), so maybe there's also an issue in debhelper / debian/rules ?


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970901
[2] https://github.com/jmoiron/humanize/blob/master/setup.py#L34


Cheers,

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.9.0-1-amd64 (SMP w/8 CPU threads)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-humanize depends on:
ii  python3                3.8.6-1
ii  python3-pkg-resources  50.3.0-1

python3-humanize recommends no packages.

python3-humanize suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: python-humanize
Source-Version: 4.8.0-1

On Sun, Oct 25, 2020 at 10:09:29AM +0100, Nicolas Noirbent wrote:
Similarly to black [1], I suspect use_scm_version in humanize's setup.py
[2] breaks humanize.__version__ when built by debian (more accurately,
it breaks pkg_resources.get_distribution(__name__).version).

This was apparently fixed in python3-humanize 4.8.0-1 as part of moving the build system to hatchling.

Not really sure how this can be fixed considering the source package is
downloaded from PyPi, i.e. there's no SCM version information anymore at
this point.

The source tarball however *does* carry the correct version number
(3.1.0), so maybe there's also an issue in debhelper / debian/rules ?

dh-python has code to handle this sort of thing by injecting the upstream version from the packaging metadata, provided the right build-dependencies are present. (Before the conversion to hatchling, this could probably have been fixed by build-depending on python3-setuptools-scm.)

Thanks,

--
Colin Watson (he/him)                              [[email protected]]

--- End Message ---

Reply via email to