Skip to content

Commit 7591c07

Browse files
authored
Merge pull request #415 from mpsonntag/rdfFixes
thank you!
2 parents 174bc85 + 4c22a8f commit 7591c07

7 files changed

+45
-11
lines changed

CHANGELOG.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@
33
Used to document all changes from previous releases and collect changes
44
until the next release.
55

6-
# Latest
76

8-
# Dropping Python 2 support
7+
# Version 1.5.2
8+
9+
## Pinning rdflib version to 5.0.0 until further notice
10+
11+
Due to major breaking changes introduced in the upgrade of
12+
rdflib 5.0.0 to 6.0.0, the rdflib version is pinned to 5.0.0
13+
until the breaking code has been fixed.
14+
15+
## Dropping Python 2 support
916

1017
Python 2 has reached end of life. The codebase has been cleaned from Python 2 and Python 3 compatible code, all tests now run exclusively on Python 3 versions.
1118

12-
# Features
19+
## Features
1320
- `odml.save` and `odmlparser.ODMLWriter` now support additional keywords. See issue #402 and PR #403 for details.
1421

1522

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2011-2018, German Neuroinformatics Node (G-Node)
1+
Copyright (c) 2011-2021, German Neuroinformatics Node (G-Node)
22

33
All rights reserved.
44

appveyor.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ environment:
1313
- PYTHON: "C:\\Python38"
1414
PYVER: 3
1515
BITS: 32
16+
- PYTHON: "C:\\Python39"
17+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
18+
PYVER: 3
19+
BITS: 32
1620
- PYTHON: "C:\\Python36-x64"
1721
PYVER: 3
1822
BITS: 64
@@ -22,6 +26,10 @@ environment:
2226
- PYTHON: "C:\\Python38-x64"
2327
PYVER: 3
2428
BITS: 64
29+
- PYTHON: "C:\\Python39-x64"
30+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
31+
PYVER: 3
32+
BITS: 64
2533

2634
init:
2735
- "ECHO %PYTHON% %vcvars% (%bits%)"
@@ -37,4 +45,7 @@ install:
3745

3846
test_script:
3947
- python --version
40-
- python -m pytest -v
48+
- python -m pytest -v -k "not handle_include and not handle_repository"
49+
# appveyor issues with SSL certificates; deactivating the affected tests,
50+
# since they run fine on GH actions Windows builds.
51+
# - python -m pytest -v

odml/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def _format_warning(warn_msg, *args, **kwargs):
3030
warnings.formatwarning = _format_warning
3131

3232
if _python_version.major < 3:
33-
msg = "Python 2 has been deprecated.\n\todML support for Python 2 will be dropped August 2020."
33+
msg = "Python 2 has reached end of live."
34+
msg += "\n\todML support for Python 2 has been dropped."
3435
warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
3536
elif _python_version.major == 3 and _python_version.minor < 6:
3637
msg = "The '%s' package is not tested with your Python version. " % __name__

odml/info.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"VERSION": "1.5.1",
2+
"VERSION": "1.5.2",
33
"FORMAT_VERSION": "1.1",
44
"AUTHOR": "Hagen Fritsch, Jan Grewe, Christian Kellner, Achilleas Koutsou, Michael Sonntag, Lyuba Zehl",
5-
"COPYRIGHT": "(c) 2011-2020, German Neuroinformatics Node",
5+
"COPYRIGHT": "(c) 2011-2021, German Neuroinformatics Node",
66
"CONTACT": "[email protected]",
77
"HOMEPAGE": "https://github.com/G-Node/python-odml",
88
"CLASSIFIERS": [
@@ -11,6 +11,7 @@
1111
"Programming Language :: Python :: 3.6",
1212
"Programming Language :: Python :: 3.7",
1313
"Programming Language :: Python :: 3.8",
14+
"Programming Language :: Python :: 3.9",
1415
"Topic :: Scientific/Engineering",
1516
"Intended Audience :: Science/Research",
1617
"License :: OSI Approved :: BSD License"

requirements-test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pytest
2-
owlrl
2+
owlrl==5.2.3
33
requests

setup.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import json
22
import os
33

4+
from sys import version_info as _python_version
5+
46
try:
57
from setuptools import setup
68
except ImportError as ex:
@@ -31,9 +33,11 @@
3133

3234
# pyparsing needs to be pinned to 2.4.7 for the time being. setup install fetches a pre-release
3335
# package that currently results in issues with the rdflib library.
34-
install_req = ["lxml", "pyyaml>=5.1", "rdflib", "docopt", "pathlib", "pyparsing==2.4.7"]
36+
install_req = ["lxml", "pyyaml>=5.1", "rdflib==5.0.0", "docopt", "pathlib", "pyparsing==2.4.7"]
3537

36-
tests_req = ["pytest", "owlrl", "requests"]
38+
# owlrl depends on rdflib - the pinned version should be removed once the version pin has also been
39+
# removed from rdflib. Also needs to be updated in requirements-test.txt
40+
tests_req = ["pytest", "owlrl==5.2.3", "requests"]
3741

3842
setup(
3943
name='odML',
@@ -56,3 +60,13 @@
5660
'odmlconvert=odml.scripts.odml_convert:main',
5761
'odmlview=odml.scripts.odml_view:main']}
5862
)
63+
64+
# Make this the last thing people read after a setup.py install
65+
if _python_version.major < 3:
66+
msg = "Python 2 has reached end of live."
67+
msg += "\n\todML support for Python 2 has been dropped."
68+
print(msg)
69+
elif _python_version.major == 3 and _python_version.minor < 6:
70+
msg = "\n\nThis package is not tested with your Python version. "
71+
msg += "\n\tPlease consider upgrading to the latest Python distribution."
72+
print(msg)

0 commit comments

Comments
 (0)