Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invoke<2.0.0 requires python<=3.11.0 dependency #36

Closed
1 task done
AaronOpfer opened this issue Oct 20, 2023 · 3 comments
Closed
1 task done

invoke<2.0.0 requires python<=3.11.0 dependency #36

AaronOpfer opened this issue Oct 20, 2023 · 3 comments
Labels

Comments

@AaronOpfer
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Hello,

Invoke versions older than 2.0.0 cannot be installed alongside Python 3.11, or they will not function properly.

Traceback (most recent call last):
  File "/home/aopfer/miniconda3/envs/invoketest/bin/inv", line 10, in <module>
    sys.exit(program.run())
             ^^^^^^^^^^^^^
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/site-packages/invoke/program.py", line 373, in run
    self.parse_collection()
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/site-packages/invoke/program.py", line 465, in parse_collection
    self.load_collection()
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/site-packages/invoke/program.py", line 699, in load_collection
    module, parent = loader.load(coll_name)
                     ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/site-packages/invoke/loader.py", line 76, in load
    module = imp.load_module(name, fd, path, desc)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/imp.py", line 235, in load_module
    return load_source(name, filename, file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/imp.py", line 172, in load_source
    module = _load(spec)
             ^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 721, in _load
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/aopfer/tasks.py", line 3, in <module>
    @task
     ^^^^
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/site-packages/invoke/tasks.py", line 331, in task
    return klass(args[0], **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/site-packages/invoke/tasks.py", line 76, in __init__
    self.positional = self.fill_implicit_positionals(positional)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/site-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
    args, spec_dict = self.argspec(self.body)
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aopfer/miniconda3/envs/invoketest/lib/python3.11/site-packages/invoke/tasks.py", line 153, in argspec
    spec = inspect.getargspec(func)
           ^^^^^^^^^^^^^^^^^^

This is a github issue for invoke discussing the problem, specifically linking to the maintainer's statement that version 2.0.0 will fix the problem. I was able to confirm that invoke 2.0.0 fixes the problem by upgrading to it with conda.

pyinvoke/invoke#833 (comment)

I have created a repodata patch that will update the requirements of these older packages to fix the problem:

conda-forge/conda-forge-repodata-patches-feedstock#576

Installed packages

# packages in environment at /home/aopfer/miniconda3/envs/invoketest:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2023.7.22            hbcca054_0    conda-forge
invoke                    1.7.3              pyhd8ed1ab_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_2    conda-forge
libgomp                   13.2.0               h807b86a_2    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libsqlite                 3.43.2               h2797004_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
ncurses                   6.4                  hcb278e6_0    conda-forge
openssl                   3.1.3                hd590300_0    conda-forge
pip                       23.3               pyhd8ed1ab_0    conda-forge
python                    3.11.6          hab00c5b_0_cpython    conda-forge
readline                  8.2                  h8228510_1    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h2797004_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge

Environment info

/home/aopfer/miniconda3/lib/python3.11/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.0.0)/charset_normalizer (2.0.12) doesn't match a supported version!
  warnings.warn(

     active environment : invoketest
    active env location : /home/aopfer/miniconda3/envs/invoketest
            shell level : 1
       user config file : /home/aopfer/.condarc
 populated config files : /home/aopfer/.condarc
          conda version : 22.9.0
    conda-build version : 3.23.1
         python version : 3.11.0.final.0
       virtual packages : __cuda=12.0=0
                          __linux=6.1.0=0
                          __glibc=2.36=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/aopfer/miniconda3  (writable)
      conda av data dir : /home/aopfer/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/aopfer/miniconda3/pkgs
                          /home/aopfer/.conda/pkgs
       envs directories : /home/aopfer/miniconda3/envs
                          /home/aopfer/.conda/envs
               platform : linux-64
             user-agent : conda/22.9.0 requests/2.28.0 CPython/3.11.0 Linux/6.1.0-10-amd64 debian/12 glibc/2.36
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
@AaronOpfer AaronOpfer added the bug label Oct 20, 2023
@nicoddemus
Copy link
Member

Thanks, conda-forge/conda-forge-repodata-patches-feedstock#576 has been merged (thanks for that too), can we close this then?

@AaronOpfer
Copy link
Author

Yep, the updated repodata won't let me reproduce the problem.

@nicoddemus
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants