Skip to content

CI: unpin lxml and update mypy #693

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

Merged
merged 2 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.4.0
hooks:
- id: pyupgrade
types_or: [python, pyi]
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ python = ">=3.8"
types-pytz = ">= 2022.1.1"

[tool.poetry.dev-dependencies]
mypy = "1.2.0"
mypy = "1.3.0"
pandas = "2.0.1"
Copy link
Member Author

@twoertwein twoertwein May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved pinned dependecies to the top

pyarrow = ">=10.0.1"
pytest = ">=7.1.2"
pyright = ">= 1.1.306"
poethepoet = ">=0.16.5"
loguru = ">=0.6.0"
pandas = "2.0.1"
numpy = ">=1.24.3"
typing-extensions = ">=4.4.0"
matplotlib = ">=3.5.1"
Expand All @@ -50,15 +50,15 @@ black = ">=23.3.0"
isort = ">=5.12.0"
openpyxl = ">=3.0.10"
tables = { version = ">=3.7.0" , python = "<4"} # 3.8.0 depends on blosc2 which caps python to <4
lxml = { version = ">=4.7.1,<4.9.0", python = "<3.11" }
lxml = ">=4.9.1"
pyreadstat = ">=1.2.0"
xlrd = ">=2.0.1"
xlsxwriter = ">=3.0.3"
pyxlsb = ">=1.0.10"
odfpy = ">=1.4.1"
xarray = ">=22.6.0"
tabulate = ">=0.8.10"
jinja2 = "^3.1"
jinja2 = ">=3.1"
scipy = ">=1.9.1"
SQLAlchemy = ">=2.0.12"
types-python-dateutil = ">=2.8.19"
Expand Down
6 changes: 0 additions & 6 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
)
import os
import platform
import sys
from typing import (
TYPE_CHECKING,
Final,
Expand All @@ -23,11 +22,6 @@
WINDOWS = os.name == "nt" or "cygwin" in platform.system().lower()
PD_LTE_20 = Version(pd.__version__) < Version("2.0.999")

lxml_skip = pytest.mark.skipif(
sys.version_info >= (3, 11), reason="lxml is not available for 3.11 yet"
)
# This is only needed temporarily due to no wheels being available for lxml on 3.11


def check(actual: T, klass: type, dtype: type | None = None, attr: str = "left") -> T:
if not isinstance(actual, klass):
Expand Down
6 changes: 0 additions & 6 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
from pandas.io.sas.sas_xport import XportReader
from pandas.io.stata import StataReader

from . import lxml_skip

DF = DataFrame({"a": [1, 2, 3], "b": [0.0, 0.0, 0.0]})
CWD = os.path.split(os.path.abspath(__file__))[0]

Expand Down Expand Up @@ -112,7 +110,6 @@ def test_orc_bytes():
check(assert_type(DF.to_orc(index=False), bytes), bytes)


@lxml_skip
def test_xml():
with ensure_clean() as path:
check(assert_type(DF.to_xml(path), None), type(None))
Expand All @@ -121,7 +118,6 @@ def test_xml():
check(assert_type(read_xml(f), DataFrame), DataFrame)


@lxml_skip
def test_xml_str():
with ensure_clean() as path:
check(assert_type(DF.to_xml(), str), str)
Expand Down Expand Up @@ -1170,7 +1166,6 @@ def test_read_sql_query_generator():
con.close()


@lxml_skip
def test_read_html():
check(assert_type(DF.to_html(), str), str)
with ensure_clean() as path:
Expand Down Expand Up @@ -1376,7 +1371,6 @@ def test_all_read_without_lxml_dtype_backend() -> None:
co1.close()


@lxml_skip
def test_read_with_lxml_dtype_backend() -> None:
with ensure_clean() as path:
check(assert_type(DF.to_html(path), None), type(None))
Expand Down