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

Remove redundant py2 helper code #1316

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

alexander-beedie
Copy link
Contributor

@alexander-beedie alexander-beedie commented Feb 6, 2024

Some long-unnecessary py2 → py3 int and str helper stubs were lurking in the codebase.

These can be removed to clean things up a bit (with the minor/bonus side-effect of making all the isinstance checks that referenced them ~1.5-2x faster, as the helper stubs were both single-element tuples).

Copy link
Member

@hoxbro hoxbro left a comment

Choose a reason for hiding this comment

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

Thank you!

We vendored datashape this fall as it failed to install with Python 3.12, as it hadn't been updated for some time... That does not mean we should have Python 2 code in it.

I haven't set over the test because #1314 is needed for them to pass. I will set them over when the PR is merged.

datashader/datashape/predicates.py Outdated Show resolved Hide resolved
datashader/datashape/coretypes.py Outdated Show resolved Hide resolved
Co-authored-by: Simon Høxbro Hansen <[email protected]>
@alexander-beedie
Copy link
Contributor Author

alexander-beedie commented Feb 7, 2024

We vendored datashape this fall as it failed to install with Python 3.12, as it hadn't been updated for some time... That does not mean we should have Python 2 code in it.

Makes sense! I was starting to very gently poke around to see what it might take to get first-class Polars integration, and just happened to spot this 🤔

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (077e95c) 85.64% compared to head (2290bb6) 85.63%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1316      +/-   ##
==========================================
- Coverage   85.64%   85.63%   -0.01%     
==========================================
  Files          52       51       -1     
  Lines       11291    11286       -5     
==========================================
- Hits         9670     9665       -5     
  Misses       1621     1621              

@hoxbro
Copy link
Member

hoxbro commented Feb 13, 2024

Thank you for the PR 👍

@hoxbro hoxbro merged commit 09da5a0 into holoviz:main Feb 13, 2024
14 checks passed
@alexander-beedie alexander-beedie deleted the redundant-py2-code branch May 22, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants