Nikita Korolev
7ffb7cef69
SysLogHandler facility could be a string ( #10206 )
...
It is possible to pass syslog facility as string to __init__ too
2023-05-24 19:46:37 -07:00
Alex Waygood
d1bfd08b4b
Allow passing multiprocessing.Queues to QueueListener/QueueHandler ( #10169 )
2023-05-10 17:06:41 +02:00
Tomas R
a7748a9dd1
Add missing stubs for logging.config ( #10055 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2023-04-27 07:57:46 -07:00
Nikita Sobolev
cd3f52ac14
Simplify logging.config type imports ( #10077 )
2023-04-24 14:41:10 +03:00
Amin Alaee
b6564d976b
logging.LogRecord: improve annotation for msg (#9914 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-03-21 15:40:37 +00:00
Alex Waygood
dd2818a41d
Stdlib: add container default values ( #9909 )
2023-03-21 09:12:34 +01:00
Alex Waygood
b0dc6a3405
Add defaults to logging.LoggerAdapter methods ( #9797 )
2023-02-22 11:50:11 +01:00
Alex Waygood
fbc092b4cd
Stdlib: add defaults for several functions that delegate kwargs to other functions at runtime ( #9791 )
2023-02-21 23:31:25 -08:00
Alex Waygood
9ed39d8796
Use typing_extensions.Self in the stdlib ( #9694 )
2023-02-09 09:12:13 +00:00
Alex Waygood
0ef9c3f8e8
Enable flake8-pyi's Y037 ( #9686 )
2023-02-06 19:01:02 -08:00
Alex Waygood
33a62ae42d
Add more defaults to the stdlib ( #9606 )
...
Continuing work towards #8988 .
The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:
- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Kalle Møller
6b23df3db6
Update _FilterType to retuning bool ( #9514 )
2023-01-16 16:12:40 +01:00
Jelle Zijlstra
4d40fc6c8a
logging: StreamHandler.send takes ReadableBuffer ( #9057 )
2022-11-01 11:52:30 +01:00
Nikita Sobolev
380022c650
Remove empty __init__ methods ( #8816 )
2022-09-30 13:08:41 +01:00
Nikita Sobolev
0259068ad6
Remove duplicate definitions in sub-classes ( #8594 )
2022-08-26 17:10:55 +02:00
Alex Waygood
6348a58b8b
Import Match and Pattern from re, not typing ( #8277 )
2022-07-12 15:32:48 +02:00
Alex Waygood
edc0ecd857
Remove Python 3.6 branches from typeshed ( #8269 )
2022-07-11 10:55:17 +02:00
Alex Waygood
1aa5663f9e
Add __setattr__ to logging.LogRecord ( #8064 )
2022-06-12 12:04:22 -07:00
Alex Waygood
e88a182573
Simplify __all__ definitions in modules beginning with 'a' to 'l' ( #8026 )
2022-06-07 15:40:48 +02:00
Alex Waygood
43a9ab08d7
Always use TypeAlias when assigning to Any ( #8021 )
2022-06-05 18:16:20 -07:00
Alex Waygood
acc0167dc1
Fix several new-in-3.11 stubtest errors ( #7973 )
2022-06-02 18:07:38 -07:00
Alex Waygood
171ea08f0d
Add __class_getitem__ to classes in logging and csv ( #7830 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-05-17 14:12:42 +01:00
Jelle Zijlstra
9effb643b3
logging.LoggerAdapter: Use a bound TypeVar ( #7763 )
2022-05-02 08:56:32 +02:00
Alex Waygood
b093c90a94
Use TypeAlias for type aliases where possible, part II ( #7667 )
2022-04-20 20:02:47 +01:00
Alex Waygood
97a74bc1aa
Import from collections.abc wherever possible ( #7635 )
2022-04-18 12:50:37 +02:00
Alex Waygood
740193a8fc
Use TypeAlias where possible for type aliases ( #7630 )
2022-04-15 18:01:00 -07:00
Steven Troxler
2d1d4b982f
logging/handlers.pyi: atTime is datetime.time ( #7566 )
...
It is marked as having type `datetime.datetime` but `atTime`
refers to a time of day; only the fields on `datetime.time`
are used. The [docs](https://docs.python.org/3/library/logging.handlers.html#timedrotatingfilehandler )
clearly state that it is a `time`.
2022-03-30 19:17:36 +01:00
Alex Waygood
1acc8f3bd6
Use PEP 604 syntax wherever possible, part II ( #7514 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-03-19 14:27:35 +00:00
Alex Waygood
3ab250eec8
Use PEP 604 syntax wherever possible ( #7493 )
2022-03-16 16:01:33 +01:00
Jukka Lehtosalo
12f45c5efb
Replace some literal types in logging with int ( #7354 )
...
See #7258 for an extended discussion. In summary, for mypy these
would be better written as follows, but this would not work with
other type checkers:
```
CRITICAL: Final = 50
```
2022-02-22 16:24:10 +01:00
Alex Waygood
3ead05f277
Add __all__ to modules beginning with 'j', 'k' and 'l' ( #7328 )
2022-02-20 15:06:54 -08:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
Jelle Zijlstra
de5ec6a0d1
fix incorrect tuple[T] ( #6996 )
...
Found from PyCQA/flake8-pyi#135 .
2022-01-22 09:37:14 -08:00
Alex Waygood
a40d79a4e6
Use lowercase type everywhere ( #6853 )
2022-01-08 16:09:29 +01:00
Alex Waygood
505ea72641
Never explicitly inherit from object in Python 3-only stubs ( #6777 )
2022-01-02 07:24:48 +01:00
Alex Waygood
8d5d2520ac
Use PEP 585 syntax wherever possible ( #6717 )
2021-12-28 11:31:43 +01:00
Jelle Zijlstra
e3ea71c018
Add comment to LogRecord.message ( #6654 )
2021-12-22 08:49:35 +01:00
DevilXD
c51438e132
Use Literal instead of int for logging levels ( #6610 )
2021-12-20 18:29:04 -08:00
Randolf Scholz
4f9b45ff4c
Logger.getChild subclass compatible typehint ( #6609 )
...
Co-authored-by: Randolf Scholz <rscholz@ismll.de >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2021-12-20 18:11:42 -08:00
Jukka Lehtosalo
8a5d91ca37
Relax signature of logging.config.loadConfig ( #6577 )
...
I did a a cursory investigation using GitHub search and also looked at
a big internal codebase, and a significant fraction of callsites used
a dict type instead of a TypedDict or a dict literal.
It seems that it's a common use case to store the config within an
attribute. For example, something like this:
```
CONFIG = {
...
}
...
logging.config.dictConfig(CONFIG)
```
Another use case that was not properly supported is reading the
config from a file, and the config is given `dict[str, Any]` as
the type.
Mypy can still do some type checking of the argument if called
with a dict literal, so I feel this is a reasonable compromise
between type checking strictness and usability.
2021-12-13 07:31:15 -08:00
Shantanu
d453b74ceb
logging: fix various __init__ methods ( #6417 )
...
Co-authored-by: hauntsaninja <>
2021-11-30 23:18:35 -08:00
Akuli
a5bc1e037f
Add mypy error codes to '# type: ignore' comments ( #6379 )
2021-11-26 07:07:56 +01:00
EXPLOSION
41591f2fcd
Use TypedDicts for logging.config.dictConfig ( #6193 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-10-27 10:48:51 +03:00
Đỗ Quốc Vương
3c58736d01
Change type of backupCount from str to int ( #6128 )
2021-10-07 15:31:53 +02:00
SupImDos
e4c2c0f302
Add SysLogHandler.address attribute ( #6037 )
2021-09-14 13:58:02 +02:00
Sander
7bfdacb4c4
stdlib/logging use object over Any for parameter types ( #6025 )
2021-09-10 16:04:32 +02:00
Oleg Höfling
a74624d31b
Introduce generic logger type in loggeradapter ( #5954 )
2021-08-25 05:45:56 -07:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Henry Schreiner
ae51d5264b
fix: standalone logger functions do not accept arbitrary keywords ( #5862 )
2021-08-06 23:58:24 +02:00