Skip to content

Commit 26989cb

Browse files
authored
Merge pull request #57 from aspeddro/numpy-2.0
Support numpy 2.0 and pandas 2.0
2 parents 996a159 + 64132c8 commit 26989cb

File tree

5 files changed

+8
-14
lines changed

5 files changed

+8
-14
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2020

2121
steps:
2222
- uses: actions/checkout@v3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pandavro can handle these primitive types:
3737
| np.bool_ | boolean |
3838
| np.float32 | float |
3939
| np.float64 | double |
40-
| np.unicode_ | string |
40+
| np.str_ | string |
4141
| np.object_ | string |
4242
| np.int8, np.int16, np.int32 | int |
4343
| np.uint8, np.uint16, np.uint32 | "unsigned" int* |

pandavro/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
np.int64: 'long',
2020
np.uint64: {'type': 'long', 'unsigned': True},
2121
np.dtype('O'): 'complex', # FIXME: Don't automatically store objects as strings
22-
np.unicode_: 'string',
22+
np.str_: 'string',
2323
np.float32: 'float',
2424
np.float64: 'double',
2525
np.datetime64: {'type': 'long', 'logicalType': 'timestamp-micros'},

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
install_requires=[
2020
# fixed versions.
2121
'fastavro>=1.5.1,<2.0.0',
22-
'pandas>=1.1',
23-
# https://pandas.pydata.org/pandas-docs/version/1.1/getting_started/install.html#dependencies
24-
'numpy>=1.15.4',
22+
'pandas>=2.0,<3.0.0',
23+
'numpy>=2.0,<3.0.0',
2524
],
2625
extras_require={
2726
'tests': ['pytest==7.3.2', 'tox==4.6.0'],
2827
},
2928
# https://pandas.pydata.org/pandas-docs/version/1.1/getting_started/install.html#python-version-support
30-
python_requires='>=3.7.0',
29+
python_requires='>=3.9.0',
3130
)

tox.ini

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
[tox]
22
envlist =
3-
# pandas 2.0 doesn't support python 3.7
4-
py37-pandas{1}-fastavro{15,16,17,1},
5-
py{38,39,310}-pandas{1,2}-fastavro{15,16,17,18,1},
6-
py{311}-pandas{1,2}-fastavro{17,18,1},
3+
py{39,310}-pandas{2}-fastavro{15,16,17,18,1},
4+
py{311}-pandas{2}-fastavro{17,18,1},
75
py{312}-pandas{2}-fastavro{18,1},
86

97
[gh-actions]
108
python =
11-
3.7: py37
12-
3.8: py38
139
3.9: py39
1410
3.10: py310
1511
3.11: py311
@@ -18,7 +14,6 @@ python =
1814
[testenv]
1915
deps =
2016
pytest
21-
pandas1: pandas >=1.1, <2
2217
pandas2: pandas >=2.0.0, <3.0.0
2318
fastavro15: fastavro >=1.5.1, <1.6.0
2419
fastavro16: fastavro >=1.6.0, <1.7.0

0 commit comments

Comments
 (0)