Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lang/python/python-dotenv/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-dotenv
PKG_VERSION:=1.0.1
PKG_VERSION:=1.2.2
PKG_RELEASE:=1

PYPI_NAME:=python-dotenv
PKG_HASH:=e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca
PYPI_SOURCE_NAME:=python_dotenv
PKG_HASH:=2c371a91fbd7ba082c2c1dc1f8bf89ca22564a087c2c287cd9b662adde799cf3

PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
PKG_LICENSE:=BSD-3-Clause
Expand Down
31 changes: 31 additions & 0 deletions lang/python/python-dotenv/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

[ "$1" = python3-dotenv ] || exit 0

python3 - << 'EOF'
import os
import tempfile
from dotenv import dotenv_values, load_dotenv, set_key, get_key

# Write a temp .env file and parse it
with tempfile.NamedTemporaryFile(mode='w', suffix='.env', delete=False) as f:
f.write('FOO=bar\n')
f.write('BAZ=123\n')
f.write('QUOTED="hello world"\n')
env_path = f.name

try:
values = dotenv_values(env_path)
assert values['FOO'] == 'bar', f"got FOO={values['FOO']}"
assert values['BAZ'] == '123', f"got BAZ={values['BAZ']}"
assert values['QUOTED'] == 'hello world', f"got QUOTED={values['QUOTED']}"

# Test load_dotenv sets environment variables
load_dotenv(env_path, override=True)
assert os.environ.get('FOO') == 'bar'
assert os.environ.get('BAZ') == '123'
finally:
os.unlink(env_path)

print("python-dotenv OK")
EOF
4 changes: 2 additions & 2 deletions lang/python/python-packaging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-packaging
PKG_VERSION:=25.0
PKG_VERSION:=26.0
PKG_RELEASE:=1

PYPI_NAME:=packaging
PKG_HASH:=d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f
PKG_HASH:=00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4

PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=Apache-2.0 BSD-2-Clause
Expand Down
4 changes: 2 additions & 2 deletions lang/python/python-pygments/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-pygments
PKG_VERSION:=2.19.2
PKG_VERSION:=2.20.0
PKG_RELEASE:=1

PYPI_NAME:=pygments
PKG_HASH:=636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887
PKG_HASH:=6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f

PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
Expand Down
4 changes: 2 additions & 2 deletions lang/python/python-requests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-requests
PKG_VERSION:=2.32.5
PKG_VERSION:=2.33.1
PKG_RELEASE:=1

PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
Expand All @@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:python:requests

PYPI_NAME:=requests
PKG_HASH:=dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf
PKG_HASH:=18817f8c57c6263968bc123d237e3b8b08ac046f5456bd1e307ee8f4250d3517

HOST_BUILD_DEPENDS:= \
python-chardet/host \
Expand Down
40 changes: 40 additions & 0 deletions lang/python/python-requests/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh

[ "$1" = python3-requests ] || exit 0

python3 - << 'EOF'
import requests

# Verify version and key attributes
assert requests.__version__

# Verify core API is present
assert hasattr(requests, 'get')
assert hasattr(requests, 'post')
assert hasattr(requests, 'put')
assert hasattr(requests, 'delete')
assert hasattr(requests, 'head')
assert hasattr(requests, 'Session')
assert hasattr(requests, 'Request')
assert hasattr(requests, 'Response')
assert hasattr(requests, 'PreparedRequest')

# Test Session creation and basic functionality
s = requests.Session()
assert s is not None

# Test that Request object can be created and prepared
req = requests.Request('GET', 'http://example.com', headers={'User-Agent': 'test'})
prepared = req.prepare()
assert prepared.method == 'GET'
assert prepared.url == 'http://example.com/'
assert prepared.headers['User-Agent'] == 'test'

# Test exceptions are importable
from requests.exceptions import (
RequestException, ConnectionError, HTTPError, URLRequired,
TooManyRedirects, Timeout, ConnectTimeout, ReadTimeout
)

print("requests OK")
EOF
4 changes: 2 additions & 2 deletions lang/python/python-slugify/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=python-slugify
PKG_VERSION:=8.0.1
PKG_VERSION:=8.0.4
PKG_RELEASE:=1

PYPI_NAME:=$(PKG_NAME)
PKG_HASH:=ce0d46ddb668b3be82f4ed5e503dbc33dd815d83e2eb6824211310d3fb172a27
PKG_HASH:=59202371d1d05b54a9e7720c5e038f928f45daaffe41dd10822f3907b937c856

PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_LICENSE:=MIT
Expand Down
28 changes: 28 additions & 0 deletions lang/python/python-slugify/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

[ "$1" = python3-slugify ] || exit 0

python3 - << 'EOF'
from slugify import slugify

# Basic ASCII
assert slugify('Hello World') == 'hello-world', f"got: {slugify('Hello World')}"

# Unicode transliteration
assert slugify('Héllo Wörld') == 'hello-world', f"got: {slugify('Héllo Wörld')}"

# Special characters stripped
assert slugify('Hello, World!') == 'hello-world', f"got: {slugify('Hello, World!')}"

# Numbers preserved
assert slugify('test 123') == 'test-123', f"got: {slugify('test 123')}"

# Custom separator
assert slugify('Hello World', separator='_') == 'hello_world'

# Max length
result = slugify('a very long title that should be truncated', max_length=10)
assert len(result) <= 10, f"length {len(result)} > 10"

print("python-slugify OK")
EOF
2 changes: 1 addition & 1 deletion lang/python/python-urllib3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=python-urllib3
PKG_VERSION:=2.6.3
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_LICENSE:=MIT
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
# This file is protected via CODEOWNERS

[build-system]
-requires = ["hatchling>=1.27.0,<2", "hatch-vcs>=0.4.0,<0.6.0", "setuptools-scm>=8,<10"]
+requires = ["hatchling>=1.27.0,<2", "hatch-vcs>=0.4.0,<0.6.0", "setuptools-scm>=8"]
build-backend = "hatchling.build"

[project]
33 changes: 33 additions & 0 deletions lang/python/python-urllib3/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh

[ "$1" = python3-urllib3 ] || exit 0

python3 - << 'EOF'
import urllib3

# Verify version
assert urllib3.__version__

# Verify core classes are importable
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool, PoolManager
from urllib3.util.retry import Retry
from urllib3.util.timeout import Timeout
from urllib3.exceptions import (
MaxRetryError, TimeoutError, HTTPError,
NewConnectionError, DecodeError
)

# Test Retry configuration
retry = Retry(total=3, backoff_factor=0.5)
assert retry.total == 3

# Test Timeout configuration
timeout = Timeout(connect=5.0, read=10.0)
assert timeout.connect_timeout == 5.0

# Test PoolManager creation
pm = PoolManager(num_pools=5, maxsize=10)
assert pm is not None

print("urllib3 OK")
EOF
Loading