summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-107237: Fix test_udp_reconnection() of test_logging (GH-107238) ↵Miss Islington (bot)2023-07-251-4/+4
| | | | | | | | | | | | | | (#107242) gh-107237: Fix test_udp_reconnection() of test_logging (GH-107238) test_logging: Fix test_udp_reconnection() by increasing the timeout from 100 ms to 5 minutes (LONG_TIMEOUT). Replace also blocking wait() with wait(LONG_TIMEOUT) in test_output() to prevent the test to hang. (cherry picked from commit ed082383272c2c238e364e9cc83229234aee23cc) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-103606: raise RuntimeError if config file is invalid or empty (#104701)Prince Roshan2023-05-201-2/+2
| | | (this adjusts new code) raise RuntimeError if provided config file is invalid or empty, not ValueError.
* gh-103606: Improve error message from logging.config.FileConfig (GH-103628)Prince Roshan2023-05-181-0/+36
|
* gh-103357: Add logging.Formatter defaults support to logging.config ↵Bar Harel2023-04-121-1/+107
| | | | fileConfig and dictConfig (GH-103359)
* gh-102799: use sys.exception() instead of sys.exc_info() in tests (#103293)Irit Katriel2023-04-061-2/+1
|
* gh-84559: Remove the new multiprocessing warning, too disruptive. (#101551)Gregory P. Smith2023-02-031-3/+2
| | | | This reverts the core of #100618 while leaving relevant documentation improvements and minor refactorings in place.
* GH-84559: Deprecate fork being the multiprocessing default. (#100618)Gregory P. Smith2023-02-021-2/+3
| | | | | | | | This starts the process. Users who don't specify their own start method and use the default on platforms where it is 'fork' will see a DeprecationWarning upon multiprocessing.Pool() construction or upon multiprocessing.Process.start() or concurrent.futures.ProcessPool use. See the related issue and documentation within this change for details.
* gh-72719: Remove asyncore and asynchat modules (#96580)Nikita Sobolev2022-11-081-3/+1
| | | | | Remove modules asyncore and asynchat, which were deprecated by PEP 594. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-90195: Unset logger disabled flag when configuring it. (GH-96530)Vinay Sajip2022-09-031-0/+29
|
* gh-89258: Add a getChildren() method to logging.Logger. (GH-96444)Vinay Sajip2022-08-311-0/+14
| | | Co-authored-by: Éric <merwok@netwok.org>
* gh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340)Vinay Sajip2022-08-271-0/+8
|
* gh-95804: Respect MemoryHandler.flushOnClose in logging shutdown. (GH-95857)David Bonner2022-08-101-0/+29
|
* gh-93243: Make smtpd private before porting its users (GH-93246)Oleg Iarygin2022-08-061-1/+2
| | | | | | | gh-93243 This PR is required to reduce diffs of the following porting (no need to either maintain documentation and tests consistent with each porting step, or try to port everything and remove smtpd in a single PR). Automerge-Triggered-By: GH:warsaw
* bpo-46755: Don't log stack info twice in QueueHandler (GH-31355)Erik Montnemery2022-07-051-1/+3
|
* gh-93761: Fix test_logging test_config_queue_handler() race condition (#93952)Victor Stinner2022-06-191-0/+3
| | | Fix a race condition in test_config_queue_handler() of test_logging.
* gh-93852: Add test.support.create_unix_domain_name() (#93914)Victor Stinner2022-06-171-21/+6
| | | | | | | | | | | | | | | test_asyncio, test_logging, test_socket and test_socketserver now create AF_UNIX domains in the current directory to no longer fail with OSError("AF_UNIX path too long") if the temporary directory (the TMPDIR environment variable) is too long. Modify the following tests to use create_unix_domain_name(): * test_asyncio * test_logging * test_socket * test_socketserver test_asyncio.utils: remove unused time import.
* test_logging: Fix BytesWarning in SysLogHandlerTest (GH-93920)Victor Stinner2022-06-171-1/+1
|
* Call busy_retry() and sleeping_retry() with error=True (#93871)Victor Stinner2022-06-161-3/+2
| | | | Tests no longer call busy_retry() and sleeping_retry() with error=False: raise an exception if the loop times out.
* Use support.sleeping_retry() and support.busy_retry() (#93848)Victor Stinner2022-06-151-6/+7
| | | | | | * Replace time.sleep(0.010) with sleeping_retry() to use an exponential sleep. * support.wait_process(): reuse sleeping_retry(). * _test_eintr: remove unused variables.
* gh-93761: Fix test to avoid simple delay when synchronizing. (GH-93779)Vinay Sajip2022-06-141-3/+5
|
* gh-92592: Allow logging filters to return a LogRecord. (GH-92591)Adrian Garcia Badaracco2022-06-071-0/+45
|
* gh-93162: test_config_queue_handler requires threading (GH-93572)Christian Heimes2022-06-071-0/+1
|
* gh-93162: Add ability to configure QueueHandler/QueueListener together ↵Vinay Sajip2022-06-071-19/+127
| | | | | | | (GH-93269) Also, provide getHandlerByName() and getHandlerNames() APIs. Closes #93162.
* gh-84461: Skip new async logging tests on Emscripten (GH-93427)Christian Heimes2022-06-021-0/+3
|
* gh-91513: Tidied up a test and did minor refactoring around test filename ↵Vinay Sajip2022-05-261-23/+25
| | | | gener… (GH-93265)
* gh-91513: Add 'asyncio' taskName to logging LogRecord attributes. (GH-93193)jackh-ncl2022-05-261-4/+62
|
* gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)Christian Heimes2022-05-191-0/+2
|
* bpo-45046: Support context managers in unittest (GH-28045)Serhiy Storchaka2022-05-081-3/+1
| | | | | | Add methods enterContext() and enterClassContext() in TestCase. Add method enterAsyncContext() in IsolatedAsyncioTestCase. Add function enterModuleContext().
* gh-92169: Use warnings_helper.import_deprecated() to import deprecated ↵Hugo van Kemenade2022-05-031-4/+4
| | | | modules uniformly in tests (GH-92170)
* bpo-40280: Detect missing threading on WASM platforms (GH-32352)Christian Heimes2022-04-071-0/+10
| | | Co-authored-by: Brett Cannon <brett@python.org>
* bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139)Jouke Witteveen2022-03-271-3/+0
|
* bpo-45171: Fix stacklevel handling in logging. (GH-28287)Jouke Witteveen2022-03-271-1/+12
|
* bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)Christian Heimes2022-03-221-0/+12
| | | | | | | | | | | - Add requires_fork and requires_subprocess to more tests - Skip extension import tests if dlopen is not available - Don't assume that _testcapi is a shared extension - Skip a lot of socket tests that don't work on Emscripten - Skip mmap tests, mmap emulation is incomplete - venv does not work yet - Cannot get libc from executable The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
* bpo-40280: Skip more tests on Emscripten (GH-31947)Christian Heimes2022-03-171-1/+2
| | | | | | - lchmod, lchown are not fully implemented - skip umask tests - cannot fstat unlinked or renamed files yet - ignore musl libc issues that affect Emscripten
* bpo-41906: Accept built filters in dictConfig (GH-30756)Mario Corchero2022-01-241-0/+38
| | | | | | | When configuring the logging stack, accept already built filters (or just callables) in the filters array of loggers and handlers. This facilitates passing quick callables as filters. Automerge-Triggered-By: GH:vsajip
* bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)Irit Katriel2022-01-181-2/+2
|
* bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103)Vinay Sajip2021-12-141-1/+2
|
* bpo-46063: Improve algorithm for computing which rolled-over log file… ↵Vinay Sajip2021-12-141-2/+50
| | | | (GH-30093)
* Revert "bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)" ↵Victor Stinner2021-12-071-2/+5
| | | | | (GH-29951) This reverts commit 9bf2cbc4c498812e14f20d86acb61c53928a5a57.
* bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)Victor Stinner2021-11-151-5/+2
| | | | | | | | | | | | | | | | Remove the asyncore and asynchat modules, deprecated in Python 3.6: use the asyncio module instead. Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd module can be used instead, it is based on asyncio. * Remove asyncore, asynchat and smtpd documentation * Remove test_asyncore, test_asynchat and test_smtpd * Rename Lib/asynchat.py to Lib/test/support/_asynchat.py * Rename Lib/asyncore.py to Lib/test/support/_asyncore.py * Rename Lib/smtpd.py to Lib/test/support/_smtpd.py * Remove DeprecationWarning from private _asyncore, _asynchat and _smtpd modules * _smtpd: remove deprecated properties
* bpo-45401: Fix a resource warning in test_logging (GH-28864)Serhiy Storchaka2021-10-111-0/+1
|
* bpo-45401: Change shouldRollover() methods to only rollover regular f… ↵Vinay Sajip2021-10-101-0/+15
| | | | | | | (GH-28822) …iles. Also changed some historical return values from 1 -> True and 0 -> False.
* bpo-45128: fixes `test_multiprocessing_fork` mysterious crash (GH-28387)Nikita Sobolev2021-09-191-3/+4
|
* bpo-45229: Remove test_main in many tests (GH-28405)Serhiy Storchaka2021-09-191-20/+6
| | | | | | | | | Instead of explicitly enumerate test classes for run_unittest() use the unittest ability to discover tests. This also makes these tests discoverable and runnable with unittest. load_tests() can be used for dynamic generating tests and adding doctests. setUpModule(), tearDownModule() and addModuleCleanup() can be used for running code before and after all module tests.
* bpo-44291: Fix reconnection in logging.handlers.SysLogHandler (GH-26490)Kirill Pinchuk2021-08-051-0/+8
|
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-261-1/+1
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-42378: fixed log truncation on logging shutdown (GH-27310)andrei kulakov2021-07-251-4/+14
| | | Automerge-Triggered-By: GH:vsajip
* bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in ↵Irit Katriel2021-06-241-2/+5
| | | | tests (GH-26905)
* bpo-43858: Add logging.getLevelNamesMapping() (GH-26459)andrei kulakov2021-06-031-0/+8
| | | Added a function that returns a copy of a dict of logging levels.
* bpo-43651: Fix test_logging (GH-25715)Inada Naoki2021-04-291-2/+1
|