Skip to content

bpo-45000: Raise SyntaxError when try to delete __debug__ #27947

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

Merged
merged 7 commits into from
Aug 25, 2021

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Aug 25, 2021

https://bugs.python.org/issue45000

Automerge-Triggered-By: GH:pablogsal

@corona10 corona10 requested a review from markshannon as a code owner August 25, 2021 14:14
@corona10 corona10 changed the title bpo-45000: Make deleting __debug__ is forbidden Aug 25, 2021
@corona10 corona10 requested a review from pablogsal August 25, 2021 14:18
@corona10
Copy link
Member Author

0:00:00 load avg: 3.01 Run tests sequentially
0:00:00 load avg: 3.01 [1/1] test_syntax
beginning 6 repetitions
123456
......

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1.5 sec
Tests result: SUCCESS
@corona10 corona10 changed the title bpo-45000: Raise SyntaxError when try to deleting __debug__ Aug 25, 2021
@@ -176,6 +176,8 @@ Other CPython Implementation Changes
support :class:`typing.SupportsComplex` and :class:`typing.SupportsBytes` protocols.
(Contributed by Mark Dickinson and Dong-hee Na in :issue:`24234`.)

* A :exc:`SyntaxError` (instead of a :exc:`NameError`) will be raised when deleting the :const:`__debug__` constant. (Contributed by Dong-hee Na in :issue:`45000`.)
Copy link
Member

Choose a reason for hiding this comment

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

We should backport, so this needs to be moved to the 3.10 document

Copy link
Member

Choose a reason for hiding this comment

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

@corona10 I think you missed this message :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think you missed this message :)

@pablogsal Looks like due to auto-merge label :(

@miss-islington
Copy link
Contributor

@corona10: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 551da59 into python:main Aug 25, 2021
corona10 added a commit to corona10/cpython that referenced this pull request Aug 26, 2021
pablogsal pushed a commit that referenced this pull request Aug 26, 2021
@corona10 corona10 deleted the bpo-45000 branch August 26, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants