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

feat!: deprecate string behavior classes #2528

Merged
merged 7 commits into from
Jun 24, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Jun 16, 2023

As discussed in #2432, we don't appear to use these behavior classes anywhere. This PR deprecates them, and removes them from the global behavior dictionary.

This PR doesn't remove the behavior classes for byte and char, because these are used, including for == overloads.

  • Deprecate string and bytestring behavior classes

@agoose77 agoose77 marked this pull request as draft June 16, 2023 12:01
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #2528 (2ffa297) into main (f818083) will increase coverage by 0.03%.
The diff coverage is 87.20%.

Additional details and impacted files
Impacted Files Coverage Δ
src/awkward/_util.py 90.00% <ø> (-1.08%) ⬇️
src/awkward/behaviors/string.py 74.49% <42.85%> (-1.90%) ⬇️
src/awkward/_operators.py 94.82% <94.82%> (ø)
src/awkward/_connect/numexpr.py 90.41% <100.00%> (+0.13%) ⬆️
src/awkward/_connect/numpy.py 94.53% <100.00%> (+0.03%) ⬆️
src/awkward/_connect/pyarrow.py 91.22% <100.00%> (+0.01%) ⬆️
src/awkward/_nplikes/numpy.py 65.45% <100.00%> (ø)
src/awkward/_nplikes/typetracer.py 76.65% <100.00%> (+0.37%) ⬆️
src/awkward/highlevel.py 76.82% <100.00%> (ø)
src/awkward/numba.py 97.01% <100.00%> (+0.02%) ⬆️

@agoose77 agoose77 marked this pull request as ready for review June 20, 2023 11:26
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

This is good. It removes all dependence on StringBehavior and ByteStringBehavior, making them essentially dead code, apart from the fact that they're a public API. It would be very weird for someone to be using these classes downstream, now that they're not a functional part of Awkward Array anymore, but deprecating, rather than deleting, is the right thing to do.

Let's merge this so that it gets into 2.3.0 on July 1. I've already added it to the list of deprecations.

@agoose77 agoose77 merged commit a50db5a into main Jun 24, 2023
@agoose77 agoose77 deleted the agoose77/feat!-deprecate-string-behavior-classes branch June 24, 2023 07:30
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