Skip to content
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

Upgrade pandas dependency to current version #933

Closed
gunbra32 opened this issue Feb 29, 2024 · 0 comments · Fixed by #934
Closed

Upgrade pandas dependency to current version #933

gunbra32 opened this issue Feb 29, 2024 · 0 comments · Fixed by #934
Assignees
Labels
enhancement New feature or request urgent High external pressure to address this ASAP

Comments

@gunbra32
Copy link
Collaborator

The latest version of xcube 1.4.0. constrains for its environment the pandas version to pandas >=1.3,<2. The latest version of pandas is, however, 2.2.1. As a consequence, an installation into a typical, up-to-date Python data science environment leads to a downgrade of one of its core packages to an outdated major version. Such downgrade may cause source code developed with pandas >2.0 to fail, which is likely unacceptable for most use cases and thus prevent the usage of xcube altogether.

To avoid the above-described downgrade, xcube source code should be adapted to run also with pandas >2.0. There is no alternative solution as compatibility with the latest pandas version is of critical importance for the user uptake of xcube.

This feature is requested by a user who want wants to use xcube in the Jupyter Hub of the Copernicus Data Space Ecosystem (CDSE, https://documentation.dataspace.copernicus.eu/Applications/JupyterHub.html) where pandas is currently installed in version 2.1.4.

@forman forman added enhancement New feature or request urgent High external pressure to address this ASAP labels Mar 1, 2024
pont-us added a commit that referenced this issue Mar 1, 2024
pont-us added a commit that referenced this issue Mar 1, 2024
Partially addresses Issue #933.

test_timecoord.py generated some expected values from date-time string
literals in a non-standard format, which pandas 1.x parsed correctly
but pandas 2.x parses incorrectly. I have changed these literals to
ISO 8601 format and they now parse reliably.
pont-us added a commit that referenced this issue Mar 1, 2024
Some long-deprecated unittest assertion aliases were removed in
Python 3.12. This commit replaces usages of those aliases with
the preferred method names:

assertEquals -> assertEqual
assertRegexpMatches -> assertRegex

Partially addresses #933 (since removing the pandas <2 version pin
means that newly created xcube environments get Python 3.12 instead
of Python 3.11 by default).
pont-us added a commit that referenced this issue Mar 1, 2024
- Change two incorrectly parsed date literals to ISO 8601

- Use 'D' rather than (no longer supported) 'd' to specify days as a
  time unit.

Partially addresses Issue #933.
pont-us added a commit that referenced this issue Mar 1, 2024
Python 3.12 has removed the wstr_length field from its internal
PyCompactUnicodeObject struct, changing the size of string objects,
which broke some tests in test_cache.py due a hard-coded expected
size. This commit make the test calculate the expected size at
runtime instead.

Related to Issue #933.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request urgent High external pressure to address this ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants