Repository navigation
Deprecate parameter names that are: not a Python identifier, or a Python Keyword, or not lower-cased - #3866
Conversation
62cff1d to
3c5be86
Compare
|
What do you think, should we also check |
Ah. That might be a good idea: test drive that check during a long 8.x cycle and see if it show up... If I implement this, what kind of severity should it triggers? A |
|
Deprecation seems fine. Like I said in the other thread, it could be more disruptive, but it also seems to match the intention of the |
3c5be86 to
eb37bea
Compare
eb37bea to
a5af540
Compare
|
Just implemented the double This is ready to be reviewed for eventual merge. |
Click is about to get a similar stack-level inspection utility in pallets/click#3866.
|
@kdeldycke this should merge into main. I don't we should issue new deprecations on bug fix versions. |
Prepares the ground for pallets#3827
a5af540 to
b90faad
Compare
OK make sense. So I retargeted the |
Make `DeprecationWarning` from pallets#3866 into `TypeError`
Make `DeprecationWarning` from pallets#3866 into `TypeError`
Make `DeprecationWarning` from pallets#3866 into `TypeError`
This PR prepares the ground for #3827, which is going to refuse parameter names that are not valid Python identifiers.
This add
DeprecationWarningthat detect whenParameter,ArgumentorOptiongets anamethat will be not allowed in the future 9.0.0 release:str.identifier)keyword.iskeyword)This PR also copy the majority of tests that were originally proposed in #3827, so the behavior of the
nameis locked down and frozen. This will prevent tweaking or introducing regressions during the full 8.x cycle.This PR also inaugurate the 8.6.0 release on
main.Historical details
Of course, I fucked-up the same way I fucked-up 2 months ago with #3701 , when juggling between
mainandstablebranches made me push tostable. 😫So:
stablewith d036881Anyway, this was resolved by resyncing both branches with #3876 .