Skip to content

Commit 00e879d

Browse files
Add Support for Python 3.13 (#465)
* Update pyproject.toml * remove deprecated fill_value * Update release_notes.rst --------- Co-authored-by: Fabian <[email protected]>
1 parent 78093a4 commit 00e879d

File tree

6 files changed

+2
-28
lines changed

6 files changed

+2
-28
lines changed

doc/release_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Release Notes
1010

1111
**Breaking Changes**
1212

13-
* With this release, the package support for python 3.9 was dropped. It now requires python 3.10 or higher.
13+
* With this release, the package support for Python 3.9 was dropped and support for Python 3.10 was officially added.
1414

1515
Version 0.5.5
1616
--------------

linopy/expressions.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -664,15 +664,6 @@ def ndim(self) -> int:
664664
def loc(self) -> LocIndexer:
665665
return LocIndexer(self)
666666

667-
@classmethod # type: ignore
668-
@property
669-
def fill_value(cls) -> dict[str, Any]:
670-
warn(
671-
"The `.fill_value` attribute is deprecated, use linopy.expressions.FILL_VALUE instead.",
672-
DeprecationWarning,
673-
)
674-
return cls._fill_value
675-
676667
@property
677668
def type(self) -> str:
678669
return "LinearExpression"

linopy/variables.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -755,18 +755,6 @@ def range(self) -> tuple[int, int]:
755755
"""
756756
return self.data.attrs["label_range"]
757757

758-
@classmethod # type: ignore
759-
@property
760-
def fill_value(cls) -> dict[str, Any]:
761-
"""
762-
Return the fill value of the variable.
763-
"""
764-
warn(
765-
"The `.fill_value` attribute is deprecated, use linopy.variables.FILL_VALUE instead.",
766-
DeprecationWarning,
767-
)
768-
return cls._fill_value
769-
770758
@property
771759
def mask(self) -> DataArray:
772760
"""

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ classifiers = [
1313
"Programming Language :: Python :: 3.10",
1414
"Programming Language :: Python :: 3.11",
1515
"Programming Language :: Python :: 3.12",
16+
"Programming Language :: Python :: 3.13",
1617
"Development Status :: 3 - Alpha",
1718
"Environment :: Console",
1819
"Intended Audience :: Science/Research",

test/test_linear_expression.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ def test_repr(m: Model) -> None:
147147
def test_fill_value() -> None:
148148
isinstance(LinearExpression._fill_value, dict)
149149

150-
with pytest.warns(DeprecationWarning):
151-
LinearExpression.fill_value
152-
153150

154151
def test_linexpr_with_scalars(m: Model) -> None:
155152
expr = m.linexpr((10, "x"), (1, "y"))

test/test_variable.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ def test_variable_sum_warn_unknown_kwargs(x: linopy.Variable) -> None:
183183
def test_fill_value() -> None:
184184
isinstance(linopy.variables.Variable._fill_value, dict)
185185

186-
with pytest.warns(DeprecationWarning):
187-
linopy.variables.Variable.fill_value
188-
189186

190187
def test_variable_where(x: linopy.Variable) -> None:
191188
x = x.where([True] * 4 + [False] * 6)

0 commit comments

Comments
 (0)