summaryrefslogtreecommitdiff
path: root/dev-python/mechanize
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/mechanize
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/mechanize')
-rw-r--r--dev-python/mechanize/Manifest1
-rw-r--r--dev-python/mechanize/files/mechanize-0.4.10-py314-tests.patch33
-rw-r--r--dev-python/mechanize/mechanize-0.4.10.ebuild39
-rw-r--r--dev-python/mechanize/metadata.xml20
4 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/mechanize/Manifest b/dev-python/mechanize/Manifest
new file mode 100644
index 000000000000..9d6be2a45653
--- /dev/null
+++ b/dev-python/mechanize/Manifest
@@ -0,0 +1 @@
+DIST mechanize-0.4.10.tar.gz 218291 BLAKE2B 7a6f293ac5622b4ac01d1b84327e4dd41132eb2fdfaf9826e6c7a8b088890ae8b4b5f4e90aca930761d532702138f0be6f9394e48ee2defc48dcb5f19ee22a79 SHA512 76d13ac8ac06e8e3836ba814259e1ec8495ebbfc259d4f8652f3ed23863b6a5f6fc5983409083ad9f5d0312db6581b0e7b32bfe6d46ecd190006188ac4cf3fc8
diff --git a/dev-python/mechanize/files/mechanize-0.4.10-py314-tests.patch b/dev-python/mechanize/files/mechanize-0.4.10-py314-tests.patch
new file mode 100644
index 000000000000..c5ba8eb43f56
--- /dev/null
+++ b/dev-python/mechanize/files/mechanize-0.4.10-py314-tests.patch
@@ -0,0 +1,33 @@
+From 0c1cd4b65697dee4e4192902c9a2965d94700502 Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@debian.org>
+Date: Mon, 26 May 2025 12:59:44 +0100
+Subject: [PATCH] Fix CookieTests following fix for CPython #130631
+
+The fix for https://github.com/python/cpython/issues/130631 in Python
+3.14.0b1 (also cherry-picked to 3.13, but not yet released) causes
+`www.acme.com` to be unquoted in cookie strings. Adjust a test to cope
+with this.
+---
+ test/test_cookies.py | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/test/test_cookies.py b/test/test_cookies.py
+index ec0c2ff..92227fc 100644
+--- a/test/test_cookies.py
++++ b/test/test_cookies.py
+@@ -332,9 +332,13 @@ def test_missing_name(self):
+ cookie = c._cookies["www.acme.com"]['/foo/']['"spam"']
+ assert cookie.name == '"spam"'
+ assert cookie.value is None
+- assert lwp_cookie_str(cookie) == (
++ assert lwp_cookie_str(cookie) in (
++ r'"spam"; path="/foo/"; domain=www.acme.com; '
++ 'path_spec; discard; version=0',
++ # prior to fix for https://github.com/python/cpython/issues/130631:
+ r'"spam"; path="/foo/"; domain="www.acme.com"; '
+- 'path_spec; discard; version=0')
++ 'path_spec; discard; version=0',
++ )
+ old_str = repr(c)
+ c.save(ignore_expires=True, ignore_discard=True)
+ try:
diff --git a/dev-python/mechanize/mechanize-0.4.10.ebuild b/dev-python/mechanize/mechanize-0.4.10.ebuild
new file mode 100644
index 000000000000..f2f73508529b
--- /dev/null
+++ b/dev-python/mechanize/mechanize-0.4.10.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Stateful programmatic web browsing in Python"
+HOMEPAGE="
+ https://github.com/python-mechanize/mechanize/
+ https://pypi.org/project/mechanize/
+"
+
+LICENSE="|| ( BSD ZPL )"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm arm64 ~ppc ~sparc x86 ~x64-macos"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/html5lib-0.999999999[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ )
+"
+
+PATCHES=(
+ # https://github.com/python-mechanize/mechanize/pull/102
+ "${FILESDIR}"/${P}-py314-tests.patch
+)
+
+python_test() {
+ "${EPYTHON}" run_tests.py -v || die
+}
diff --git a/dev-python/mechanize/metadata.xml b/dev-python/mechanize/metadata.xml
new file mode 100644
index 000000000000..805fc9d949dc
--- /dev/null
+++ b/dev-python/mechanize/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches />
+ <longdescription lang="en">
+ mechanize is a Python module for static programmatic web browsing in
+ Python, after Andy Lester's Perl module WWW::Mechanize. With the Browser
+ subclass any url can be opened - not just http - and UserAgentBase
+ offers easy dynamic configuration of user-agent features like protocol,
+ cookie, redirection and robots.txt handling. Other functionalities
+ include easy HTML form filling using ClientForm interface, convenient
+ link parsing and following, browser history with .back() and .reload()
+ methods and automatic handling of HTTP-Equiv and Refresh.
+ </longdescription>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>