Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Install poetry
run: pipx install poetry

- name: Set up Python 3.13
- name: Set up Python 3.14
uses: actions/[email protected]
with:
python-version: '3.13'
python-version: '3.14'
cache: 'poetry'

# Need to install poetry again in the new python version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Install poetry
run: pipx install poetry

- name: Set up Python 3.13
- name: Set up Python 3.14
uses: actions/[email protected]
with:
python-version: '3.13'
python-version: '3.14'
cache: 'poetry'

# Need to install poetry again in the new python version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev' ]
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]

steps:
- uses: actions/checkout@v5
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The main differences between these two libraries are :
* A complete rewrite of the library with a more object-oriented architecture allowing for easy interaction, data
validation and extended functionality
* Add support for reading and writing Lexeme, MediaInfo and Property entities
* Python 3.9 to 3.13 support, validated with unit tests
* Python 3.10 to 3.14 support, validated with unit tests
* Type hints implementation for arguments and return, checked with mypy static type checker
* Add OAuth 2.0 login method
* Add logging module support
Expand Down Expand Up @@ -334,7 +334,7 @@ Here is a list of different projects that use the library:
# Installation #

The easiest way to install WikibaseIntegrator is to use the `pip` package manager. WikibaseIntegrator supports Python
3.9 and above. If Python 2 is installed, `pip` will lead to an error indicating missing dependencies.
3.10 and above. If Python 2 is installed, `pip` will lead to an error indicating missing dependencies.

```bash
python -m pip install wikibaseintegrator
Expand Down
81 changes: 12 additions & 69 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ documentation = "https://wikibaseintegrator.readthedocs.io"
keywords = ["wikibase", "wikidata", "mediawiki", "sparql"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -39,7 +38,7 @@ classifiers = [
Changelog = "https://github.com/LeMyst/WikibaseIntegrator/releases"

[tool.poetry.dependencies]
python = "^3.9"
python = "^3.10"
backoff = "^2.2.1"
mwoauth = "^0.4.0"
oauthlib = "^3.2.2"
Expand Down
6 changes: 3 additions & 3 deletions wikibaseintegrator/datatypes/entityschema.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from typing import Any, Optional, Union
from typing import Any

from wikibaseintegrator.datatypes.basedatatype import BaseDataType

Expand All @@ -10,7 +10,7 @@ class EntitySchema(BaseDataType):
"""
DTYPE = 'entity-schema'

def __init__(self, value: Optional[Union[str, int]] = None, **kwargs: Any):
def __init__(self, value: str | int | None = None, **kwargs: Any):
"""
Constructor, calls the superclass BaseDataType

Expand All @@ -20,7 +20,7 @@ def __init__(self, value: Optional[Union[str, int]] = None, **kwargs: Any):
super().__init__(**kwargs)
self.set_value(value=value)

def set_value(self, value: Optional[Union[str, int]] = None):
def set_value(self, value: str | int | None = None):
assert isinstance(value, (str, int)) or value is None, f'Expected str or int, found {type(value)} ({value})'

if value:
Expand Down
6 changes: 3 additions & 3 deletions wikibaseintegrator/datatypes/form.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from typing import Any, Optional
from typing import Any

from wikibaseintegrator.datatypes.basedatatype import BaseDataType

Expand All @@ -16,7 +16,7 @@ class Form(BaseDataType):
}}
'''

def __init__(self, value: Optional[str] = None, **kwargs: Any):
def __init__(self, value: str | None = None, **kwargs: Any):
"""
Constructor, calls the superclass BaseDataType

Expand All @@ -37,7 +37,7 @@ def __init__(self, value: Optional[str] = None, **kwargs: Any):
super().__init__(**kwargs)
self.set_value(value=value)

def set_value(self, value: Optional[str] = None):
def set_value(self, value: str | None = None):
assert isinstance(value, str) or value is None, f"Expected str, found {type(value)} ({value})"

if value:
Expand Down
6 changes: 3 additions & 3 deletions wikibaseintegrator/datatypes/geoshape.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from typing import Any, Optional
from typing import Any

from wikibaseintegrator.datatypes.basedatatype import BaseDataType

Expand All @@ -16,7 +16,7 @@ class GeoShape(BaseDataType):
}}
'''

def __init__(self, value: Optional[str] = None, **kwargs: Any):
def __init__(self, value: str | None = None, **kwargs: Any):
"""
Constructor, calls the superclass BaseDataType

Expand All @@ -39,7 +39,7 @@ def __init__(self, value: Optional[str] = None, **kwargs: Any):
super().__init__(**kwargs)
self.set_value(value=value)

def set_value(self, value: Optional[str] = None):
def set_value(self, value: str | None = None):
assert isinstance(value, str) or value is None, f"Expected str, found {type(value)} ({value})"

if value:
Expand Down
6 changes: 3 additions & 3 deletions wikibaseintegrator/datatypes/globecoordinate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from typing import Any, Optional
from typing import Any

from wikibaseintegrator.datatypes.basedatatype import BaseDataType
from wikibaseintegrator.models import Claim
Expand All @@ -18,7 +18,7 @@ class GlobeCoordinate(BaseDataType):
}}
'''

def __init__(self, latitude: Optional[float] = None, longitude: Optional[float] = None, altitude: Optional[float] = None, precision: Optional[float] = None, globe: Optional[str] = None, wikibase_url: Optional[str] = None,
def __init__(self, latitude: float | None = None, longitude: float | None = None, altitude: float | None = None, precision: float | None = None, globe: str | None = None, wikibase_url: str | None = None,
**kwargs: Any):
"""
Constructor, calls the superclass BaseDataType
Expand All @@ -34,7 +34,7 @@ def __init__(self, latitude: Optional[float] = None, longitude: Optional[float]
super().__init__(**kwargs)
self.set_value(latitude=latitude, longitude=longitude, altitude=altitude, precision=precision, globe=globe, wikibase_url=wikibase_url)

def set_value(self, latitude: Optional[float] = None, longitude: Optional[float] = None, altitude: Optional[float] = None, precision: Optional[float] = None, globe: Optional[str] = None, wikibase_url: Optional[str] = None):
def set_value(self, latitude: float | None = None, longitude: float | None = None, altitude: float | None = None, precision: float | None = None, globe: str | None = None, wikibase_url: str | None = None):
# https://github.com/wikimedia/Wikibase/blob/174450de8fdeabcf97287604dbbf04d07bb5000c/repo/includes/Rdf/Values/GlobeCoordinateRdfBuilder.php#L120
precision = precision or 1 / 3600
globe = globe or str(config['COORDINATE_GLOBE_QID'])
Expand Down
Loading
Loading