Semyon Moroz
ba6dbf4573
[urllib] Deprecate addinfourl methods ( #15291 )
2026-01-16 08:41:35 +01:00
Semyon Moroz
c96d8dd7f9
[urllib] Deprecate cafile, capath, cadefault parameters ( #15260 )
2026-01-11 23:31:33 +01:00
Edgar Ramírez Mondragón
2618e150d0
[stdlib] Add a comment to the alias for the return type of urllib.request.urlopen ( #15042 )
2025-11-18 08:22:05 +01:00
Jelle Zijlstra
f32d9f08bd
stdlib: add __slots__ ( #14611 )
2025-08-21 07:24:59 -07:00
Semyon Moroz
85a787bba3
[stdlib] Mark constants as Final ( #14577 )
2025-08-15 13:19:03 +02:00
Semyon Moroz
fb0940e6c1
[stdlib] Deprecate old functions ( #14553 )
...
* [stdlib] Deprecate many functions
* Fix typo
* Imporove message for asyncio/trsock
* Apply suggestions from code review
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
* Add Python before version
* [pre-commit.ci] auto fixes from pre-commit.com hooks
* Wrap comment lines
* fix the rest
---------
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-10 22:27:35 +01:00
Brian Schubert
622df68c1c
Add @type_check_only to stub-only private classes in stdlib ( #14512 )
2025-08-03 10:13:16 +02:00
Semyon Moroz
b532f6be86
Add attributes to urllib errors ( #14332 )
2025-07-07 14:13:54 +02:00
Semyon Moroz
fc1ee8fed9
Bump urllib.request to 3.14 ( #14062 )
2025-05-14 12:21:46 +02:00
Sebastian Rittau
de317e1c74
Simplify and fix urllib.parse.urlencode() ( #13815 )
...
Remove overloads and type vars. Introduce a protocol for the
`quote_via` argument. This means that the interface accepted by the
supplied `quote_via` is stricter, and is not dependent on the actual
supplied types in the `query` argument, but must work with all
possible query types.
2025-04-14 11:11:06 +02:00
Sebastian Rittau
30b16c168d
Drop Python 3.8 branches ( #13776 )
2025-04-03 10:35:36 +02:00
Avasam
4b253d2932
Enable Ruff flake8-todos (TD) ( #13748 )
2025-04-03 07:43:54 +02:00
Sam Bull
c03f07abfb
Add urllib.request.getproxies_environment() ( #12524 )
2024-08-13 14:13:03 -07:00
sobolevn
6f248dfa37
Bump mypy to 1.11.1 ( #12463 )
2024-08-04 23:19:28 -07:00
Shantanu
d9cf43c4c3
Mark pos-only __class_getitem__ args ( #11970 )
2024-05-18 23:27:51 +02:00
Shantanu
4c6f295007
urllib.request: remove params from urlopen for py313 ( #11933 )
2024-05-17 23:54:05 +02:00
Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -08: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
Stephen Morton
1600850258
fix inheritance for urllib.response.addbase ( #11152 )
2023-12-12 13:03:37 +01:00
Alex Waygood
83964a4dc5
stdlib: add many missing __del__ methods ( #11042 )
2023-11-18 11:32:12 -08:00
Jelle Zijlstra
3229b36644
stdlib: More pos-only parameters to Protocols ( #10987 )
2023-11-06 23:45:12 +01:00
Alex Waygood
a570fb6ced
Fix various stubtest complaints on Python 3.12 ( #10691 )
2023-09-10 14:54:43 -07:00
Jisuk Byun
60a95da159
Fix unsound return type hints in urllib module ( #10470 )
...
* Fix unsound return type hints in urllib module
Closes #10466
* Fix return type of ftplib.FTP.ntransfercmd
Related to #10466
2023-07-18 17:46:28 +01:00
Alex Waygood
88a9e900b6
Improve urlunsplit and urlunparse ( #9991 )
2023-04-02 11:52:09 +01:00
Alex Waygood
dd2818a41d
Stdlib: add container default values ( #9909 )
2023-03-21 09:12:34 +01:00
Alex Waygood
bc847a9b07
Use generic NamedTuples to clean up urllib.parse ( #9773 )
2023-02-20 16:41:49 -08:00
Max Murin
5ebf892d07
Allow urlparse and urlsplit of bytes URLs ( #9746 )
2023-02-17 21:52:49 +01:00
Alex Waygood
9ed39d8796
Use typing_extensions.Self in the stdlib ( #9694 )
2023-02-09 09:12:13 +00:00
Nikita Sobolev
f7cb7f33b2
Use OSError instead of IOError ( #9683 )
2023-02-06 18:56:32 +00:00
Nikita Sobolev
c96079f0df
urllib.HTTPError.headers is a settable property (#9682 )
2023-02-06 18:56:08 +00:00
Jelle Zijlstra
5b24c7bb41
stdlib: Run stubdefaulter on Linux for 3.9 ( #9663 )
2023-02-03 00:39:22 +00:00
Alex Waygood
c54a1a9e16
urllib.parse: Fix issues with TypeVar usage and default values (#9629 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2023-01-31 02:21:50 +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
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Jelle Zijlstra
d2829ecdf7
urllib.parse.urlencode: encoding and errors can be None ( #9506 )
...
The runtime defaults are None. Found in #9501 .
2023-01-11 18:55:38 -08:00
Jelle Zijlstra
d2da97d99c
urllib: improve bytes handling ( #9167 )
2022-11-22 16:38:28 -08:00
Nikita Sobolev
0baadae0c9
urllib.parse: improve bytes handling ( #9103 )
2022-11-10 20:47:57 -08:00
Nikita Sobolev
a74acc8225
urllib.response: improve bytes handling ( #9142 )
2022-11-09 18:21:13 -08:00
Anton Grübel
ccd468fd86
urllib.parse: extend unquote type hint and replace _Str with str | bytes ( #8877 )
2022-10-13 20:54:07 -07:00
Nikita Sobolev
0259068ad6
Remove duplicate definitions in sub-classes ( #8594 )
2022-08-26 17:10:55 +02:00
Alex Waygood
553700e355
Move some protocol definitions closer to their usage sites ( #8436 )
2022-07-29 06:26:27 -07:00
Alex Waygood
540a6b25bf
Improve urllib.parse.urldefrag ( #8204 )
...
Fixes #2477
2022-07-19 07:05:09 -07:00
Alex Waygood
6348a58b8b
Import Match and Pattern from re, not typing ( #8277 )
2022-07-12 15:32:48 +02:00
Alex Waygood
8b3b6bf7cd
stdlib: Audit Callable[<parameters>, None] annotations ( #8187 )
2022-06-27 08:08:28 +02:00
Eric Werner
ec64372348
re-export HTTPError in urllib.request ( #8146 )
...
See cpython/#94204
2022-06-24 16:37:09 +02:00
Jelle Zijlstra
3dcfbf3745
urllib.request: add code 308 handler for 3.11 ( #7917 )
...
https://github.com/python/cpython/commit/c379bc5ec9012cf66424ef3d80612cf13ec51006
2022-05-21 14:13:17 -07:00
Alex Waygood
e9526faf40
Various py311 removals ( #7836 )
2022-05-16 17:28:13 -07:00
Rebecca Chen
46fc7768c4
Add missing 'headers' property to urllib.error.HTTPError. ( #7783 )
...
Seen here: https://docs.python.org/3/library/urllib.error.html#urllib.error.HTTPError.headers
2022-05-05 14:05:51 -07:00
Alex Waygood
97a74bc1aa
Import from collections.abc wherever possible ( #7635 )
2022-04-18 12:50:37 +02:00