Commit Graph

38 Commits

Author SHA1 Message Date
Sebastian Rittau 6387a6f9c1 Remove list return type from _BaseNetwork.hosts (#15047)
Per https://github.com/python/cpython/issues/141497#issuecomment-3546793394

Thanks to serhiy-storchaka for the notification
2025-11-18 02:58:44 -08:00
Dmitriy Vashurin c0fed911d6 Fix ipaddress._BaseNetwork.hosts return type (#14658)
Both `IPv4Network` and `IPv6Network` can return a single-element list instead of iterator.
2025-08-28 17:26:46 +02:00
Jelle Zijlstra f32d9f08bd stdlib: add __slots__ (#14611) 2025-08-21 07:24:59 -07:00
Semyon Moroz 4d62c18261 [ipaddress] Add default value for strict param (#14451) 2025-07-26 05:43:23 +02:00
Semyon Moroz 9bcba82c13 Bump ipaddress to 3.14 (#14024) 2025-05-12 17:08:32 +02:00
Sebastian Rittau 30b16c168d Drop Python 3.8 branches (#13776) 2025-04-03 10:35:36 +02:00
Alex Waygood c193cd2a36 Upgrade Black and Ruff (#13443) 2025-01-29 22:47:58 +00:00
Stephen Morton 17408ee538 fix the __init__ of several C-classes (#13211) 2024-12-23 10:55:51 -08:00
Stephen Morton f9475acbe0 clean up ipaddress allowlist entries (#13079)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-11-24 07:54:12 -08:00
Stephen Morton 1a4631f0d2 Remove fake base class ipaddress._BaseInterface (#12949)
Also make hostmask a property to improve stubtest
2024-11-04 15:59:21 +01:00
Stephen Morton 4b6869d572 remove SupportsInt from bases of ipaddress._BaseAddress (#12765)
added in 2017: https://github.com/python/typeshed/pull/1361

This use case no longer requires the protocol to be an actual base
class.
2024-10-09 20:32:06 -07:00
Max Muoto 0df6028dc8 Use Final for Constant Literals in the stdlib (#12332)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-07-15 18:07:34 +01:00
Amin Alaee 05955c0cb8 json, ipaddress, locale: Python3.13 updates (#12046)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-27 13:12:00 +01: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
Alex Waygood 8023ba764a Remove redundant inheritances from Generic and various typing protocols (#10981) 2023-11-06 14:00:25 +01:00
Alex Waygood 03b4bb9cce Stdlib: add many missing __hash__ and __eq__ methods (#10464) 2023-07-17 14:21:02 +02:00
Alex Waygood 81b8211d0e Revert "Remove un-needed __hash__ methods from stdlib (#8465)" (#10426)
Reverts https://github.com/python/typeshed/pull/8465
Fixes https://github.com/python/typeshed/issues/10424
Closes https://github.com/python/typeshed/pull/10425

https://github.com/python/typeshed/pull/8465 caused regressions: see https://github.com/python/typeshed/issues/10424 and https://github.com/python/mypy/issues/13800. Since it didn't fix any known problems (just some stylistic nits that we had), let's just revert the PR.
2023-07-09 08:43:32 -07:00
Alex Waygood 257e287fec Stdlib: correct many parameter names (#9815) 2023-03-04 09:53:12 +00:00
Alex Waygood 9ed39d8796 Use typing_extensions.Self in the stdlib (#9694) 2023-02-09 09:12:13 +00:00
Jelle Zijlstra ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
Nikita Sobolev 0bd4e3ce1a ip_interface can have tuple arguments (#9195) 2022-11-14 11:02:56 +01:00
Nikita Sobolev 6d5fd0e290 Allow passing tuples to ipaddress.ip_network (#8634) 2022-08-27 18:38:26 +01:00
Nikita Sobolev 64bc0590a6 Remove un-needed __hash__ methods from stdlib (#8465) 2022-08-06 14:55:27 +01:00
Alex Waygood edc0ecd857 Remove Python 3.6 branches from typeshed (#8269) 2022-07-11 10:55:17 +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
Jukka Lehtosalo 04100b9cec Improve signature of overlaps in ipaddress (#7260)
The `overlaps` method returns False if the version is different:

```
import ipaddress as i
v4=i.IPv4Network('10.0.0.0/8')
v6=i.IPv6Network('2001:db8::2000/124')
print(v6.overlaps(v4))  # False
```
2022-02-18 07:36:07 -08:00
Alex Waygood d869f2e5a3 Improve ipaddress dunders (#7244) 2022-02-16 18:55:39 -08:00
Alex Waygood f4967618dd Fix positional-only differences in many stdlib modules (#7226) 2022-02-15 15:14:06 +01:00
Nikita Sobolev 819f8dfc10 Improve ipaddress module (#7129) 2022-02-04 21:19:34 -08:00
Shantanu b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Alex Waygood 45a2dad83c Reduce use of Any in equality methods (#7081)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-30 00:59:00 +02: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: https://github.com/tox-dev/py-filelock/blob/79ec7b2826e33b982fe83b057f359448b9d966ba/src/filelock/_api.py#L207

* Improve `opentracing/scope` annotation

Source code here: https://github.com/opentracing/opentracing-python/blob/3e1d357a348269ef54d67f761302fab93dbfc0f7/opentracing/scope.py#L71

* Improve `redis/client` stub

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/client.py#L1217

* Improve `redis/lock` annotation

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/lock.py#L155

* Improve `requests/models` annotation

Source code here: https://github.com/psf/requests/blob/d718e753834b84018014a23d663369ac27d1ab9c/requests/models.py#L653
2022-01-09 19:16:19 -08:00
Akuli 99f6e022f7 ipaddress: return unions from ip_address, ip_network, ip_interface (#6400) 2021-11-28 08:06:22 -08:00
Alex Waygood f29d2bb72c Add missing scope_id property to IPv6Address (#6399) 2021-11-27 17:02:35 +02:00
Akuli 994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Akuli ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02: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