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 support for transform arguments without partial in decorators #5046

Merged
merged 5 commits into from
Jan 12, 2024

Conversation

timmysilv
Copy link
Contributor

Context:
We used to advise users to pass transforms additional arguments positionally in transforms being used as decorators. Now, it's forbidden (they need to use functools.partial). It has been deprecated for 2 releases, so it's time to remove it.

Description of the Change:
Raise a TransformError if someone uses the old transform decorator syntax

Benefits:
Less support for old style of doing things, helps us keep our code cleaner

Possible Drawbacks:
It felt intuitive for me to turn the warning into an explicit error, but usually we just remove code outright when doing removals. This constructor doesn't have an intuitive way of just removing this functionality, so I feel like raises an error explicitly makes sense

[sc-51278]

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c01cb4b) 99.67% compared to head (0e20592) 99.66%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5046      +/-   ##
==========================================
- Coverage   99.67%   99.66%   -0.01%     
==========================================
  Files         394      394              
  Lines       35670    35396     -274     
==========================================
- Hits        35554    35279     -275     
- Misses        116      117       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@rmoyard rmoyard left a comment

Choose a reason for hiding this comment

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

Thanks 💯

Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Thanks @timmysilv!

doc/development/deprecations.rst Outdated Show resolved Hide resolved
@timmysilv timmysilv enabled auto-merge (squash) January 12, 2024 15:33
@timmysilv timmysilv merged commit 7291e44 into master Jan 12, 2024
35 checks passed
@timmysilv timmysilv deleted the remove-transform-decorator branch January 12, 2024 15:50
mudit2812 pushed a commit that referenced this pull request Jan 19, 2024
…5046)

**Context:**
We used to advise users to pass transforms additional arguments
positionally in transforms being used as decorators. Now, it's forbidden
(they need to use `functools.partial`). It has been deprecated for 2
releases, so it's time to remove it.

**Description of the Change:**
Raise a `TransformError` if someone uses the old transform decorator
syntax

**Benefits:**
Less support for old style of doing things, helps us keep our code
cleaner

**Possible Drawbacks:**
It felt intuitive for me to turn the warning into an explicit error, but
usually we just remove code outright when doing removals. This
constructor doesn't have an intuitive way of just removing this
functionality, so I feel like raises an error explicitly makes sense

[sc-51278]
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.

3 participants