Anthony Sottile
c1df736a8c
Add _is_text_encoding attribute of CodecInfo (3.4+) ( #10354 )
...
Introduced in https://bugs.python.org/issue19619 . Was meant to be a temporary private API, but no public API has emerged in the years since.
2023-06-23 15:35:33 +01:00
Alex Waygood
21d7f7153b
[alt] typing: accept buffers in IO.write ( #9861 )
...
Co-authored-by: JelleZijlstra <jelle.zijlstra@gmail.com >
2023-03-15 00:42:10 -07:00
Alex Waygood
9ed39d8796
Use typing_extensions.Self in the stdlib ( #9694 )
2023-02-09 09:12:13 +00:00
Alex Waygood
a6919227be
Add several version-dependent default values to parameters in the stdlib ( #9631 )
2023-01-31 01:21:39 +00: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
Adam Orr
0fe3ef28fe
codecs: _buffer_encode returns (bytes, int) ( #9587 )
2023-01-25 20:39:21 +01:00
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Jelle Zijlstra
cff08b674a
isort: Add more to extra_standard_library ( #9098 )
2022-11-04 22:56:40 -07:00
Nikita Sobolev
f972bdfd96
io, codecs: improve bytes handling ( #9059 )
2022-11-02 09:32:06 -07:00
Alex Waygood
4414246a15
Clean up a few Python 2 remnants ( #8452 )
2022-07-31 19:19:18 +01:00
Jelle Zijlstra
9660ee97ee
codecs: add missing function, reflect runtime import * ( #7918 )
2022-05-22 16:06:21 -07:00
Sebastian Rittau
e1bd9c73f0
Use I/O protocols in codecs.pyi ( #7849 )
2022-05-17 15:01:57 +02: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
Alex Waygood
f4ae363b56
stdlib: correct many pos-or-kw arg names in dunder methods ( #7451 )
2022-03-07 16:40:03 +01:00
Alex Waygood
6fc4c14181
Add missing objects in codecs, configparser, and multiprocessing.dummy ( #7360 )
2022-02-22 18:25:27 +01:00
Alex Waygood
199475ef8b
Add codecs.__all__ ( #7294 )
2022-02-19 12:25:25 -08:00
Alex Waygood
f3ad0179f8
Fix return types in codecs ( #7199 )
2022-02-14 14:03:58 +01:00
Shantanu
4d21d5a87d
codecs: allow str to bytes decoding for "hex", fix overloads ( #7118 )
...
Fixes #7115
Co-authored-by: hauntsaninja <>
2022-02-03 14:20:11 -08:00
PabloLION
0ccbc29919
fix: enable encode/decode from/to hex string ( #7115 )
2022-02-02 23:05:16 +01:00
Alex Waygood
33ecb68603
Fix return annotations of several methods that return self at runtime ( #7070 )
2022-01-28 17:37:49 -08:00
Alex Waygood
96c9abb058
Always use _typeshed.Self, where applicable ( #6880 )
...
* Always use `_typeshed.Self`, where applicable
* Revert changes to `google-cloud-ndb` (ambiguous)
* Remove empty line added by script
* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`
* Manually add a few more that the script missed
* Improve `filelock` annotation
Source code here: 79ec7b2826/src/filelock/_api.py (L207)
* Improve `opentracing/scope` annotation
Source code here: 3e1d357a34/opentracing/scope.py (L71)
* Improve `redis/client` stub
Source code here: 15f315a496/redis/client.py (L1217)
* Improve `redis/lock` annotation
Source code here: 15f315a496/redis/lock.py (L155)
* Improve `requests/models` annotation
Source code here: d718e75383/requests/models.py (L653)
2022-01-09 19:16:19 -08:00
Nikita Sobolev
da3292d271
Use Literal type for BOM_* constants in codecs.pyi ( #6873 )
2022-01-09 18:31:15 +01:00
Alex Waygood
a40d79a4e6
Use lowercase type everywhere ( #6853 )
2022-01-08 16:09:29 +01:00
Nikita Sobolev
c4a68faf6c
Use Literal type in codecs ( #6857 )
2022-01-08 12:57:57 +01:00
Alex Waygood
8d5d2520ac
Use PEP 585 syntax wherever possible ( #6717 )
2021-12-28 11:31:43 +01:00
Akuli
08649177f1
Add codecs.BOM* constants ( #6515 )
2021-12-06 17:36:09 +02:00
Akuli
a5bc1e037f
Add mypy error codes to '# type: ignore' comments ( #6379 )
2021-11-26 07:07:56 +01:00
Akuli
994b69ef8f
Use lowercase tuple where possible ( #6170 )
2021-10-14 17:18:19 -07:00
Akuli
ce11072dbe
Big diff: use lower-case list and dict ( #5888 )
2021-08-08 09:26:35 -07:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Anton Grübel
c38171a0b3
Use _typeshed.Self with __enter__ ( #5712 )
2021-06-29 15:19:25 -07:00
Pavel Karateev
038556cb7e
Add codecs.unregister() for Python 3.10 ( #5539 )
2021-05-27 12:33:02 +02:00
Sebastian Rittau
6a9c89e928
Replace 'Text' with 'str' in py3 stdlib ( #5466 )
2021-05-16 07:10:48 -07:00
Akuli
17dcea4a68
Akuli and srittau: Remove Python 2 branches from Python 3 stubs ( #5461 )
...
* run script and do some manual changes (Akuli)
* do the whole thing manually (srittau)
* merge changes (Akuli)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-05-15 15:33:39 +03:00
Sebastian Rittau
45916045c8
Upgrade black to 21.4b0 and reformat ( #5250 )
...
This introduces newlines before decorators.
2021-04-26 13:58:27 +02:00
hatal175
ef9b37ecab
codecs stubtest exceptions ( #5179 )
2021-04-03 22:44:16 -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