Skip to content

Commit

Permalink
Dropped support for Python 3.6+3.7
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Aug 18, 2024
1 parent cdfda82 commit f74fcad
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 395 deletions.
90 changes: 6 additions & 84 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,89 +29,16 @@ jobs:
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.head_ref }}" =~ ^release_ ]]; then \
echo "matrix={ \
\"os\": [ \"ubuntu-latest\", \"macos-latest\", \"windows-latest\" ], \
\"python-version\": [ \"3.6\", \"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\" ], \
\"package_level\": [ \"minimum\", \"latest\" ], \
\"exclude\": [ \
{ \
\"os\": \"ubuntu-latest\", \
\"python-version\": \"3.6\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"ubuntu-latest\", \
\"python-version\": \"3.6\", \
\"package_level\": \"latest\" \
}, \
{ \
\"os\": \"macos-latest\", \
\"python-version\": \"3.6\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"macos-latest\", \
\"python-version\": \"3.6\", \
\"package_level\": \"latest\" \
}, \
{ \
\"os\": \"macos-latest\", \
\"python-version\": \"3.7\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"macos-latest\", \
\"python-version\": \"3.7\", \
\"package_level\": \"latest\" \
} \
], \
\"include\": [ \
{ \
\"os\": \"ubuntu-20.04\", \
\"python-version\": \"3.6\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"ubuntu-20.04\", \
\"python-version\": \"3.6\", \
\"package_level\": \"latest\" \
}, \
{ \
\"os\": \"macos-12\", \
\"python-version\": \"3.6\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"macos-12\", \
\"python-version\": \"3.6\", \
\"package_level\": \"latest\" \
}, \
{ \
\"os\": \"macos-12\", \
\"python-version\": \"3.7\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"macos-12\", \
\"python-version\": \"3.7\", \
\"package_level\": \"latest\" \
} \
\"python-version\": [ \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\" ], \
\"package_level\": [ \"minimum\", \"latest\" ] \
] \
}" >> $GITHUB_OUTPUT; \
else \
echo "matrix={ \
\"os\": [ \"ubuntu-latest\" ], \
\"python-version\": [ \"3.7\", \"3.12\" ], \
\"python-version\": [ \"3.8\", \"3.12\" ], \
\"package_level\": [ \"minimum\", \"latest\" ], \
\"include\": [ \
{ \
\"os\": \"ubuntu-20.04\", \
\"python-version\": \"3.6\", \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"ubuntu-20.04\", \
\"python-version\": \"3.6\", \
\"package_level\": \"latest\" \
}, \
{ \
\"os\": \"ubuntu-latest\", \
\"python-version\": \"3.10\", \
Expand All @@ -122,11 +49,6 @@ jobs:
\"python-version\": \"3.10\", \
\"package_level\": \"latest\" \
}, \
{ \
\"os\": \"macos-12\", \
\"python-version\": \"3.6\", \
\"package_level\": \"latest\" \
}, \
{ \
\"os\": \"macos-latest\", \
\"python-version\": \"3.8\", \
Expand All @@ -135,17 +57,17 @@ jobs:
{ \
\"os\": \"macos-latest\", \
\"python-version\": \"3.12\", \
\"package_level\": \"latest\" \
\"package_level\": \"minimum\" \
}, \
{ \
\"os\": \"windows-latest\", \
\"python-version\": \"3.6\", \
\"python-version\": \"3.8\", \
\"package_level\": \"latest\" \
}, \
{ \
\"os\": \"windows-latest\", \
\"python-version\": \"3.12\", \
\"package_level\": \"latest\" \
\"package_level\": \"minimum\" \
} \
] \
}" >> $GITHUB_OUTPUT; \
Expand Down
38 changes: 0 additions & 38 deletions .safety-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,8 @@ security:
reason: PyYAML full_load method or FullLoader is not used
51457:
reason: The py package is no longer being fixed (latest version 1.11.0)
51499:
reason: Fixed wheel version 0.38.1 requires Python>=3.7 and is used there; Risk is on Pypi side
52322:
reason: Fixed GitPython version 3.1.30 requires Python>=3.7 and is used there
52495:
reason: Fixed setuptools version 65.5.1 requires Python>=3.7 and is used there; Risk is on Pypi side
52518:
reason: Fixed GitPython version 3.1.27 requires Python>=3.7 and is used there
58755:
reason: Fixed requests version 2.31.0 requires Python>=3.7 and is used there
58910:
reason: Fixed Pygments version 2.15.0 requires Python>=3.7 and is used there
60350:
reason: Fixed gitpython version 3.1.32 requires Python>=3.7 and is used there
60789:
reason: Fixed gitpython version 3.1.33 requires Python>=3.7 and is used there
60841:
reason: Fixed gitpython version 3.1.34 requires Python>=3.7 and is used there
62044:
reason: Fixed pip version 23.3 requires Python>=3.7 and is used there
64227:
reason: Fixed jinja2 version 3.1.3 requires Python>=3.7 and is used there
63687:
reason: Fixed gitpython version 3.1.41 requires Python>=3.7 and is used there
68477:
reason: Fixed virtualenv version 20.21.0 requires Python>=3.7 and is used on Python>=3.8
70612:
reason: Disputed issue in jinja2 version 3.1.3 - No known fix
70790:
reason: Fixed tqdm version 4.66.3 requires Python>=3.7 and is used there
71064:
reason: Fixed requests version 2.32.2 requires Python>=3.8 and is used there
71591:
reason: Fixed Jinja2 version 3.1.4 requires Python>=3.7 and is used there
71636:
reason: Fixed authlib version 1.3.1 requires Python>=3.8 and is used there
72132:
reason: Fixed zipp version 3.19.1 requires Python>=3.8 and is used there
72236:
reason: Fixed setuptools version 70.0.0 requires Python>=3.8 and is used there

# Continue with exit code 0 when vulnerabilities are found.
continue-on-vulnerability-error: False
42 changes: 1 addition & 41 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,7 @@ dist_included_files := \
done_dir := done

# Packages whose dependencies are checked using pip-missing-reqs
ifeq ($(python_mn_version),3.6)
check_reqs_packages := pytest coverage coveralls flake8 pylint twine
else
ifeq ($(python_mn_version),3.7)
check_reqs_packages := pytest coverage coveralls flake8 pylint twine safety
else
check_reqs_packages := pytest coverage coveralls flake8 pylint twine safety sphinx
endif
endif
check_reqs_packages := pytest coverage coveralls flake8 pylint twine safety sphinx

.PHONY: help
help:
Expand Down Expand Up @@ -488,80 +480,52 @@ upload: _check_version $(dist_files)
html: $(done_dir)/develop_reqs_$(pymn)_$(PACKAGE_LEVEL).done $(doc_build_dir)/html/docs/index.html
@echo "Makefile: Target $@ done."

# Boolean variable indicating that Sphinx should be run
# We run Sphinx only on Python>=3.8 because lower Python versions require too old Sphinx versions
run_sphinx := $(shell $(PYTHON_CMD) -c "import sys; py=sys.version_info[0:2]; sys.stdout.write('true' if py>=(3,8) else 'false')")

$(doc_build_dir)/html/docs/index.html: Makefile $(doc_dependent_files)
ifeq ($(run_sphinx),true)
@echo "Makefile: Creating the documentation as HTML pages"
-$(call RM_FUNC,$@)
$(doc_cmd) -b html $(doc_opts) $(doc_build_dir)/html
@echo "Makefile: Done creating the documentation as HTML pages; top level file: $@"
else
@echo "Skipping Sphinx to create the documentation as HTML pages on Python version $(python_version)"
endif

.PHONY: pdf
pdf: $(done_dir)/develop_reqs_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(doc_dependent_files)
ifeq ($(run_sphinx),true)
@echo "Makefile: Creating the documentation as PDF file"
-$(call RM_FUNC,$@)
$(doc_cmd) -b latex $(doc_opts) $(doc_build_dir)/pdf
@echo "Makefile: Running LaTeX files through pdflatex..."
$(MAKE) -C $(doc_build_dir)/pdf all-pdf
@echo "Makefile: Done creating the documentation as PDF file in: $(doc_build_dir)/pdf/"
@echo "Makefile: Target $@ done."
else
@echo "Skipping Sphinx to create the documentation as PDF file on Python version $(python_version)"
endif

.PHONY: man
man: $(done_dir)/develop_reqs_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(doc_dependent_files)
ifeq ($(run_sphinx),true)
@echo "Makefile: Creating the documentation as man pages"
-$(call RM_FUNC,$@)
$(doc_cmd) -b man $(doc_opts) $(doc_build_dir)/man
@echo "Makefile: Done creating the documentation as man pages in: $(doc_build_dir)/man/"
@echo "Makefile: Target $@ done."
else
@echo "Skipping Sphinx to create the documentation as man pages on Python version $(python_version)"
endif

.PHONY: docchanges
docchanges: $(done_dir)/develop_reqs_$(pymn)_$(PACKAGE_LEVEL).done
ifeq ($(run_sphinx),true)
@echo "Makefile: Creating the doc changes overview file"
$(doc_cmd) -b changes $(doc_opts) $(doc_build_dir)/changes
@echo
@echo "Makefile: Done creating the doc changes overview file in: $(doc_build_dir)/changes/"
@echo "Makefile: Target $@ done."
else
@echo "Skipping Sphinx to create the doc changes overview file on Python version $(python_version)"
endif

.PHONY: doclinkcheck
doclinkcheck: $(done_dir)/develop_reqs_$(pymn)_$(PACKAGE_LEVEL).done
ifeq ($(run_sphinx),true)
@echo "Makefile: Creating the doc link errors file"
$(doc_cmd) -b linkcheck $(doc_opts) $(doc_build_dir)/linkcheck
@echo
@echo "Makefile: Done creating the doc link errors file: $(doc_build_dir)/linkcheck/output.txt"
@echo "Makefile: Target $@ done."
else
@echo "Skipping Sphinx to create the doc link errors file on Python version $(python_version)"
endif

.PHONY: doccoverage
doccoverage: $(done_dir)/develop_reqs_$(pymn)_$(PACKAGE_LEVEL).done
ifeq ($(run_sphinx),true)
@echo "Makefile: Creating the doc coverage results file"
$(doc_cmd) -b coverage $(doc_opts) $(doc_build_dir)/coverage
@echo "Makefile: Done creating the doc coverage results file: $(doc_build_dir)/coverage/python.txt"
@echo "Makefile: Target $@ done."
else
@echo "Skipping Sphinx to create the doc coverage results file on Python version $(python_version)"
endif

.PHONY: authors
authors: _check_version original_authors.md
Expand Down Expand Up @@ -630,15 +594,11 @@ $(done_dir)/flake8_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/develop_reqs_$(pym
@echo "Makefile: Done running Flake8"

$(done_dir)/safety_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/develop_reqs_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(safety_policy_file) minimum-constraints.txt
ifeq ($(python_mn_version),3.6)
@echo "Makefile: Warning: Skipping Safety on Python $(python_version)" >&2
else
@echo "Makefile: Running pyup.io safety check"
-$(call RM_FUNC,$@)
safety check --policy-file $(safety_policy_file) -r minimum-constraints.txt --full-report
echo "done" >$@
@echo "Makefile: Done running pyup.io safety check"
endif

.PHONY: check_reqs
check_reqs: $(done_dir)/develop_reqs_$(pymn)_$(PACKAGE_LEVEL).done minimum-constraints.txt requirements.txt
Expand Down
Loading

0 comments on commit f74fcad

Please sign in to comment.