Add click v8 compatibility
Mogost opened this issue · 6 comments
$ pur -i -r requirements.in
Traceback (most recent call last):
File "//.pyenv/versions/varys/bin/pur", line 8, in <module>
sys.exit(pur())
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/click/core.py", line 1061, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/click/core.py", line 923, in make_context
self.parse_args(ctx, args)
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/click/core.py", line 1379, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/click/core.py", line 2364, in handle_parse_result
value = self.process_value(ctx, value)
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/click/core.py", line 2320, in process_value
value = self.type_cast_value(ctx, value)
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/click/core.py", line 2307, in type_cast_value
return convert(value)
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/click/types.py", line 75, in __call__
return self.convert(value, param, ctx)
File "//.pyenv/versions/3.8.10/envs/varys/lib/python3.8/site-packages/pur/__init__.py", line 54, in convert
if value.lower() == 'true':
AttributeError: 'bool' object has no attribute 'lower'
https://click.palletsprojects.com/en/8.0.x/changes/#version-8-0-0
Click>=8.0 dropped Python 2 support, but pur didn't (atleast setup.py
declares what py2 is supported). I think we need either continue support it or drop Python 2 and fix this (in this case I can submit a PR).
Let's drop py2 support too.
in this case I can submit a PR
I actually already have a PR almost ready, where I'm upgrading pip
and click
. I'll drop py2 support in that PR.
Hello! You wrote that you already have a PR for this issue. Do you have any news or updates for it?
Would be nice to have support for Click>=8.0. Currently the package on NixOS can't be built. I guess that other distributions are affected as well.
Upgraded click with v5.4.3 released just now.
The next pur release will upgrade pip and drop support for py2.
Oops, should have bumped the major version instead of patch because we broke --verify false
. Hopefully nobody's automated builds break. If they do let me know and I'll release a new patch version adding back --verify false
support.