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

Dep warnings for dict mapping #296

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Conversation

richardjgowers
Copy link
Contributor

smoothes over a change made in PR #260

@pep8speaks
Copy link

pep8speaks commented Mar 13, 2024

Hello @richardjgowers! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 180:80: E501 line too long (104 > 79 characters)

Line 336:80: E501 line too long (97 > 79 characters)

Line 127:80: E501 line too long (90 > 79 characters)
Line 129:80: E501 line too long (80 > 79 characters)
Line 136:80: E501 line too long (82 > 79 characters)

Line 28:80: E501 line too long (111 > 79 characters)

Comment last updated at 2024-03-13 11:28:55 UTC

pr #260 changed the signature of Transformation.__init__ and Protocol.create to take mapping as list (or singular) rather than dict.

This adds an implicit conversion with deprecation warning

this should smooth over old scripts which still use a dict
@richardjgowers richardjgowers force-pushed the dep_warnings_for_dict_mapping branch from e15d6fb to 2d6db93 Compare March 13, 2024 11:28
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.94%. Comparing base (4527364) to head (2d6db93).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #296   +/-   ##
=======================================
  Coverage   98.93%   98.94%           
=======================================
  Files          36       36           
  Lines        1978     1986    +8     
=======================================
+ Hits         1957     1965    +8     
  Misses         21       21           

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

Copy link
Contributor

@mikemhenry mikemhenry left a comment

Choose a reason for hiding this comment

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

LGTM! Do we want to add something about backwards compatibility being removed in version 1.x or 2.x? If we are not sure then we can leave it vague like this and add the version where we drop it later

@richardjgowers
Copy link
Contributor Author

@mikemhenry Yeah I wasn't sure when we'd ever have to remove these lines. It's not that bad to keep in the shim for all of 1.x. If/when we find a reason this can't stay we can add a deprecation removal date in the message

@richardjgowers richardjgowers merged commit 29f98ec into main Mar 13, 2024
10 checks passed
@richardjgowers richardjgowers deleted the dep_warnings_for_dict_mapping branch March 13, 2024 15:05
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