Skip to content

bpo-40275: Use new test.support helper submodules in tests #21450

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

Closed

Conversation

shihai1991
Copy link
Member

@shihai1991 shihai1991 commented Jul 12, 2020

Use test helpers in the following test cases:

  • test_import
  • test_importlib
  • test_inspect
  • test_site
  • test_fixcid
  • test_i18n
  • test_lll
  • test_pathfix
  • test_pindent
  • test_sundry

https://bugs.python.org/issue40275

@shihai1991
Copy link
Member Author

cc @vstinner

from test.support.import_helper import (forget, make_legacy_pyc, unlink,
unload, DirsOnSysPath)
from test.support.os_helper import (TESTFN, rmtree, temp_umask,
TESTFN_UNENCODABLE, temp_dir)
Copy link
Member

Choose a reason for hiding this comment

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

It seems like these changes are already merged into master via the GH-21412: commit 96a6a6d. Maybe rebase your PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, sorry for this terrible rebase operation, I use a new PR to replace it.

ZackerySpytz and others added 17 commits August 4, 2020 12:38
* Add example on lazy imports

* Use four spaces for indentation

* change to console
The phrase "At any time during execution," was repeated twice.

Automerge-Triggered-By: @Mariatta
…or (pythonGH-21474)

#msg373510

[bpo-32528]()/python#13528 changed `asyncio.CancelledError` such that it no longer inherits from `concurrent.futures.CancelledError`. As this affects existing code, specifically when catching the latter instead of the former in exception handling, it should be documented in the "What's new in 3.8?" document.

Automerge-Triggered-By: @1st1
…using recv_into instead of recv (python#21442)

* bpo-41273: Proactor transport read loop to use recv_into

By using recv_into instead of recv we do not allocate a new buffer each
time _loop_reading calls recv.

This betters performance for any stream using proactor (basically any
asyncio stream on windows).

* bpo-41273: Double proactor read transport buffer size

By doubling the read buffer size we get better performance.
Avoid infinite loop when reading specially crafted TAR files using the tarfile module
(CVE-2019-20907).
Move definition of UNUSED from modified headers of libmpdec to
_decimal.c itself. This makes the vendored source closer to the
standalone library and fixes build with --with-system-libmpdec.

Tested to build fine with either system libmpdec or the vendored one.
shihai1991 and others added 6 commits August 4, 2020 12:38
…thonGH-21718)

regrtest_unraisable_hook() temporarily replaces sys.stderr with
sys.__stderr__ to help to display errors when a test captures stderr.
incr cannot be larger than INT_MAX: downcast to int explicitly.
On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@Akuli

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.