-
Notifications
You must be signed in to change notification settings - Fork 154
Fix Python 3.9 tests by freezing Pandas at v2.2.3 #990
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
base: main
Are you sure you want to change the base?
Conversation
Makefile
Outdated
# done | ||
|
||
dev-env: | ||
python -m venv .venv$(PYTHON_VERSION_NO_DOTS) |
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.
IIUC, the python version in that environment will be the one used to run that command, which might be different from the one specified in the environment name. Is that an issue?
dev: | ||
python3 -m venv .venv | ||
# Detect Python version from the system | ||
PYTHON_VERSION := $(shell python3 -c 'import sys; print(f"{sys.version_info.major}{sys.version_info.minor}")') |
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.
I was actually going to comment about not fixing the version but you fixed it already :-)
This reverts commit 8f9e7f8.
htmlcov | ||
.python-version |
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.
This is just making sure my usage of pyenv
doesn't accidentally pollute the repo.
@@ -16,6 +16,7 @@ exclude NEXT_CHANGELOG.md | |||
exclude tagging.py | |||
exclude .package.json | |||
exclude .release_metadata.json | |||
exclude requirements-dev-*.txt |
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.
This ensures the requirements files are not unnecessarily bundled in the source wheel file.
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.
It's a shame we cannot add a comment in the manifest to make that clear
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
What changes are proposed in this pull request?
In the 2.3.0 release of
pandas
, there was an issue with the Python 3.9 release causingpd.__version__
to have a different structure than normal (see pandas-dev/pandas#61579 for details). The mocking framework used by the SDK, pyfakefs, implements special mocking for Pandas and requires that the Pandas version have formmajor.minor.patch
. This isn't the case for this release, causing failures during test setup.This PR addresses this by freezing dependencies of the Python SDK for testing.
make dev
will now install the frozen dev dependencies.make dev-latest
will install the latest version, simply runningpip install ".[dev]"
. The lock file can be updated manually by runningmake update-dev-dep-lockfile
. For Python 3.9, we pin tests to use pandas version 2.2.3, as the latest version interacts poorly with pyfakefs.Additionally, unit tests will now run against both the frozen and latest dependencies. Failures will only be blocking on frozen dependencies; the unfrozen dependencies will serve as an early warning system that something has broken that we may need to look into.
The
Makefile
contains additional information about how tests are run and how to update therequirements-dev-*.txt
files for each Python version.How is this tested?
N/A.
NO_CHANGELOG=true