holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.24k stars 363 forks source link

Remove redundant py2 helper code #1316

Closed alexander-beedie closed 4 months ago

alexander-beedie commented 5 months ago

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).

alexander-beedie commented 4 months ago

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 🤔

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 commented 4 months ago

Thank you for the PR :+1: