python3: merge python3-email into python3-urllib
authorAlexandru Ardelean <redacted>
Thu, 2 Apr 2026 16:16:31 +0000 (19:16 +0300)
committerAlexandru Ardelean <redacted>
Sat, 4 Apr 2026 15:27:26 +0000 (18:27 +0300)
As we're seeing in various test.sh scrip runs, importing 'email' fails
with not finding 'urllib' and vice-versa.

Then via a7e96ec91 ("python3-email: add python3-urllib as dependency")
I created a circular dependency.
So, might as well merge the two packages into one (named python3-urllib)
and updates all dependencies to pull python3-urllib.

Signed-off-by: Alexandru Ardelean <redacted>
21 files changed:
lang/python/README.md
lang/python/python-babel/Makefile
lang/python/python-cryptography/Makefile
lang/python/python-eventlet/Makefile
lang/python/python-flit-core/Makefile
lang/python/python-gmpy2/Makefile
lang/python/python-gnupg/Makefile
lang/python/python-hatchling/Makefile
lang/python/python-installer/Makefile
lang/python/python-packaging/Makefile
lang/python/python-pygments/Makefile
lang/python/python-referencing/Makefile
lang/python/python-tabulate/Makefile
lang/python/python-wheel/Makefile
lang/python/python3-find-stdlib-depends.sh
lang/python/python3/Makefile
lang/python/python3/files/python3-package-email.mk [deleted file]
lang/python/python3/files/python3-package-urllib.mk
multimedia/yt-dlp/Makefile
net/fail2ban/Makefile
utils/borgbackup/Makefile

index 2a05d3c00a5df348440001239548a70e06cc491b..a6b057c96692d096665f9ab2384b6b33a16020f1 100644 (file)
@@ -109,7 +109,7 @@ By default, automatic Python byte-code generation is disabled when running a Pyt
 The basis of all these packages is:
 * [lang/python/python3](./python3) - The Python 3.x.y interpreter
 
-This is a normal OpenWrt package, which will build the Python interpreter. This also provides `python3-pip` & `python3-setuptools`. Each Python package is actually split into multiple sub-packages [e.g. python3-email, python3-sqlite3, etc]. This can be viewed inside [lang/python/python3/files](./python3/files).
+This is a normal OpenWrt package, which will build the Python interpreter. This also provides `python3-pip` & `python3-setuptools`. Each Python package is actually split into multiple sub-packages [e.g. python3-urllib, python3-sqlite3, etc]. This can be viewed inside [lang/python/python3/files](./python3/files).
 
 The reason for this splitting, is purely to offer a way for some people to package Python in as-minimal-as-possible-and-still-runable way, and also to be somewhat maintainable when packaging. A standard Python installation can take ~20-30 MBs of disk, which can be somewhat big for some people, so there is the `python3-base` package which brings that down to ~5 MBs. This seems to be good enough (and interesting) for a number of people.
 
index 404818aa044b99879b389db5e39bba292857d175..7f53b272bd22c6322b012d6534722f774b75713b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-babel
 PKG_VERSION:=2.17.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PYPI_NAME:=babel
 PKG_HASH:=0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d
@@ -40,7 +40,7 @@ define Package/python3-babel
   URL:=https://babel.pocoo.org/
   DEPENDS:= \
     +python3-decimal \
-    +python3-email \
+    +python3-urllib \
     +python3-light \
     +python3-logging \
     +python3-urllib
index 59fbc6c30726d9ea9c928324ec38a7d595b4ef7c..0816b93ca5b7ba3b7cbef8926c25aa861bda2b80 100644 (file)
@@ -35,7 +35,6 @@ define Package/python3-cryptography
       +libopenssl \
       +libopenssl-legacy \
       +python3-light \
-      +python3-email \
       +python3-urllib \
       +python3-cffi \
       $(RUST_ARCH_DEPENDS)
index f4d45fee0b6d68c1bb3e9f9c1940bc7db0855661..e5534363de4bdbee9e58c86e5dfd8b6f82e57831 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-eventlet
 PKG_VERSION:=0.40.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=eventlet
 PKG_HASH:=69bef712b1be18b4930df6f0c495d2a882bf7b63aa111e7b6eeff461cfcaf26f
@@ -39,7 +39,7 @@ define Package/python3-eventlet
        +python3-light \
        +python3-dns \
        +python3-greenlet \
-       +python3-email \
+       +python3-urllib \
        +python3-logging \
        +python3-openssl
 endef
index 55d3e27d79afe3c0ada33155da0d463c63740392..a4566b522d509f8f380c68d0cc5155020dc1621e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-flit-core
 PKG_VERSION:=3.12.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=flit-core
 PYPI_SOURCE_NAME:=flit_core
@@ -34,7 +34,7 @@ define Package/python3-flit-core
   SUBMENU:=Python
   TITLE:=Distribution-building parts of Flit
   URL:=https://github.com/pypa/flit
-  DEPENDS:=+python3-light +python3-email +python3-logging
+  DEPENDS:=+python3-light +python3-urllib +python3-logging
   BUILDONLY:=1
 endef
 
index 312a928e99487db0edba2333d3916ca99eb589f2..099f55572b6f83c7cecbaad0d828f4f31861386d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-gmpy2
 PKG_VERSION:=2.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=gmpy2
 PKG_HASH:=2d943cc9051fcd6b15b2a09369e2f7e18c526bc04c210782e4da61b62495eb4a
@@ -32,7 +32,7 @@ define Package/python3-gmpy2
   SUBMENU:=Python
   TITLE:=GMP/MPIR, MPFR, and MPC interface
   URL:=https://github.com/aleaxit/gmpy
-  DEPENDS:=+libgmp +libmpc +libmpfr +python3-light +python3-email
+  DEPENDS:=+libgmp +libmpc +libmpfr +python3-light +python3-urllib
 endef
 
 define Package/python3-gmpy2/description
index f741e7eeb0db158d5238c5672af4f38fe58961fa..8518f829e9783638f9db3b98ece898326b5e5e1d 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-gnupg
 PKG_VERSION:=0.5.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=python-gnupg
 PKG_SOURCE:=python_gnupg-$(PKG_VERSION).tar.gz
@@ -30,7 +30,7 @@ define Package/python3-gnupg
   SUBMENU:=Python
   TITLE:=A wrapper for GnuPG
   URL:=https://github.com/vsajip/python-gnupg
-  DEPENDS:=+python3-light +python3-logging +python3-email
+  DEPENDS:=+python3-light +python3-logging +python3-urllib
 endef
 
 define Package/python3-gnupg/description
index f310d77660a6c6251f567fa4f4d640763721848c..ef0f098d9086d7869767ed29914a6ae83f47616e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-hatchling
 PKG_VERSION:=1.29.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=hatchling
 PKG_HASH:=793c31816d952cee405b83488ce001c719f325d9cda69f1fc4cd750527640ea6
@@ -44,7 +44,7 @@ define Package/python3-hatchling
   URL:=https://hatch.pypa.io/latest/
   DEPENDS:= \
       +python3-light \
-      +python3-email \
+      +python3-urllib \
       +python3-editables \
       +python3-packaging \
       +python3-pathspec \
index 91b5d608ccd720114c8e255f7484af57dc857f21..bab8f63ddc581898b02388804b70798e01ea76ef 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-installer
 PKG_VERSION:=0.7.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PYPI_NAME:=installer
 PKG_HASH:=a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631
@@ -35,7 +35,7 @@ define Package/python3-installer
   SUBMENU:=Python
   TITLE:=A library for installing Python wheels
   URL:=https://github.com/pypa/installer
-  DEPENDS:=+python3-light +python3-email
+  DEPENDS:=+python3-light +python3-urllib
   BUILDONLY:=1
 endef
 
index 332acc078bf9a92cabea0550066a3843658d608d..ffd4f3458d31f5f76f91776198d96cc535b2dbea 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-packaging
 PKG_VERSION:=26.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=packaging
 PKG_HASH:=00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4
@@ -32,7 +32,7 @@ define Package/python3-packaging
   SUBMENU:=Python
   TITLE:=Core utilities for Python packages
   URL:=https://github.com/pypa/packaging
-  DEPENDS:=+python3-light +python3-email +python3-logging
+  DEPENDS:=+python3-light +python3-urllib +python3-logging
 endef
 
 define Package/python3-packaging/description
index fde008a9de0a57d59b92dbb3d529499f341b14a2..1217189c712607d48bccc6a8a8130d65865591a3 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pygments
 PKG_VERSION:=2.20.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pygments
 PKG_HASH:=6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f
@@ -27,7 +27,7 @@ define Package/python3-pygments
   SUBMENU:=Python
   TITLE:=Pygments syntax highlighter
   URL:=https://pygments.org/
-  DEPENDS:=+python3-light +python3-email
+  DEPENDS:=+python3-light +python3-urllib
 endef
 
 define Package/python3-pygments/description
index 4e18f5ef82e0a260a2f69f5a79da2d47cd12092e..8690e1ad4a0d01777cbc7a1514b2b949ed8e2ca5 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-referencing
 PKG_VERSION:=0.37.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=referencing
 PKG_HASH:=44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8
@@ -32,7 +32,7 @@ define Package/python3-referencing
   URL:=https://github.com/python-jsonschema/referencing
   DEPENDS:= \
     +python3-light \
-    +python3-email \
+    +python3-urllib \
     +python3-attrs \
     +python3-rpds-py
 endef
index 907397962d37134f019cc140472852fcd01efa05..ee05aa8ccf81b7e820f102ac8bcf5a10329528db 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-tabulate
 PKG_VERSION:=0.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=tabulate
 PKG_HASH:=e2cfde8f79420f6deeffdeda9aaec3b6bc5abce947655d17ac662b126e48a60d
