not compatible with upcoming `invoke` release

Open
#27 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start with rellu/init.py and utest/test_version.py, then reproduce the collection failure with pytest. Inspect how the project imports and checks Invoke's version, and verify that the test suite collects and passes with the upcoming Invoke release.

Written by the indexing model from the issue text.

Description

Hi,

After finding a serious problem with the latest release of invoke (2.2.1): https://github.com/pyinvoke/invoke/issues/1054, I had to package the unreleased git tree.

EDIT: The issue was not in invoke; the latest 2.2.1 release is fine. The rest of this issue still holds for a future release.

There seems to be a small incompatibility with rellu, which is found when running its test suite:

============================= test session starts ==============================
platform linux -- Python 3.11.11, pytest-8.4.1, pluggy-1.6.0 -- /gnu/store/v76lvm9985mj5h3kwrkif7gnqv3q30ck-python-wrapper-3.11.11/bin/python
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /tmp/guix-build-python-rellu-0.7.drv-0/source
plugins: hypothesis-6.135.26
collecting ... collected 0 items / 1 error

==================================== ERRORS ====================================
____________________ ERROR collecting utest/test_version.py ____________________
ImportError while importing test module '/tmp/guix-build-python-rellu-0.7.drv-0/source/utest/test_version.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/gnu/store/lawd7nyacmw4f5as1mlzv2zigjwm03y5-python-rellu-0.7/lib/python3.11/site-packages/rellu/__init__.py:36: in <module>
    from invoke import __version_info__ as invoke_version
E   ImportError: cannot import name '__version_info__' from 'invoke' (/gnu/store/vkqlzpr6vd4hh0lvkj8im3b3d7s6mjih-python-invoke-2.2.1-0.ba193d1/lib/python3.11/site-packages/invoke/__init__.py)

During handling of the above exception, another exception occurred:
/gnu/store/f3sc2n63n727bysn4040gsk5gsh2502w-python-pytest-8.4.1/lib/python3.11/site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
/gnu/store/f3sc2n63n727bysn4040gsk5gsh2502w-python-pytest-8.4.1/lib/python3.11/site-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
/gnu/store/1qmk0ip6gvjs9i9pwj74n4yddqcl45rg-python-3.11.11/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/gnu/store/f3sc2n63n727bysn4040gsk5gsh2502w-python-pytest-8.4.1/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
utest/test_version.py:5: in <module>
    from rellu.version import Version
/gnu/store/lawd7nyacmw4f5as1mlzv2zigjwm03y5-python-rellu-0.7/lib/python3.11/site-packages/rellu/__init__.py:41: in <module>
    raise ImportError('invoke 0.20 or newer required.')
E   ImportError: invoke 0.20 or newer required.
=========================== short test summary info ============================
ERROR utest/test_version.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.33s ===============================
Dominant language
Python
Stars
7
Forks
6
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.