Closed pcorpet closed 2 years ago
This change raises an error for me on Python 3.9 and 3.10:
$ python -m hashin -r requirements.txt django
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/markus/Coding/hashin/hashin.py", line 855, in <module>
sys.exit(main())
File "/home/markus/Coding/hashin/hashin.py", line 837, in main
return run(
File "/home/markus/Coding/hashin/hashin.py", line 135, in run
return run_packages(specs, requirements_file, *args, **kwargs)
File "/home/markus/Coding/hashin/hashin.py", line 249, in run_packages
for i, release in enumerate(data["hashes"], key=lambda r: r["hash"]):
TypeError: 'key' is an invalid keyword argument for enumerate()
$ hashin -r requirements.txt django
Traceback (most recent call last):
File "/home/markus/Coding/hashin/venv39/bin/hashin", line 33, in <module>
sys.exit(load_entry_point('hashin', 'console_scripts', 'hashin')())
File "/home/markus/Coding/hashin/hashin.py", line 837, in main
return run(
File "/home/markus/Coding/hashin/hashin.py", line 135, in run
return run_packages(specs, requirements_file, *args, **kwargs)
File "/home/markus/Coding/hashin/hashin.py", line 249, in run_packages
for i, release in enumerate(data["hashes"], key=lambda r: r["hash"]):
TypeError: 'key' is an invalid keyword argument for enumerate()
Oops, I was sloppy, sorry about that.
Works for me. Thank you!
@pcorpet
Would you mind editing the matrix in .github/workflows/python.yml
and the Python version lists in tox.ini
as part of this PR?
In fact, perhaps it would be best to move the other linting tasks that, currently, 3.8 does into 3.10 in the tox file.
@peterbe it was actually failing on all versions before my fixes. But I'm all for clean commits and PRs so I'll send you another PR.
I also realize I forgot to update the version history...
I've rebased so that CI runs on python 3.9 and 3.10: ready to merge.
Fixes #126