◐ Shell
reader mode source ↗
Skip to content

bpo-37759: Significant edits to Whatsnew 3.8#15127

Merged
rhettinger merged 13 commits into
python:masterfrom
rhettinger:better_whatsnew
Aug 5, 2019
Merged

bpo-37759: Significant edits to Whatsnew 3.8#15127
rhettinger merged 13 commits into
python:masterfrom
rhettinger:better_whatsnew

Conversation

@rhettinger

@rhettinger rhettinger commented Aug 5, 2019

Copy link
Copy Markdown
Contributor

Work in progress. Please add suggestions here as you find them.

https://bugs.python.org/issue37759

@rhettinger rhettinger added docs Documentation in the Doc dir needs backport to 3.8 labels Aug 5, 2019
@rhettinger rhettinger changed the title Better whatsnew Aug 5, 2019

@ericvsmith ericvsmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

This looks great to me. Thanks for your work on this, Raymond!

@tirkarthi

Copy link
Copy Markdown
Member

With respect to unittest module. It now has the ability to collect async functions where before 3.8 tests have to be a normal function that could have an async definition inside and uses asyncio.run or loop to run it. This was not mentioned in whatsnew. Maybe a good addition given it improves testing asyncio code. Relevant commit : 4dd3e3f

import asyncio
import unittest

from unittest.async_case import IsolatedAsyncioTestCase

class FooTest(IsolatedAsyncioTestCase):

    async def asyncSetUp(self):
        print("Async Setup")

    async def test_sleep(self):
        await asyncio.sleep(1)
        self.assertEqual(1, 1)

    async def asyncTearDown(self):
        print("Async Teardown")

if __name__ == "__main__":
    unittest.main()
./python.exe /tmp/foo.py
Async Setup
Async Teardown
.
----------------------------------------------------------------------
Ran 1 test in 1.028s

OK

Thanks for improving the changelog examples.

@rhettinger

Copy link
Copy Markdown
Contributor Author

tirkarthi , thanks for the suggestions. I'll add the unittest example to the next round of updates (I'm making multiple PRs to minimize merge conflicts).

@rhettinger rhettinger merged commit 4f9ffc9 into python:master Aug 5, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 5, 2019
(cherry picked from commit 4f9ffc9)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@bedevere-bot

Copy link
Copy Markdown

GH-15139 is a backport of this pull request to the 3.8 branch.

rhettinger added a commit that referenced this pull request Aug 5, 2019
…15139)

(cherry picked from commit 4f9ffc9)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants