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

Fixed #35090 -- Deprecated registering URL converters with the same name. #17703

Merged
merged 1 commit into from Feb 23, 2024

Conversation

salvo-polizzi
Copy link
Contributor

Ticket 35090

@timgraham timgraham changed the title Fixed #35090 -- Avoid having converters with the same name Fixed #35090 -- Disallowed registering URL converters with the same name. Jan 6, 2024
@adamchainz
Copy link
Sponsor Member

THank you for the work, though the ticket is not accepted yet. I think we should wait to see some input from others to accept it.

One change that your PR will require is using the deprecation policy. We would need to warn at first, and then two versions later we can raise an exception. Read the policy and check out some recent PRs that have deprecated other features.

@salvo-polizzi salvo-polizzi force-pushed the ticket_35090 branch 2 times, most recently from c4a2688 to e82c59b Compare January 10, 2024 10:31
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

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

@salvo-polizzi Thanks 👍 I left comments.

django/urls/exceptions.py Outdated Show resolved Hide resolved
docs/internals/deprecation.txt Outdated Show resolved Hide resolved
docs/releases/5.1.txt Outdated Show resolved Hide resolved
docs/topics/http/urls.txt Outdated Show resolved Hide resolved
tests/urlpatterns/tests.py Outdated Show resolved Hide resolved
tests/urlpatterns/tests.py Outdated Show resolved Hide resolved
django/urls/converters.py Outdated Show resolved Hide resolved
@salvo-polizzi salvo-polizzi force-pushed the ticket_35090 branch 4 times, most recently from e7870c5 to 6b715af Compare February 22, 2024 17:34
Copy link
Sponsor Member

@adamchainz adamchainz left a comment

Choose a reason for hiding this comment

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

Thanks for the continued work. I’ve left some comments on the tests.

django/urls/converters.py Outdated Show resolved Hide resolved
tests/urlpatterns/converters.py Outdated Show resolved Hide resolved
tests/urlpatterns/tests.py Outdated Show resolved Hide resolved
tests/urlpatterns/tests.py Outdated Show resolved Hide resolved
tests/urlpatterns/tests.py Show resolved Hide resolved
tests/urlpatterns/tests.py Outdated Show resolved Hide resolved
tests/urlpatterns/tests.py Outdated Show resolved Hide resolved
tests/urlpatterns/tests.py Outdated Show resolved Hide resolved
tests/urlpatterns/tests.py Outdated Show resolved Hide resolved
@salvo-polizzi
Copy link
Contributor Author

Thanks @adamchainz for review

@felixxm felixxm self-assigned this Feb 23, 2024
Copy link
Sponsor Member

@adamchainz adamchainz left a comment

Choose a reason for hiding this comment

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

Minor formatting adjustment but otherwise LGTM!

docs/releases/5.1.txt Show resolved Hide resolved
docs/internals/deprecation.txt Show resolved Hide resolved
@felixxm felixxm changed the title Fixed #35090 -- Disallowed registering URL converters with the same name. Fixed #35090 -- Deprecated registering URL converters with the same name. Feb 23, 2024
Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

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

@salvo-polizzi Thanks 👍 I pushed final edits 👍

@adamchainz @shangxiao Thanks for reviews.

@felixxm felixxm merged commit 6e1ece7 into django:main Feb 23, 2024
35 checks passed
@salvo-polizzi salvo-polizzi deleted the ticket_35090 branch March 27, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants