Skip to content

Commit 50b7f94

Browse files
committed
fix: lower requires-python to >=3.10 and sync pyproject.toml version to 0.4.0
Add `from __future__ import annotations` to all modules missing it (_http.py, _xml.py, exceptions.py, _mappings.py) so PEP 604 union syntax works on Python 3.10+.
1 parent 9c6ae6d commit 50b7f94

5 files changed

Lines changed: 13 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
[project]
22
name = "python-entsoe"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
description = "Python client for the ENTSO-E Transparency Platform API"
55
readme = "README.md"
66
license = "MIT"
77
authors = [
88
{ name = "jsulopzs", email = "jesus.lopez@datons.com" },
99
]
10-
requires-python = ">=3.13"
10+
requires-python = ">=3.10"
1111
keywords = ["entsoe", "energy", "electricity", "api", "transparency"]
1212
classifiers = [
1313
"Development Status :: 3 - Alpha",
1414
"Intended Audience :: Science/Research",
1515
"License :: OSI Approved :: MIT License",
1616
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
1720
"Programming Language :: Python :: 3.13",
1821
"Topic :: Scientific/Engineering",
1922
]

src/entsoe/_http.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- Response validation
88
"""
99

10+
from __future__ import annotations
11+
1012
import io
1113
import logging
1214
import time

src/entsoe/_mappings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""ENTSO-E area codes, document types, and PSR type mappings."""
22

3+
from __future__ import annotations
4+
35
# Country code (ISO 3166-1 alpha-2) → ENTSO-E EIC area code
46
AREA_CODES: dict[str, str] = {
57
"AL": "10YAL-KESH-----5",

src/entsoe/_xml.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
All share the TimeSeries > Period > Point structure.
1111
"""
1212

13+
from __future__ import annotations
14+
1315
import re
1416
import xml.etree.ElementTree as ET
1517
from datetime import timedelta

src/entsoe/exceptions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Exception hierarchy for the ENTSO-E client."""
22

3+
from __future__ import annotations
4+
35

46
class ENTSOEError(Exception):
57
"""Base exception for all ENTSO-E API errors."""

0 commit comments

Comments
 (0)