Commit Graph

23 Commits

Author SHA1 Message Date
Brian Schubert
951c0b82e8 Update logging.config.fileConfig to accept any Mapping for defaults (#12973) 2024-11-07 13:12:24 -08:00
Brian Schubert
ab8e0e1ca1 Fix return type of logging.config.BaseConfigurator.as_tuple (#12817) 2024-10-15 19:54:48 +01:00
Max Muoto
9a77f6006d Use Final for undocumented constants (#12450) 2024-07-28 12:02:06 +02:00
Sebastian Rittau
53a8193d64 Update typing_extensions imports in stdlib (#11244)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2024-01-05 08:15:19 -08:00
Sebastian Rittau
23604858a6 Remove Python 3.7 branches (#11238) 2024-01-05 11:39:39 +01:00
Sebastian Rittau
3a036b64fc logging: Remove hack obsoleted by PEP 655 (#11078) 2023-11-30 21:48:54 +00:00
Anthony Sottile
53592e421a set root for logging dict config to be non-None (#11077) 2023-11-28 20:21:19 +01: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
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
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
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
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
EXPLOSION
41591f2fcd Use TypedDicts for logging.config.dictConfig (#6193)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-10-27 10:48:51 +03:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +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
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