Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-29271: Fix Task.current_task and Task.all_tasks to accept None. #406

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 4 commits into from
Mar 3, 2017

Conversation

1st1
Copy link
Member

@1st1 1st1 commented Mar 2, 2017

See http://bugs.python.org/issue29271 for context. LGTM'ed by @methane

@mention-bot
Copy link

@1st1, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Haypo, @methane and @serhiy-storchaka to be potential reviewers.

Misc/NEWS Outdated
@@ -688,6 +688,9 @@ Library
- Issue #24142: Reading a corrupt config file left configparser in an
invalid state. Original patch by Florian Höch.

- Issue #29271: Fix Task.current_task and Task.all_tasks to accept
Copy link
Member

Choose a reason for hiding this comment

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

Move the entry to the start of the section. Mention that this fixes C implementation, makes it conforming to Python implementation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Aren't we usually appending news items instead of prepending?

# See http://bugs.python.org/issue29271 for details:
asyncio.set_event_loop(loop)
try:
self.assertTrue(Task.current_task(None) is task)
Copy link
Member

Choose a reason for hiding this comment

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

Why not use assertIs()?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch

Misc/NEWS Outdated
@@ -256,6 +256,9 @@ Extension Modules
Library
-------

- Issue #29271: Fix Task.current_task and Task.all_tasks implemented in C
Copy link
Member

Choose a reason for hiding this comment

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

Now Misc/NEWS entries should be prefixed by "bpo-XXXXX" rather of "Issue #XXXXX".

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Mar 2, 2017 via email

@1st1
Copy link
Member Author

1st1 commented Mar 2, 2017

Thank you for helping out Serhiy. It's my first PRs to the new GH repo so I'm getting accustomed to some new practices.

@1st1
Copy link
Member Author

1st1 commented Mar 2, 2017

@serhiy-storchaka BTW, to backport this to 3.6, do I need to create a new PR? Or I can just cherry-pick and push?

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Mar 2, 2017 via email

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.

5 participants