diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index acd3e881d6..32dec287e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,8 +30,8 @@ dependencies installed with `snowflake-connector-python` installed as an editabl Setting up a development environment is super easy with this [one simple tox command](https://tox.wiki/en/latest/example/devenv.html). ```shell -tox --devenv venv37 -e py37 -. venv37/bin/activate +tox --devenv venv39 -e py39 +. venv39/bin/activate ``` Note: we suggest using the lowest supported Python version for development. diff --git a/src/snowflake/connector/pandas_tools.py b/src/snowflake/connector/pandas_tools.py index d89e48bcce..3e7ee9730b 100644 --- a/src/snowflake/connector/pandas_tools.py +++ b/src/snowflake/connector/pandas_tools.py @@ -398,7 +398,7 @@ def write_pandas( # use_logical_type should be True when dataframe contains datetimes with timezone. # https://github.com/snowflakedb/snowflake-connector-python/issues/1687 if not use_logical_type and any( - [pandas.api.types.is_datetime64tz_dtype(df[c]) for c in df.columns] + [isinstance(df[c], pandas.DatetimeTZDtype) for c in df.columns] ): warnings.warn( "Dataframe contains a datetime with timezone column, but " diff --git a/test/README.md b/test/README.md index 280fd41d50..d01cc41dc3 100644 --- a/test/README.md +++ b/test/README.md @@ -21,7 +21,7 @@ We use `tox` version 4 to run test suites and other utilities. To run the most important tests, execute: ```shell -tox -e "fix_lint,py37{,-pandas,-sso}" +tox -e "fix_lint,py39{,-pandas,-sso}" ``` **NOTE** Some integration tests may be sensitive to the cloud provider of the @@ -37,10 +37,10 @@ is made. ### Running a single test -Enter the tox environment you want (e.g. `py38`) and run `pytest` from there: +Enter the tox environment you want (e.g. `py39`) and run `pytest` from there: ```shell -. .tox/py38/bin/activate +. .tox/py39/bin/activate pytest -v test/integ/test_connection.py::test_basic ``` @@ -55,7 +55,7 @@ either does the same as providing both of them. ## Test categories Chaining these categories is possible, but isn't encouraged. Note: running multiple categories in one `tox` run should be done like: -`tox -e "fix_lint,py37-{,-sso},coverage"` +`tox -e "fix_lint,py39-{,-sso},coverage"` * **pandas**: Tests specifically testing our optional dependency group "pandas". * **sso**: Tests specifically testing our optional dependency group "sso". diff --git a/test/extras/README.md b/test/extras/README.md index c8830c9c3b..2f3754e8d1 100644 --- a/test/extras/README.md +++ b/test/extras/README.md @@ -5,5 +5,5 @@ These are tests that test weird edge cases when we need a standalone Python environment and process. -Run only these tests with `tox`, for example: `tox -e py38-extras` from the +Run only these tests with `tox`, for example: `tox -e py39-extras` from the top directory.