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.38k stars 234 forks source link

Update dependencies #855

Closed ubaumann closed 1 year ago

ubaumann commented 1 year ago

Because of Python 3.7 support, I could not update some packages (black, mypy, sphinx, ...) to the newest version.

mypy after update:

PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True

List of outdated packages on my system:

urs@DESKTOP-BM35OBL:~/projects/nornir$ poetry show --outdated
black                         23.3.0 23.7.0 The uncompromising code formatter.
coverage                      7.2.7  7.3.0  Code coverage measurement for Python
docutils                      0.18.1 0.20.1 Docutils -- Python Documentation Utilities
importlib-metadata            4.13.0 6.8.0  Read metadata from Python packages
importlib-resources           5.12.0 6.0.1  Read resources from Python packages
ipykernel                     6.16.2 6.25.1 IPython Kernel for Jupyter
ipython                       7.34.0 8.14.0 IPython: Productive Interactive Computing
jsonschema                    4.17.3 4.19.0 An implementation of JSON Schema validation for Python
jupyter-client                7.4.9  8.3.0  Jupyter protocol implementation and client libraries
jupyter-core                  4.12.0 5.3.1  Jupyter core package. A base package on which Jupyter projects rely.
jupyter-server                1.24.0 2.7.2  The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.
mypy                          1.4.1  1.5.1  Optional static typing for Python
nbclient                      0.7.4  0.8.0  A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor.
nbconvert                     7.6.0  7.7.4  Converting Jupyter Notebooks
nbformat                      5.8.0  5.9.2  The Jupyter Notebook format
netutils                      1.4.1  1.5.0  Common helper functions useful in network automation.
notebook                      6.5.4  7.0.2  A web-based notebook environment for interactive computing
pycodestyle                   2.10.0 2.11.0 Python style guide checker
pyflakes                      3.0.1  3.1.0  passive checker of Python programs
setuptools                    68.0.0 68.1.2 Easily download, build, install, upgrade, and uninstall Python packages
sphinx                        5.3.0  7.2.2  Python documentation generator
sphinxcontrib-applehelp       1.0.2  1.0.7  sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books
sphinxcontrib-devhelp         1.0.2  1.0.5  sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document.
sphinxcontrib-htmlhelp        2.0.0  2.0.4  sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files
sphinxcontrib-qthelp          1.0.3  1.0.6  sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document.
sphinxcontrib-serializinghtml 1.1.5  1.1.8  sphinxcontrib-serializinghtml is a sphinx extension which outputs "serialized" HTML files (json and pickle).
tornado                       6.2    6.3.3  Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
zipp                          3.15.0 3.16.2 Backport of pathlib-compatible object wrapper for zip files
dbarrosop commented 1 year ago

I am completely fine removing 3.7 support as AFAIK it is EOL. @ktbyers thoughts?

ubaumann commented 1 year ago

When I remove the list of outdated looks like this:

urs@DESKTOP-BM35OBL:~/projects/nornir$ poetry show --outdated
docutils                      0.18.1 0.20.1 Docutils -- Python Documentation Utilities
importlib-metadata            4.13.0 6.8.0  Read metadata from Python packages
ipython                       8.12.2 8.14.0 IPython: Productive Interactive Computing
sphinx                        6.2.1  7.2.2  Python documentation generator
sphinxcontrib-applehelp       1.0.4  1.0.7  sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books
sphinxcontrib-devhelp         1.0.2  1.0.5  sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document.
sphinxcontrib-htmlhelp        2.0.1  2.0.4  sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files
sphinxcontrib-qthelp          1.0.3  1.0.6  sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document.
sphinxcontrib-serializinghtml 1.1.5  1.1.8  sphinxcontrib-serializinghtml is a sphinx extension which outputs "serialized" HTML files (json and pickle).

ipython and sphinx also dropped Python 3.8 support. In my opinion, dropping Python 3.7 support should be okay. On the other side, the dependencies are only development and documentation dependencies.

ktbyers commented 1 year ago

Yep sounds good on removing Python3.7 (since it is EOL).

dbarrosop commented 1 year ago

I'd be fine dropping 3.8 too but I don't have strong opinions here.

ubaumann commented 1 year ago

Python 3.8 will be EOL on October 24. We could add to each development dependency a restriction to only install it when a newer version is unused but feels a little hacky.

If someone would want to install the development and documentation dependencies on Python 3.8 it wouldn't install them without an error.

dbarrosop commented 1 year ago

I'd avoid hacks, specially if 3.8 will be EOL in October. @ktbyers do you have anything against dropping 3.8 too or would you rather wait until October?

Thanks @ubaumann for the work :)

ubaumann commented 1 year ago

@dbarrosop It will be October next year, but I agree on avoiding hacky stuff.

ubaumann commented 1 year ago

I should have written October 2024

dbarrosop commented 1 year ago

Ah, that's not as near :P. I'd still be fine dropping support for it but I guess enterprise users may still be using it. Let's see if Kirk has any opinions here but I am fine with the PR as it is.

ktbyers commented 1 year ago

Yeah, I think we should keep PY3.8.

Everything looks good on the PR.

ktbyers commented 1 year ago

I also updated main branch protections to not require PY3.7 any longer (and added PY3.11 tests).