vxgmichel / aiostream

Generator-based operators for asynchronous iteration
http://aiostream.readthedocs.io
GNU General Public License v3.0
760 stars 33 forks source link

CI test pipeline doesn't run in Python 3.12: ModuleNotFoundError: No module named 'setuptools' #91

Closed hf-kklein closed 6 months ago

hf-kklein commented 6 months ago

Run python setup.py test --addopts "--cov-report xml" Traceback (most recent call last): File "/home/runner/work/aiostream/aiostream/setup.py", line 3, in from setuptools import setup ModuleNotFoundError: No module named 'setuptools' Error: Process completed with exit code 1.

Solution would be to

hf-kklein commented 6 months ago

PR #93 fixes the issue

vxgmichel commented 6 months ago

Thanks a lot for your help @hf-kklein :)

either drop setup.py/setup.cfg and switch to pyproject.toml and e.g. hatch

That sounds good, I should definitely look into that at some point. Do you have any advice on which tool to use? I guess it's also possible to use pyproject.toml with the setuptools build backend right?

vxgmichel commented 6 months ago

Also, do you need a new release right now?

hf-kklein commented 6 months ago

At the company I'm working it, we use hatch+build+twine. You can find a MWE repo with this tools here: https://github.com/Hochfrequenz/python_template_repository

The relevant hatch lines are: https://github.com/Hochfrequenz/python_template_repository/blob/9f6830708f4ce44d75061298c443e81fbd9e329c/pyproject.toml#L37

We also have 2 Github Actions in Place for Packaging and Publishing

If you'd be fine with it, I can try to transition aiostreams to pyproject.toml and drop the setup.py/cfg.

hf-kklein commented 6 months ago

Also, do you need a new release right now?

nope. The code works in 3.11, even without the lines in setup.py

vxgmichel commented 6 months ago

If you'd be fine with it, I can try to transition aiostreams to pyproject.toml and drop the setup.py/cfg.

That would be awesome, thanks a lot your help :)

hatch sounds good, I like that it comes from PyPA.