Skip to content

Commit

Permalink
drop python 3.8, support 3.12 and 3.13 (#218)
Browse files Browse the repository at this point in the history
drop python 3.8, support 3.12 and 3.13, and other dependency version bumps
  • Loading branch information
yehoshuadimarsky authored Dec 2, 2024
1 parent c2a7dab commit 95ca726
Show file tree
Hide file tree
Showing 6 changed files with 736 additions and 476 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
uv-resolution-strategy: ["highest", "lowest-direct"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
uv-resolution-strategy: ["lowest-direct", "highest"]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ Azure versions.
See the
[pyodbc docs](https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-SQL-Server-from-Windows)
for more on different driver versions.
- Python >= 3.8
- `pandas` >= 1.5
- Python >= 3.9
- `pandas` >= 2.1.2
- `sqlalchemy` >= 1.4
- `pyodbc` as the
[supported DBAPI](https://docs.sqlalchemy.org/en/13/dialects/mssql.html#module-sqlalchemy.dialects.mssql.pyodbc)
Expand Down
2 changes: 1 addition & 1 deletion bcpandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from bcpandas.main import SqlCreds, to_sql
from bcpandas.utils import bcp

__version__ = "2.6.6"
__version__ = "2.7.0"

# BCP check
try:
Expand Down
27 changes: 15 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: SQL",
]
description = "High-level wrapper around BCP for high performance data transfers between pandas and SQL Server. No knowledge of BCP required!!"
Expand All @@ -25,13 +26,14 @@ urls = { repository = "https://github.com/yehoshuadimarsky/bcpandas" }
dynamic = ["version"]
dependencies = [
# per https://github.com/apache/airflow/pull/40272 and https://github.com/numpy/numpy/issues/26710
"pandas >=2.2; python_version >=\"3.12\"",
"pandas >=2.1.2, <2.2; python_version >=\"3.9\" and python_version <=\"3.11\"",
"pandas >=1.5.3, <2.2; python_version <\"3.9\"",
"pyodbc >=5",
"sqlalchemy >=1.4",
"pandas[sql-other] >=2.2; python_version >='3.12'",
"pandas[sql-other] >=2.1.2, <2.2; python_version >='3.9' and python_version <='3.11'",
"pyodbc >=5.2; python_version >='3.13'",
"pyodbc >=5; python_version <='3.12'",
"sqlalchemy >=1.4; python_version <='3.12'",
"sqlalchemy >=2.0.31; python_version >='3.13'",
]
requires-python = ">=3.8.1,<=3.11"
requires-python = ">=3.9,<=3.13"

[tool.setuptools.dynamic]
version = {attr = "bcpandas.__version__"}
Expand All @@ -46,10 +48,11 @@ dev = [
test = [
"codetiming >=1",
"docker >=6",
"hypothesis >=6",
"hypothesis >=6.110",
"ipython >=8.10.0",
"matplotlib >=3.7",
"pytest >=7",
"matplotlib >=3.9.2",
"pytest >=7; python_version >='3.9' and python_version <='3.12'",
"pytest >=8; python_version >='3.13'",
"pytest-cov >=4",
"requests >=2",
]
Expand All @@ -68,7 +71,7 @@ build-backend = "setuptools.build_meta"
exclude = ["build"]
line-length = 99

target-version = "py38"
target-version = "py39"

[tool.ruff.lint]
ignore = ["E501"]
Expand All @@ -90,7 +93,7 @@ keep-runtime-typing = true
[tool.mypy]
ignore_missing_imports = true
pretty = true
python_version = "3.8"
python_version = "3.9"
show_error_codes = true

[tool.pytest.ini_options]
Expand Down
8 changes: 4 additions & 4 deletions tests/test_to_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_tosql_full_bcp_path(bcp_path, sql_creds):
pd.DataFrame(
{
"col1": ["a", "b", "c", "d"],
"col2": [1, np.NaN, 3, np.NaN],
"col2": [1, np.nan, 3, np.nan],
"col3": [1.5, 2.5, 3.5, 4.5],
}
),
Expand All @@ -137,7 +137,7 @@ def test_tosql_full_bcp_path(bcp_path, sql_creds):
{
"col1": ["a", "b", "c", "d"],
"col2": [1, 2, 3, 4],
"col3": [1.5, np.NaN, 3.5, np.NaN],
"col3": [1.5, np.nan, 3.5, np.nan],
}
),
id="nan_last_col",
Expand Down Expand Up @@ -740,7 +740,7 @@ def test_no_dtype(self):
{
"COLUMN_NAME": ["col1", "col2", "col3", "col4", "col5"],
"DATA_TYPE": ["bigint", "float", "varchar", "date", "bit"],
"CHARACTER_MAXIMUM_LENGTH": [np.NaN, np.NaN, -1.0, np.NaN, np.NaN],
"CHARACTER_MAXIMUM_LENGTH": [np.nan, np.nan, -1.0, np.nan, np.nan],
}
)
assert_frame_equal(expected, actual)
Expand Down Expand Up @@ -778,7 +778,7 @@ def test_with_dtype(self):
{
"COLUMN_NAME": ["col1", "col2", "col3", "col4", "col5"],
"DATA_TYPE": ["int", "float", "nvarchar", "date", "bit"],
"CHARACTER_MAXIMUM_LENGTH": [np.NaN, np.NaN, 10.0, np.NaN, np.NaN],
"CHARACTER_MAXIMUM_LENGTH": [np.nan, np.nan, 10.0, np.nan, np.nan],
}
)
assert_frame_equal(expected, actual)
Expand Down
Loading

0 comments on commit 95ca726

Please sign in to comment.