nornir-automation / nornir

Pluggable multi-threaded framework with inventory management to help operate collections of devices
https://nornir.readthedocs.io/
Apache License 2.0
1.37k stars 233 forks source link

Version 3.4.1, fix missing dependencies #867

Closed ktbyers closed 11 months ago

ktbyers commented 11 months ago

Correct issue with broken typing_extensions (which was caused by earlier changes I made to pyproject.toml and missing tests where we should catch this type of issue).

ktbyers commented 11 months ago

@nemith I reimplemented this as I wanted to remove some of the clutter (i.e. the isort changes).

I also re-added mypy_extensions as I wanted to keep the changes close to the minimum set needed to fix the issue with the broken release (and looking into Callback Protocols as the typing replacement for the Extended Callback Types was taking too long to research/understand properly).

I am totally open to removing mypy_extensions we should just look to do it as part of the next release.

ktbyers commented 11 months ago

I also tested that this imported properly from a poetry built wheel version of 3.4.1

# In blank/new virtual environment
$ pip install nornir-3.4.1-py3-none-any.whl

$ python
Python 3.11.0 (main, Nov 17 2022, 14:54:18) [GCC 7.3.1 20180712 (Red Hat 7.3.1-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nornir
>>> nornir.__version__
'3.4.1'
ktbyers commented 11 months ago

@dbarrosop @ubaumann

FYI, I am going to push out a new Nornir release to fix the currently broken release. See issue #https://github.com/nornir-automation/nornir/issues/861

This was caused by the pyproject.toml restructuring/fixes that I did earlier (i.e. imports that were not dev imports got categorized as dev imports) and that this step is not tested currently (i.e. we had no feedback from CI-CD system that it was broken...I will see if I can fix that later).

Thanks to @nemith for his reporting of the issue and doing a bunch of the work on the fix. We should at the removal proposal of mypy_extensions that he recommended in his other PR, but I didn't have time to research that tonight.

nemith commented 11 months ago

Yeah these being only used for type checking it should be fairly low risk, but so should reoranging a pyproject.toml file so I understand.

For next minor releases how do you queue the changes? Are you ok for me resubmitting another PR to reapply removing mypy_extensions?

ktbyers commented 11 months ago

@nemith Yes, definitely go ahead and resubmit the PR to remove mypy_extensions.

There is a good chance it will be a while before there is another minor release, but it is better to get this done in the near future when it is fresh in everyone's mind (or else it will probably just get put onto the back burner until the deprecated feature is actually removed).