Commit Graph

25 Commits

Author SHA1 Message Date
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
Henry Schreiner
4965e95f84 fix: arbitrary keyword arguments are not accepted in logging functions (#5849)
While the implementation uses `**kwargs`, this is just forwarded to `_log()`, which accepts a fixed set of arguments.
2021-08-06 10:59:43 +02:00
Luis Marsano
c6b78354e6 stdlib logging: specify style type as literal choice (#5716)
documented for style parameter: https://docs.python.org/3/library/logging.html#logging.Formatter
2021-06-30 14:50:21 -07:00
kasium
2c97c3cab9 Flag LogRecord.args as optional (#5714)
Resolves #5710
2021-06-30 14:51:32 +02:00
Sebastian Rittau
dd441645ad Make logging.StreamHandler generic over stream (#5681)
Closes #5680
2021-06-23 17:03:18 +03:00
Sebastian Rittau
3ec061022a Improve logging.StreamHandler and FileHandler (#5663)
* Use PEP 604, instead of Optional.
* Override FileHandler.stream and setStream to require a TextIOWrapper
  instead of a SupportsWrite object.
* FileHandler._open() now returns a TextIOWrapper instead of IO. Using
  anything but a file opened in text mode would not work.
2021-06-21 22:50:49 +02:00
joooeey
3072046430 Add Python 3.9 support in logging.basicConfig (#5639) 2021-06-15 11:33:38 +02:00
Aymeric Augustin
dd229f80be Support wrapping LoggerAdapter in LoggerAdapter (#5562)
Fixes #5561
2021-06-01 10:06:34 +02:00
Sebastian Rittau
6ee67483a3 Rework socket (#5545)
* Extract _socket.pyi from socket.pyi.
* Extract _socket.socket from socket.socket.
* Fix socket.family annotation.
* Annotate SocketIO properly.
* SocketType is an alias of _socket.socket.
* Sort items in socket.pyi in the same order as in socket.py.
* Remove socket.EINTR.
* Use _typeshed.WriteableBuffer instead of custom alias.
* Add errorTab (Windows only).
* Add _socket.dup().
* Mark positional-only argments.
* Remove constructors from socket exceptions.
* socket.timeout is an alias for TimeoutError, starting with Python 3.10.
* Use PEP 604 in changed lines.
* Add alias for fileno arguments.
* getaddrinfo() port can be bytes.
* Explicitly override some SSLSocket methods.
* Allow ReadableBuffer in _CMSG arguments.
2021-05-30 20:17:33 +02:00
Sebastian Rittau
f0bf6eebbd AnyStr cleanup (#5487)
* Replace all uses of StrPath, BytesPath, and AnyPath in Python 2 stubs.
* Add StrOrBytesPath as preferred alias for AnyPath.
* Replace all remaining AnyPath instances with StrOrBytesPath.
* Mark AnyPath as obsolete.

Part of #5470
2021-05-17 20:45:48 +02:00
spaghEddieDoyle
4c72f7f268 Add some missing logging features (#5388) 2021-05-11 10:52:40 +02:00
Sebastian Rittau
4ac3ccad45 black: enable skip_magic_trailing_comma (#5252)
* black: enable skip_magic_trailing_comma

* Remove spurious commas
2021-04-27 08:32:32 -07:00
hatal175
a98e3e3ff9 Replace some type with Type[] (#5254)
* Replace some type with Type[]

* Change aggregate_class to be Callable
2021-04-26 07:31:16 -07:00
dod-wdwilcox
059ab3868f add stubs for Manager, Logger.root, Logger.manager (#5160)
* add stubs for Manager, Logger.root, Logger.manager
2021-03-31 20:58:51 +03:00
Sebastian Rittau
5f52e38fdd Use SupportsWrite instead of IO (#5069) 2021-03-22 19:46:45 -07:00
Sebastian Rittau
0cea325bc7 Modernize logging (#5068) 2021-03-22 19:26:43 -07:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00