8000 time-machine still in project dependencies? · Issue #782 · python-pendulum/pendulum · GitHub
[go: up one dir, main page]

Skip to content
time-machine still in project dependencies? #782
Closed
@philipbjorge

Description

@philipbjorge

Issue

We use the project liccheck to validate our dependency licenses.
With the upgrade to Pendulum 3.0, this is now failing.

Repro

liccheck -r requirements.txt

pendulum==3.0.0 ; python_version >= "3.10" and python_version < "3.11"
❯ poetry run liccheck -r requirements.txt
gathering licenses...
Traceback (most recent call last):
  File "/workspaces/marketplace/.venv/bin/liccheck", line 8, in <module>
    sys.exit(main())
  File "/workspaces/marketplace/.venv/lib/python3.10/site-packages/liccheck/command_line.py", line 529, in main
    sys.exit(run(args))
  File "/workspaces/marketplace/.venv/lib/python3.10/site-packages/liccheck/command_line.py", line 509, in run
    return process(
  File "/workspaces/marketplace/.venv/lib/python3.10/site-packages/liccheck/command_line.py", line 317, in process
    pkg_info = get_packages_info(requirement_file, no_deps)
  File "/workspaces/marketplace/.venv/lib/python3.10/site-packages/liccheck/command_line.py", line 195, in get_packages_info
    packages = [transform(dist) for dist in resolve_func(requirements)]
  File "/workspaces/marketplace/.venv/lib/python3.10/site-packages/liccheck/command_line.py", line 195, in <listcomp>
    packages = [transform(dist) for dist in resolve_func(requirements)]
  File "/workspaces/marketplace/.venv/lib/python3.10/site-packages/liccheck/requirements.py", line 51, in resolve
    for dist in pkg_resources.working_set.resolve(requirements):
  File "/workspaces/marketplace/.venv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
  File "/workspaces/marketplace/.venv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 870, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'time-machine>=2.6.0; implementation_name != "pypy"' distribution was not found and is required by pendulum

https://github.com/dhatim/python-license-check/blob/master/liccheck/requirements.py#L51

Notes

I see that this PR made the testing helpers optional.

I'm wondering if the inclusion of time-machine in the project dependencies is the cause of the issue.

https://github.com/sdispater/pendulum/blob/3e3fec6a5b66759078c5ae39c736ca95b78adbef/pyproject.toml#L25

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0