| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A datetime object d is aware if d.tzinfo is not None and
d.tzinfo.utcoffset(d) does not return None. If d.tzinfo is None,
or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns None,
d is naive.
This commit ensures that instances with non-None d.tzinfo, but
d.tzinfo.utcoffset(d) returning None are treated as naive.
In addition, C acceleration code will raise TypeError if
d.tzinfo.utcoffset(d) returns an object with the type other than
timedelta.
* Updated the documentation.
Assume that the term "naive" is defined elsewhere and remove the
not entirely correct clarification. Thanks, Tim.
(cherry picked from commit 877b23202b7e7d4f57b58504fd0eb886e8c0b377)
Co-authored-by: Alexander Belopolsky <abalkin@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
If tests are re-run, use "xxx then yyy" result format (ex: "FAILURE
then SUCCESS") to show that some failing tests have been re-run.
Add also test_regrtest.test_rerun_fail() test.
(cherry picked from commit c45fc7673e23f911639d10d3771ffef7be870c7a)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
| |
- bugfix and test for fragile metavar handling in argparse (see
bpo-24089, bpo-14046, bpo-25058, bpo-11874)
- also fixes some incorrect tests that did not make 1-element tuples correctly
(cherry picked from commit 66f02aa32f1e4adb9f24cf186f8c495399d5ce9b)
Co-authored-by: wim glenn <wim.glenn@gmail.com>
|
| |
|
|
| |
(GH-7467) (GH-7507)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-7462) (GH-7483)
* bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462)
Fix "<CoroWrapper ...> was never yielded from" warning in
PyTask_PyFuture_Tests.test_error_in_call_soon() of
test_asyncio.test_tasks.
Close manually the coroutine on error.
(cherry picked from commit 9f04f0df6fdb27190690bda949d213893d14e807)
* Hide a warning in test_asyncio test_cancel_handshake()
SslProtoHandshakeTests.test_cancel_handshake() of
test_asyncio.test_sslproto: hide a traceback about SSL handshake
failure.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Substract one because listdir() opens internally a file
descriptor to list the content of the /proc/self/fd/ directory.
Add test_support.test_fd_count().
Move also MAXFD code before msvcrt.CrtSetReportMode(), to make sure
that the report mode is always restored on failure.
(cherry picked from commit 492d6424a7ca907c8ec1df21e51062e8f3d88e32)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
testModeStrings and testTruncateOnWindows were depended on
a file leaked in other tests.
Also improve cleaning up after tests.
(cherry picked from commit c2745d2d05546d76f655ab450eb23d1af39e0b1c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
(GH-7377). (GH-7431)
(cherry picked from commit 5f48e2644dcfb47f0bbc0fcdc2b103a19bdec288)
|
| |
|
|
|
|
| |
With addCleanup() f.close() was executed after tearDown().
(cherry picked from commit 6592d7fe11477f8f974d2d4a85c3382a1ad05217)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
Raise TypeError instead of SystemError for unsupported operations.
(cherry picked from commit e9e397605789b2a67b67558fbbe756b7b88934f5)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 13f51d9eec569e08475390e2a8f49f4afed1ea06)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
It depended on a global variable set by other tests..
(cherry picked from commit 7cfd8c6a1b53a7dbdea14b6f414f2629dcd130a2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit e36837cb71032ccfa713e75623b314f091dc22bb)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(#7356)
(cherry picked from commit e95dfc5006d19e59c7871faa9973356844ddb3ae)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
| |
|
|
|
|
| |
Separate tests leaked files or were depended on files leaked in other tests.
(cherry picked from commit 027f95c736457f12c5713d9cf5b95ac335e583df)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
Use also support.SOCK_MAX_SIZE, not only support.PIPE_MAX_SIZE, to
get the size for a blocking send into a multiprocessing pipe.
Replace also test.support with support.
|
| |
|
|
| |
* Add support.environment_altered: unused yet
* VSTS: don't run tests with --fail-env-changed
|
| |
|
|
|
| |
* Add a private _block_on_close attribute to ForkingMixIn and
ThreadingMixIn classes of socketserver.
* Use _block_on_close=True in test_socketserver and test_logging
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31234: Add test.support.wait_threads_exit() (GH-3578)
Use _thread.count() to wait until threads exit. The new context
manager prevents the "dangling thread" warning.
(cherry picked from commit ff40ecda73178dfcad24e26240d684356ef20793)
* bpo-31234: Try to fix lock_tests warning (#3557)
Try to fix the "Warning -- threading_cleanup() failed to cleanup 1
threads" warning in test.lock_tests: wait a little bit longer to give
time to the threads to complete.
Warning seen on test_thread and test_importlib.
(cherry picked from commit 096ae3373abac2c8b3a26a3fe33cc8bd4cbccd4e)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31479: Always reset the signal alarm in tests
Use "try: ... finally: signal.signal(0)" pattern to make sure that
tests don't "leak" a pending fatal signal alarm.
* Move two more alarm() calls into the try block
Fix also typo: replace signal.signal(0) with signal.alarm(0)
* Move another signal.alarm() into the try block
(cherry picked from commit 9abee722d448c1c00c7d4e11ce242ec7b13e5c49)
|
| | |
|
| |
|
|
|
|
| |
* Move fd_count() from test.libregrtest.refleak to test.support
* Fix support.fd_count() on Windows: Call CrtSetReportMode() to not
kill the process on invalid file descriptor if Python is compiled
in debug mode.
|
| |
|
| |
* bpo-33717: pythoninfo: add CC --version (GH-7290)
|
| |
|
|
|
|
|
| |
Fix test_ignore() of multiprocessing tests like
test_multiprocessing_forkserver: use support.PIPE_MAX_SIZE to make
sure that send_bytes() blocks.
(cherry picked from commit 5d6c7ed5e340b2311a15f34e968d4bef09c71922)
|
| |
|
|
|
|
| |
Using -w, when failing tests are re-run in verbose mode, display
again the tests results at the end.
(cherry picked from commit c6c05d0e69cd5a7d0205019c29a1236b7bf3f5b9)
|
| |
|
|
| |
Check which readline implementation is used based on the readline
docstring.
|
| |
|
|
| |
(GH-7224)
|
| | |
|
| |
|
|
|
|
|
| |
(#7205)
(cherry picked from commit a9cab433bbf02f3a1de59d14dc8f583181ffe2d5)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
| |
|
| |
[3.6 backport of 989b9e0]
|
| |
|
|
|
| |
(cherry picked from commit fdccfe09f0b10776645fdb04a0783d6864c32b21)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
| |
|
|
|
|
|
|
|
| |
(GH-7149) (#7154)
Fixed bug where calling write_eof() on a _SelectorSocketTransport after
it's already closed raises AttributeError.
(cherry picked from commit 23f587e395e41bd5e116312b036183f42bc4159b)
Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 08c5aca9d13b24b35faf89ebd26fc348ae1731b2)
Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
|
| |
|
|
|
|
|
| |
The failure may be due to the use oF ZFS, a case we already ignore
for Solaris-based systems where ZFS is frequently used.
(cherry picked from commit 09c4a7dee2eb39b515e5f499f184257cdbe9cb42)
Co-authored-by: Ned Deily <nad@python.org>
|
| |
|
|
|
|
| |
runtest_mp.py: call print() with flush=True.
(cherry picked from commit 4f0bc7f7ab6ec23594b0efe11d082f78ae42abed)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The proactor event loop has a race condition when reading with
pausing/resuming. `resume_reading()` unconditionally schedules the read
function to read from the current future. If `resume_reading()` was
called before the previously scheduled done callback fires, this results
in two attempts to get the data from the most recent read and an
assertion failure. This commit tracks whether or not `resume_reading`
needs to reschedule the callback to restart the loop, preventing a
second attempt to read the data..
(cherry picked from commit 4151061855b571bf8a7579daa7875b8e243057b9)
Co-authored-by: CtrlZvi <viz+github@flippedperspective.com>
|
| |
|
|
|
|
|
|
| |
bpo-32374, bpo-33629: Use support.SuppressCrashReport() in
test_bad_traverse() of MultiPhaseExtensionModuleTests to prevent
leaking a core dump file.
(cherry picked from commit 483000e164ec68717d335767b223ae31b4b720cf)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
| |
(cherry picked from commit 2a6d5da)
|
| |
|
|
|
| |
(cherry picked from commit ae00fb1d4f38ea1803b10d798564740adcdad63e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450)
Under particular circumstances _SelectorSocketTransport can try to add a reader
even the transport is already being closed. This can lead to FD leak and
invalid stated of the following connections. Fixed the SelectorSocketTransport
to add the reader only if the trasport is still active..
(cherry picked from commit a84d0b361a26c05c6fadc6640591ec3feee5bfb5)
|
| | |
|
| |
|
|
|
| |
(cherry picked from commit 4cc3eb48e1e8289df5153db1c701cae263a1ef86)
Co-authored-by: Isaiah Peng <isaiah@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-5711) (GH-6795) (GH-6818)
The urllib.robotparser's __str__ representation now includes wildcard
entries and the "Crawl-delay" and "Request-rate" fields.
(cherry picked from commit c3fa1f2b93fa4bf96a8aadc74ee196384cefa31e)
Co-authored-by: Michael Lazar <lazar.michael22@gmail.com>
|
| |
|
|
|
|
|
| |
This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
(cherry picked from commit 5c0d462689e1a69537eaeba6ab94e3ff3524fc31)
Co-authored-by: Anders Kaseorg <andersk@mit.edu>
|
| | |
|
| |
|
|
|
| |
(cherry picked from commit ac9240b9be31d073d1b2e50ce53481ff0fc9ed23)
Co-authored-by: jdemeyer <jdemeyer@cage.ugent.be>
|
| |
|
|
|
|
|
|
| |
locales. (GH-6708) (GH-6714)
(cherry picked from commit cedc9b74202d8c1ae39bca261cbb45d42ed54d45)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-4205)
Previously emitted cover files only when --missing option was used.
(cherry picked from commit 47ab15470d72367694d7758004067313ae022f0e)
Co-authored-by: Michael Selik <mike@selik.org>
|
| |
|
|
|
|
|
| |
html (GH-6442)
(cherry picked from commit 7d68bfa82654ba01d860b8a772ff63bf0bd183ee)
Co-authored-by: sblondon <sblondon@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 70af06cdc4e8fbee0b9d7d46bdc193097d4bc71f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|