@@ -35,7 +35,7 @@ define Package/python3-tabulate
   SUBMENU:=Python
   TITLE:=Pretty-print tabular data
   URL:=https://pypi.org/project/tabulate
-  DEPENDS:=+python3-light +python3-email
+  DEPENDS:=+python3-light +python3-urllib
 endef
 
 define Package/python3-tabulate/description
index b432a12a67476f9d7fb81711e203e43e38b0e0e5..08cf1f5045cbe53cff4e626a16505d9316212e84 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-wheel
 PKG_VERSION:=0.45.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=wheel
 PKG_HASH:=661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729
@@ -34,7 +34,7 @@ define Package/python3-wheel
   SUBMENU:=Python
   TITLE:=A built-package format for Python
   URL:=https://github.com/pypa/wheel
-  DEPENDS:=+python3-light +python3-email +python3-logging +python3-setuptools
+  DEPENDS:=+python3-light +python3-urllib +python3-logging +python3-setuptools
   BUILDONLY:=1
 endef
 
index c402d2308e9d17ae26d5f6f2a359bb917436c0e8..66c33add869d1845da378398ba028c4ce762ec05 100644 (file)
@@ -17,7 +17,6 @@ python3-ctypes: ctypes
 python3-dbm: dbm dbm.dumb dbm.gnu dbm.ndbm
 python3-decimal: decimal
 python3-distutils: distutils
-python3-email: email
 python3-logging: logging
 python3-lzma: lzma
 python3-multiprocessing: multiprocessing
@@ -27,7 +26,7 @@ python3-pydoc: doctest pydoc
 python3-readline: readline
 python3-sqlite3: sqlite3
 python3-unittest: unittest
-python3-urllib: urllib
+python3-urllib: urllib email
 python3-uuid: uuid
 python3-xml: xml xmlrpc
 "
index a227335b29973af70985c2ddd88a7013a9b0a687..c44b27dc7bd840febe5f5b8c34f93b5560f72116 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 include ../python3-version.mk
 
 PKG_NAME:=python3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
diff --git a/lang/python/python3/files/python3-package-email.mk b/lang/python/python3/files/python3-package-email.mk
deleted file mode 100644 (file)
index dfb34bd..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python3-email
-$(call Package/python3/Default)
-  TITLE+= email module
-  DEPENDS:=+python3-light +python3-urllib
-endef
-
-define Package/python3-email/description
-$(call Package/python3/Default/description)
-
-This package contains the email module.
-endef
-
-$(eval $(call Py3BasePackage,python3-email, \
-       /usr/lib/python$(PYTHON3_VERSION)/email \
-))
index e84e589debd3870edc211a8930292fee8cc92f93..fa4c150d6e3193b536b5f329f22076f10ea12f45 100644 (file)
@@ -8,7 +8,7 @@
 define Package/python3-urllib
 $(call Package/python3/Default)
   TITLE+= URL handling modules
-  DEPENDS:=+python3-light +python3-email
+  DEPENDS:=+python3-light
 endef
 
 define Package/python3-urllib/description
@@ -18,5 +18,6 @@ This package contains the URL handling modules.
 endef
 
 $(eval $(call Py3BasePackage,python3-urllib, \
+       /usr/lib/python$(PYTHON3_VERSION)/email \
        /usr/lib/python$(PYTHON3_VERSION)/urllib \
 ))
index bdbe5cfd732d7594f15d8940910d14448eb5e598..09d9b101e4f728216d66d662277b7915bb1f527a 100644 (file)
@@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yt-dlp
 PKG_VERSION:=2026.3.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=yt-dlp
 PKG_HASH:=ba7aa31d533f1ffccfe70e421596d7ca8ff0bf1398dc6bb658b7d9dec057d2c9
@@ -32,7 +32,6 @@ define Package/yt-dlp
     +python3-asyncio \
     +python3-codecs \
     +python3-ctypes \
-    +python3-email \
     +python3-logging \
     +python3-openssl \
     +python3-sqlite3 \
index 8af89b25426afbc657ef6732f2009268206bd625..3bee34296e6f44826b06a977a9c28a032b6056ae 100644 (file)
@@ -34,7 +34,6 @@ define Package/fail2ban
   +nftables \
   +python3-light \
   +python3-ctypes \
-  +python3-email \
   +python3-logging \
   +python3-sqlite3 \
   +python3-urllib
index 27efeb6bab430c57ac18d2df41f9a10105ea80d6..9c362157dd3b02b367b630e00d60ba8bc438bf34 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=borgbackup
 PKG_VERSION:=1.4.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=borgbackup
 PKG_HASH:=79bbfa745d1901d685973584bd2d16a350686ddd176f6a2244490fb01996441f
@@ -32,7 +32,6 @@ define Package/borgbackup
   DEPENDS:= \
       +python3-light \
       +python3-codecs \
-      +python3-email \
       +python3-logging \
       +python3-lzma \
       +python3-msgpack \
git clone https://git.99rst.org/PROJECT