-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(🎁) Support Python 3.11 #398
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import sys | ||
from typing import Any | ||
|
||
import pyarrow as pa | ||
|
||
from pandas.core.dtypes.base import StorageExtensionDtype | ||
|
||
if sys.version_info < (3, 11): | ||
import pyarrow as pa | ||
else: | ||
pa: Any | ||
|
||
class ArrowDtype(StorageExtensionDtype): | ||
pyarrow_dtype: pa.DataType | ||
def __init__(self, pyarrow_dtype: pa.DataType) -> None: ... |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,15 @@ | |
from pandas._libs.tslibs import NaTType | ||
from pandas._typing import Scalar | ||
|
||
|
||
from tests import ( | ||
TYPE_CHECKING_INVALID_USAGE, | ||
check, | ||
importskip | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this import is failing. |
||
) | ||
|
||
pyarrow_skip = pytest.mark.skip | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be pyarrow_skip = pytest.mark.skipif(sys.version_info >= (3, 11), "pyarrow is not available for 3.11 yet")
"""This is only needed temporarily due to no wheels being available for arrow on 3.11""" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Appears to be not needed. |
||
|
||
|
||
def test_types_to_datetime() -> None: | ||
df = pd.DataFrame({"year": [2015, 2016], "month": [2, 3], "day": [4, 5]}) | ||
|
@@ -461,9 +465,8 @@ def test_crosstab() -> None: | |
) | ||
|
||
|
||
@pyarrow_skip | ||
def test_arrow_dtype() -> None: | ||
pytest.importorskip("pyarrow") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These is there for a reason to protect Windows. I think it should stay. |
||
|
||
import pyarrow as pa | ||
|
||
check( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong reason in the explanation here. Should be lxml not arrow.