Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Python 3.7 #2901

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ["3.7", "3.9", "3.10"]
python-version: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ python:
build:
os: ubuntu-22.04
tools:
python: "3.7"
python: "3.9"
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sonar.sources=bin, python
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

sonar.python.version=3.7, 3.8, 3.9
sonar.python.version=3.9,3.10
sonar.tests=tests

sonar.exclusions=python/nav/smidumps/**, python/nav/enterprise/ids.py, python/nav/etc/geomap/config.py
1 change: 1 addition & 0 deletions changelog.d/2790.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade dependencies after dropping support for Python 3.7
1 change: 1 addition & 0 deletions changelog.d/2790.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for Python 3.7
3 changes: 0 additions & 3 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# ciscoconfparse 1.8 has a bug that prevents it from being imported on Python 3.7,
# even though it claims compatibility with 3.7.
ciscoconfparse<1.8.0 ; python_version < '3.8'
6 changes: 3 additions & 3 deletions doc/howto/generic-install-from-source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Build requirements

To build NAV, you need at least the following:

* Python >= 3.7.0
* Python >= 3.9.0
* Sphinx >= 1.0 (for building this documentation)

Runtime requirements
Expand All @@ -29,7 +29,7 @@ To run NAV, these software packages are required:
* Apache2 + mod_wsgi (or, really, any web server that supports the WSGI interface)
* PostgreSQL >= 11 (With the ``hstore`` extension available)
* :xref:`Graphite`
* Python >= 3.7.0
* Python >= 3.9.0
* nbtscan = 1.5.1
* dhcping (only needed if using DHCP service monitor)

Expand All @@ -47,7 +47,7 @@ files::
*However*, some of the required modules are C extensions that will require the
presence of some C libraries to be correctly built (unless PyPI provides binary
wheels for your platform). These include the ``psycopg2`` driver and the
``python-ldap`` and ``Pillow`` modules).
``python-ldap`` and ``Pillow`` modules.

The current Python requirements are as follows:

Expand Down
2 changes: 1 addition & 1 deletion doc/howto/manual-install-on-debian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Copy the file :file:`/etc/nav/apache/apache.conf.example` to
* ``documentation_path`` is where Sphinx put the docs, in
``$SOURCE_CODE_DIRECTORY/build/sphinx/html/``.
* ``nav_uploads_path`` is the upload path you created in step 8.
* ``nav_python_base`` should be :file:`/usr/local/lib/python3.7/dist-packages` (or wherever the ``nav`` Python module was installed)
* ``nav_python_base`` should be :file:`/usr/local/lib/python3.9/dist-packages` (or wherever the ``nav`` Python module was installed)

We suggest creating a new Apache site config:
Inside a ``VirtualHost``-directive, add:
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "nav"
description = "Network Administration Visualized - A comprehensive, free Network Management System"
authors = [{name="Sikt - Norwegian agency for shared services in education and research", email="nav-support@uninett.no"}]
readme = "README.rst"
requires-python = ">=3.7"
requires-python = ">=3.9"
license = {text = "GPLv3"}
keywords = ["nms", "snmp"]
classifiers = [
Expand All @@ -16,10 +16,6 @@ classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
]
dynamic = ["version"]
dependencies = [
"importlib_metadata; python_version < '3.8'",
"importlib_resources; python_version < '3.9'",
]


[project.urls]
Expand Down
5 changes: 1 addition & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ psycopg2==2.9.9 # requires libpq to build
IPy==1.01
pyaml

twisted~=23.8.0 # last version that still supports Python 3.7
twisted>=23.8.0

networkx==2.6.3
Pillow>3.3.2
Expand Down Expand Up @@ -35,7 +35,4 @@ libsass==0.15.1

napalm==3.4.1

backports.zoneinfo ; python_version < '3.9'
importlib_metadata ; python_version < '3.8'
importlib_resources ; python_version < '3.9'
git+https://github.com/Uninett/drf-oidc-auth@v4.0#egg=drf-oidc-auth
3 changes: 1 addition & 2 deletions tests/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get -y install --no-install-recommends \
curl git build-essential \
python3.7-dbg python3.7-dev python3.7-distutils \
python3.9-dbg python3.9-dev \
python3.10-dbg python3.10-dev \
python3-pip
Expand Down Expand Up @@ -68,7 +67,7 @@ RUN cd /tmp && \
mv chromedriver /usr/local/bin/

# Install our primary test runner
RUN python3.7 -m pip install 'tox<4' snmpsim 'pyasn1<0.5.0' virtualenv
RUN python3.9 -m pip install 'tox<4' snmpsim 'pyasn1<0.5.0' virtualenv

# Add a build user
ENV USER build
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
# of the documentation in hacking.rst
[tox]
envlist =
{unit,integration,functional}-py{37,39,310}-django{32}
{unit,integration,functional}-py{39,310}-django{32}
javascript
docs
skipsdist = True
basepython = python3.7
basepython = python3.9

[pytest]
addopts = --failed-first
Expand All @@ -20,7 +20,6 @@ markers =

[gh-actions]
python =
3.7: py37
3.9: py39
3.10: py310

Expand Down
Loading