Skip to content

Commit cdc1925

Browse files
Use pandas.util.version instead of packaging in tools.py
1 parent 79795be commit cdc1925

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎docs/sphinx/source/whatsnew/v0.16.2.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Bug fixes
2626
(:pull:`2950`)
2727
* Declare ``packaging`` as a dependency, so ``import pvlib`` works on a fresh
2828
install. (:pull:`2941`)
29+
* ``import pvlib`` no longer fails on a fresh install without ``packaging``.
30+
(:pull:`2941`)
2931

3032
Enhancements
3133
~~~~~~~~~~~~

‎pvlib/tools.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import numpy as np
1111
import pandas as pd
12-
from packaging.version import Version
12+
from pandas.util.version import Version
1313
import zoneinfo
1414

1515

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ dependencies = [
1818
'scipy >= 1.9.2',
1919
'h5py',
2020
'tzdata', # ensure all timezones are available in all installs for consistency GH#2795
21-
'packaging',
2221
]
2322
license = "BSD-3-Clause"
2423
classifiers = [
@@ -77,6 +76,7 @@ test = [
7776
'pytest-timeout',
7877
'pytest-rerunfailures',
7978
'pytest-remotedata',
79+
'packaging',
8080
]
8181
all = ["pvlib[test,optional,doc]"]
8282

0 commit comments

Comments
 (0)