Skip to content

Commit

Permalink
BREAKING CHANGE: drop support for python 3.7
Browse files Browse the repository at this point in the history
Python 3.7 will be end-of-life on the 27th of June 2023 and the next release of
RDFLib will be a new major version.

This changes the minimum supported version of Python to 3.8.1 as some of the
dependencies we use are not too fond of python 3.8.0. This change also removes
all accommodations for older python versions.
  • Loading branch information
aucampia committed Jun 10, 2023
1 parent 4b96e9d commit c222753
Show file tree
Hide file tree
Showing 15 changed files with 140 additions and 288 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,37 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
# This is used for injecting additional tests for a specific python
# version and OS.
suffix: [""]
include:
- python-version: "3.7"
- python-version: "3.8"
os: ubuntu-latest
extensive-tests: true
TOXENV_SUFFIX: "-docs"
- python-version: "3.7"
- python-version: "3.8"
os: ubuntu-latest
extensive-tests: true
suffix: "-min"
TOXENV_SUFFIX: "-min"
- python-version: "3.8"
- python-version: "3.9"
os: ubuntu-latest
TOX_EXTRA_COMMAND: "- isort --check-only --diff ."
TOXENV_SUFFIX: "-docs"
- python-version: "3.9"
- python-version: "3.10"
os: ubuntu-latest
TOX_EXTRA_COMMAND: "- black --check --diff ./rdflib"
TOXENV_SUFFIX: "-lxml"
- python-version: "3.10"
- python-version: "3.11"
os: ubuntu-latest
TOX_EXTRA_COMMAND: "flake8 --exit-zero rdflib"
TOXENV_SUFFIX: "-docs"
PREPARATION: "sudo apt-get install -y firejail"
extensive-tests: true
TOX_TEST_HARNESS: "firejail --net=none --"
TOX_PYTEST_EXTRA_ARGS: "-m 'not webtest'"
- python-version: "3.11"
os: ubuntu-latest
TOXENV_SUFFIX: "-docs"
steps:
- uses: actions/checkout@v3
- name: Cache XDG_CACHE_HOME
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Help with maintenance of all of the RDFLib family of packages is always welcome

## Versions & Releases

* `7.0.0a0` current `main` branch
* `7.0.0a0` current `main` branch and supports Python 3.8.1+ only.
* `6.x.y` current release and support Python 3.7+ only. Many improvements over 5.0.0
* see [Releases](https://github.com/RDFLib/rdflib/releases)
* `5.x.y` supports Python 2.7 and 3.4+ and is [mostly backwards compatible with 4.2.2](https://rdflib.readthedocs.io/en/stable/upgrade4to5.html).
Expand Down
5 changes: 1 addition & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def find_version(filename):

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3.7", None),
"python": ("https://docs.python.org/3.8", None),
}

html_experimental_html5_writer = True
Expand Down Expand Up @@ -331,9 +331,6 @@ def find_version(filename):
]
)

if sys.version_info < (3, 8):
nitpick_ignore.extend([("py:class", "importlib_metadata.EntryPoint")])


def autodoc_skip_member_handler(
app: sphinx.application.Sphinx,
Expand Down
2 changes: 2 additions & 0 deletions docs/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ flag them as expecting to fail.
Compatibility
-------------

RDFlib 7.0.0 release and later only support Python 3.8.1 and newer.

RDFlib 6.0.0 release and later only support Python 3.7 and newer.

RDFLib 5.0.0 maintained compatibility with Python versions 2.7, 3.4, 3.5, 3.6, 3.7.
Expand Down
2 changes: 1 addition & 1 deletion docs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ methods that search triples and return them in arbitrary order.

RDFLib graphs also redefine certain built-in Python methods in order
to behave in a predictable way. They do this by `emulating container types
<https://docs.python.org/3.7/reference/datamodel.html#emulating-container-types>`_ and
<https://docs.python.org/3.8/reference/datamodel.html#emulating-container-types>`_ and
are best thought of as a set of 3-item tuples ("triples", in RDF-speak):

.. code-block:: text
Expand Down
5 changes: 5 additions & 0 deletions docs/upgrade6to7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
Upgrading 6 to 7
============================================

Python version
----------------------------------------------------

RDFLib 7 requires Python 3.8.1 or later.

New behaviour for ``publicID`` in ``parse`` methods.
----------------------------------------------------

Expand Down
9 changes: 1 addition & 8 deletions examples/secure_with_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,8 @@ def main() -> None:
),
)

if sys.version_info < (3, 8):
logging.warn("This example requires Python 3.8 or higher")
return None

# Install the audit hook
#
# note on type error: This is needed because we are running mypy with python
# 3.7 mode, so mypy thinks the previous condition will always be true.
sys.addaudithook(audit_hook) # type: ignore[unreachable]
sys.addaudithook(audit_hook)

graph = Graph()

Expand Down
Loading

0 comments on commit c222753

Please sign in to comment.