Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-mechanize for openSUSE:Factory checked in at 2022-07-26 19:44:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-mechanize (Old) and /work/SRC/openSUSE:Factory/.python-mechanize.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mechanize" Tue Jul 26 19:44:00 2022 rev:27 rq:990873 version:0.4.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-mechanize/python-mechanize.changes 2022-01-24 23:10:12.246671811 +0100 +++ /work/SRC/openSUSE:Factory/.python-mechanize.new.1533/python-mechanize.changes 2022-07-26 19:44:27.499490625 +0200 @@ -1,0 +2,7 @@ +Sun Jul 24 09:09:01 UTC 2022 - Dirk M??ller <dmuel...@suse.com> + +- update to 0.4.8: + * Handle mal-encoded robots.txt files more gracefully + * Support HTTP 308 redirects + +------------------------------------------------------------------- Old: ---- mechanize-0.4.7.tar.gz New: ---- mechanize-0.4.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-mechanize.spec ++++++ --- /var/tmp/diff_new_pack.e2wg7T/_old 2022-07-26 19:44:27.923425116 +0200 +++ /var/tmp/diff_new_pack.e2wg7T/_new 2022-07-26 19:44:27.927424498 +0200 @@ -19,7 +19,7 @@ %define modname mechanize %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-mechanize -Version: 0.4.7 +Version: 0.4.8 Release: 0 Summary: Stateful programmatic web browsing License: BSD-3-Clause AND (BSD-3-Clause OR ZPL-2.1) ++++++ mechanize-0.4.7.tar.gz -> mechanize-0.4.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/ChangeLog new/mechanize-0.4.8/ChangeLog --- old/mechanize-0.4.7/ChangeLog 2021-09-19 05:56:17.000000000 +0200 +++ new/mechanize-0.4.8/ChangeLog 2022-04-14 16:02:30.000000000 +0200 @@ -1,6 +1,11 @@ This isn't really in proper GNU ChangeLog format, it just happens to look that way. +2022-04-14 Kovid Goyal + * 0.4.8 release + * Handle mal-encoded robots.txt files more gracefully + * Support HTTP 308 redirects + 2021-09-19 Kovid Goyal * 0.4.7 release * Fix the ~ character being percent escaped when sending URLs to servers. See RFC 3986. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/PKG-INFO new/mechanize-0.4.8/PKG-INFO --- old/mechanize-0.4.7/PKG-INFO 2021-09-19 05:57:11.299341200 +0200 +++ new/mechanize-0.4.8/PKG-INFO 2022-04-14 16:14:40.155328000 +0200 @@ -1,12 +1,11 @@ Metadata-Version: 2.1 Name: mechanize -Version: 0.4.7 -Summary: Stateful programmatic web browsing. +Version: 0.4.8 +Summary: Stateful, programmatic web browsing Home-page: https://github.com/python-mechanize/mechanize Author: Kovid Goyal Author-email: n...@no.no License: BSD -Download-URL: https://pypi.python.org/packages/source/m/mechanize/mechanize-0.4.7.tar.gz Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers @@ -34,26 +33,99 @@ Classifier: Topic :: Text Processing :: Markup :: HTML Classifier: Topic :: Text Processing :: Markup :: XML Provides-Extra: fast +Provides-Extra: test +Provides-Extra: binarytest License-File: LICENSE -Stateful programmatic web browsing, after Andy Lester's Perl module -WWW::Mechanize. +mechanize - Automate interaction with HTTP web servers +########################################################## -mechanize.Browser implements the urllib2.OpenerDirector interface. Browser -objects have state, including navigation history, HTML form state, cookies, -etc. The set of features and URL schemes handled by Browser objects is -configurable. The library also provides an API that is mostly compatible with -urllib2: your urllib2 program will likely still work if you replace "urllib2" -with "mechanize" everywhere. - -Features include: ftp:, http: and file: URL schemes, browser history, hyperlink -and HTML form support, HTTP cookies, HTTP-EQUIV and Refresh, Referer [sic] -header, robots.txt, redirections, proxies, and Basic and Digest HTTP -authentication. - -Much of the code originally derived from Perl code by Gisle Aas (libwww-perl), -Johnny Lee (MSIE Cookie support) and last but not least Andy Lester -(WWW::Mechanize). urllib2 was written by Jeremy Hylton. +|pypi| |build| +.. contents:: + + +Major features +----------------- + +Stateful programmatic web browsing in Python + +- The browser class `mechanize.Browser` implements the + interface of `urllib2.OpenerDirector`, so any URL can + be opened not just `http`. + +- Easy HTML form filling. + +- Convenient link parsing and following. + +- Browser history (`.back()` and `.reload()` methods). + +- The `Referer` HTTP header is added properly (optional). + +- Automatic observance of `robots.txt <http://www.robotstxt.org/wc/norobots.html>`_. + +- Automatic handling of HTTP-Equiv and Refresh. + + +Installation +----------------- + +To install for normal usage: + +.. code-block:: bash + + pip3 install mechanize + +To install for development: + +.. code-block:: bash + + git clone https://github.com/python-mechanize/mechanize.git + cd mechanize + pip3 install -e . + +To install manually, simply add the `mechanize` sub-directory somewhere on your +`PYTHONPATH`. + + +Documentation +--------------- + +See https://mechanize.readthedocs.io/en/latest/ + +Credits +----------------- + +python-mechanize was the creation of John J. Lee. Maintenance was taken over by +Kovid Goyal in 2017. + +Much of the code was originally derived from the work of the following people: + +- Gisle Aas -- [libwww-perl] + +- Jeremy Hylton (and many others) -- [urllib2] + +- Andy Lester -- [WWW::Mechanize] + +- Johnny Lee (coincidentally-named) -- MSIE CookieJar Perl code from which + mechanize's support for that is derived. + +Also: + +- Gary Poster and Benji York at Zope Corporation -- contributed significant + changes to the HTML forms code + +- Ronald Tschalar -- provided help with Netscape cookies + +Thanks also to the many people who have contributed bug reports and +patches. + +.. |pypi| image:: https://img.shields.io/pypi/v/mechanize.svg?label=version + :target: https://pypi.python.org/pypi/mechanize + :alt: Latest version released on PyPi + +.. |build| image:: https://dev.azure.com/divok/mechanize/_apis/build/status/python-mechanize.mechanize?branchName=master + :target: https://dev.azure.com/divok/mechanize/_build/latest?definitionId=3&branchName=master + :alt: Build status of the master branch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/mechanize/_http.py new/mechanize-0.4.8/mechanize/_http.py --- old/mechanize-0.4.7/mechanize/_http.py 2019-06-03 13:57:53.000000000 +0200 +++ new/mechanize-0.4.8/mechanize/_http.py 2021-12-19 17:31:57.000000000 +0100 @@ -119,7 +119,10 @@ if is_py2: self.parse(lines) else: - self.parse(map(as_unicode, lines)) + # As per: https://developers.google.com/search/docs/advanced/robots/robots_txt + # robots.txt must be utf-8 encoded and invalid encoding causes + # bytes to be ignored to be ignored + self.parse((as_unicode(x, errors='ignore') for x in lines)) class RobotExclusionError(HTTPError): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/mechanize/_urllib2_fork.py new/mechanize-0.4.8/mechanize/_urllib2_fork.py --- old/mechanize-0.4.7/mechanize/_urllib2_fork.py 2021-09-19 05:45:38.000000000 +0200 +++ new/mechanize-0.4.8/mechanize/_urllib2_fork.py 2022-03-31 03:58:18.000000000 +0200 @@ -595,8 +595,8 @@ """ from ._request import Request m = req.get_method() - if (code in (301, 302, 303, 307, "refresh") and m in ("GET", "HEAD") - or code in (301, 302, 303, "refresh") and m == "POST"): + if (code in (301, 302, 303, 307, 308, "refresh") and m in ("GET", "HEAD") + or code in (301, 302, 303, 307, 308, "refresh") and m == "POST"): # Strictly (according to RFC 2616), 301 or 302 in response # to a POST MUST NOT cause a redirection without confirmation # from the user (of urllib2, in this case). In practice, @@ -609,7 +609,7 @@ headers=req.headers, origin_req_host=req.get_origin_req_host(), unverifiable=True, - visit=False, + visit=False, method=m if code in (307, 308) else None, timeout=req.timeout) new._origin_req = getattr(req, "_origin_req", req) return new @@ -655,7 +655,7 @@ return self.parent.open(new) http_error_301 = http_error_303 = http_error_307 = http_error_302 - http_error_refresh = http_error_302 + http_error_refresh = http_error_308 = http_error_302 inf_msg = "The HTTP server returned a redirect error that would " \ "lead to an infinite loop.\n" \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/mechanize/_version.py new/mechanize-0.4.8/mechanize/_version.py --- old/mechanize-0.4.7/mechanize/_version.py 2021-09-19 05:56:35.000000000 +0200 +++ new/mechanize-0.4.8/mechanize/_version.py 2022-04-14 16:02:58.000000000 +0200 @@ -1,2 +1,3 @@ -"0.4.7" -__version__ = (0, 4, 7, None, None) +"0.4.8" +string_version = "0.4.8" +__version__ = (0, 4, 8, None, None) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/mechanize/polyglot.py new/mechanize-0.4.8/mechanize/polyglot.py --- old/mechanize-0.4.7/mechanize/polyglot.py 2021-09-19 05:37:27.000000000 +0200 +++ new/mechanize-0.4.8/mechanize/polyglot.py 2021-12-19 17:31:00.000000000 +0100 @@ -195,9 +195,9 @@ return attr, (value if delim else None) -def as_unicode(x, encoding='utf-8'): +def as_unicode(x, encoding='utf-8', errors='strict'): if isinstance(x, bytes): - x = x.decode('utf-8') + x = x.decode('utf-8', errors=errors) return x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/mechanize.egg-info/PKG-INFO new/mechanize-0.4.8/mechanize.egg-info/PKG-INFO --- old/mechanize-0.4.7/mechanize.egg-info/PKG-INFO 2021-09-19 05:57:11.000000000 +0200 +++ new/mechanize-0.4.8/mechanize.egg-info/PKG-INFO 2022-04-14 16:14:39.000000000 +0200 @@ -1,12 +1,11 @@ Metadata-Version: 2.1 Name: mechanize -Version: 0.4.7 -Summary: Stateful programmatic web browsing. +Version: 0.4.8 +Summary: Stateful, programmatic web browsing Home-page: https://github.com/python-mechanize/mechanize Author: Kovid Goyal Author-email: n...@no.no License: BSD -Download-URL: https://pypi.python.org/packages/source/m/mechanize/mechanize-0.4.7.tar.gz Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers @@ -34,26 +33,99 @@ Classifier: Topic :: Text Processing :: Markup :: HTML Classifier: Topic :: Text Processing :: Markup :: XML Provides-Extra: fast +Provides-Extra: test +Provides-Extra: binarytest License-File: LICENSE -Stateful programmatic web browsing, after Andy Lester's Perl module -WWW::Mechanize. +mechanize - Automate interaction with HTTP web servers +########################################################## -mechanize.Browser implements the urllib2.OpenerDirector interface. Browser -objects have state, including navigation history, HTML form state, cookies, -etc. The set of features and URL schemes handled by Browser objects is -configurable. The library also provides an API that is mostly compatible with -urllib2: your urllib2 program will likely still work if you replace "urllib2" -with "mechanize" everywhere. - -Features include: ftp:, http: and file: URL schemes, browser history, hyperlink -and HTML form support, HTTP cookies, HTTP-EQUIV and Refresh, Referer [sic] -header, robots.txt, redirections, proxies, and Basic and Digest HTTP -authentication. - -Much of the code originally derived from Perl code by Gisle Aas (libwww-perl), -Johnny Lee (MSIE Cookie support) and last but not least Andy Lester -(WWW::Mechanize). urllib2 was written by Jeremy Hylton. +|pypi| |build| +.. contents:: + + +Major features +----------------- + +Stateful programmatic web browsing in Python + +- The browser class `mechanize.Browser` implements the + interface of `urllib2.OpenerDirector`, so any URL can + be opened not just `http`. + +- Easy HTML form filling. + +- Convenient link parsing and following. + +- Browser history (`.back()` and `.reload()` methods). + +- The `Referer` HTTP header is added properly (optional). + +- Automatic observance of `robots.txt <http://www.robotstxt.org/wc/norobots.html>`_. + +- Automatic handling of HTTP-Equiv and Refresh. + + +Installation +----------------- + +To install for normal usage: + +.. code-block:: bash + + pip3 install mechanize + +To install for development: + +.. code-block:: bash + + git clone https://github.com/python-mechanize/mechanize.git + cd mechanize + pip3 install -e . + +To install manually, simply add the `mechanize` sub-directory somewhere on your +`PYTHONPATH`. + + +Documentation +--------------- + +See https://mechanize.readthedocs.io/en/latest/ + +Credits +----------------- + +python-mechanize was the creation of John J. Lee. Maintenance was taken over by +Kovid Goyal in 2017. + +Much of the code was originally derived from the work of the following people: + +- Gisle Aas -- [libwww-perl] + +- Jeremy Hylton (and many others) -- [urllib2] + +- Andy Lester -- [WWW::Mechanize] + +- Johnny Lee (coincidentally-named) -- MSIE CookieJar Perl code from which + mechanize's support for that is derived. + +Also: + +- Gary Poster and Benji York at Zope Corporation -- contributed significant + changes to the HTML forms code + +- Ronald Tschalar -- provided help with Netscape cookies + +Thanks also to the many people who have contributed bug reports and +patches. + +.. |pypi| image:: https://img.shields.io/pypi/v/mechanize.svg?label=version + :target: https://pypi.python.org/pypi/mechanize + :alt: Latest version released on PyPi + +.. |build| image:: https://dev.azure.com/divok/mechanize/_apis/build/status/python-mechanize.mechanize?branchName=master + :target: https://dev.azure.com/divok/mechanize/_build/latest?definitionId=3&branchName=master + :alt: Build status of the master branch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/mechanize.egg-info/requires.txt new/mechanize-0.4.8/mechanize.egg-info/requires.txt --- old/mechanize-0.4.7/mechanize.egg-info/requires.txt 2021-09-19 05:57:11.000000000 +0200 +++ new/mechanize-0.4.8/mechanize.egg-info/requires.txt 2022-04-14 16:14:40.000000000 +0200 @@ -1,4 +1,14 @@ html5lib>=0.999999999 +[binarytest] +lxml +html5-parser + [fast] html5-parser>=0.4.4 + +[test] +twisted +service_identity +six +html5lib diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/publish.py new/mechanize-0.4.8/publish.py --- old/mechanize-0.4.7/publish.py 2019-09-02 11:36:17.000000000 +0200 +++ new/mechanize-0.4.8/publish.py 2021-10-20 07:23:45.000000000 +0200 @@ -38,7 +38,7 @@ def build_release(): for rem in 'dist build'.split(): os.path.exists(rem) and shutil.rmtree(rem) - run(sys.executable, 'setup.py', '-q', 'sdist', 'bdist_wheel') + run(sys.executable, '-m', 'build') def sign_release(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/setup.cfg new/mechanize-0.4.8/setup.cfg --- old/mechanize-0.4.7/setup.cfg 2021-09-19 05:57:11.299341200 +0200 +++ new/mechanize-0.4.8/setup.cfg 2022-04-14 16:14:40.155328000 +0200 @@ -1,3 +1,56 @@ +[metadata] +name = mechanize +version = attr: mechanize._version.string_version +author = Kovid Goyal +platforms = any +author_email = n...@no.no +license = BSD +description = Stateful, programmatic web browsing +long_description = file: README.rst +url = https://github.com/python-mechanize/mechanize +packages = mechanize +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Intended Audience :: System Administrators + License :: OSI Approved :: BSD License + Natural Language :: English + Operating System :: OS Independent + Programming Language :: Python + Topic :: Internet + Topic :: Internet :: File Transfer Protocol (FTP) + Topic :: Internet :: WWW/HTTP + Topic :: Internet :: WWW/HTTP :: Browsers + Topic :: Internet :: WWW/HTTP :: Indexing/Search + Topic :: Internet :: WWW/HTTP :: Site Management + Topic :: Internet :: WWW/HTTP :: Site Management :: Link Checking + Topic :: Software Development :: Libraries + Topic :: Software Development :: Libraries :: Python Modules + Topic :: Software Development :: Testing + Topic :: Software Development :: Testing :: Traffic Generation + Topic :: System :: Archiving :: Mirroring + Topic :: System :: Networking :: Monitoring + Topic :: System :: Systems Administration + Topic :: Text Processing + Topic :: Text Processing :: Markup + Topic :: Text Processing :: Markup :: HTML + Topic :: Text Processing :: Markup :: XML + +[options] +zip_safe = True +install_requires = html5lib>=0.999999999 + +[options.extras_require] +fast = html5-parser>=0.4.4 +test = + twisted + service_identity + six + html5lib +binarytest = + lxml + html5-parser + [flake8] max-line-length = 120 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/setup.py new/mechanize-0.4.8/setup.py --- old/mechanize-0.4.7/setup.py 2019-08-09 16:43:07.000000000 +0200 +++ new/mechanize-0.4.8/setup.py 2021-10-20 06:32:52.000000000 +0200 @@ -1,102 +1,10 @@ #!/usr/bin/env python -"""Stateful programmatic web browsing. - -Stateful programmatic web browsing, after Andy Lester's Perl module -WWW::Mechanize. - -mechanize.Browser implements the urllib2.OpenerDirector interface. Browser -objects have state, including navigation history, HTML form state, cookies, -etc. The set of features and URL schemes handled by Browser objects is -configurable. The library also provides an API that is mostly compatible with -urllib2: your urllib2 program will likely still work if you replace "urllib2" -with "mechanize" everywhere. - -Features include: ftp:, http: and file: URL schemes, browser history, hyperlink -and HTML form support, HTTP cookies, HTTP-EQUIV and Refresh, Referer [sic] -header, robots.txt, redirections, proxies, and Basic and Digest HTTP -authentication. - -Much of the code originally derived from Perl code by Gisle Aas (libwww-perl), -Johnny Lee (MSIE Cookie support) and last but not least Andy Lester -(WWW::Mechanize). urllib2 was written by Jeremy Hylton. - -""" - -import os import setuptools -import sys - -from setuptools.command.test import test - -if sys.version_info < (2, 7): - raise SystemExit('mechanize requires python >= 2.7') - -VERSION = open(os.path.join("mechanize", "_version.py")).\ - readlines()[0].strip(' "\n') - -CLASSIFIERS = """\ -Development Status :: 5 - Production/Stable -Intended Audience :: Developers -Intended Audience :: System Administrators -License :: OSI Approved :: BSD License -Natural Language :: English -Operating System :: OS Independent -Programming Language :: Python -Topic :: Internet -Topic :: Internet :: File Transfer Protocol (FTP) -Topic :: Internet :: WWW/HTTP -Topic :: Internet :: WWW/HTTP :: Browsers -Topic :: Internet :: WWW/HTTP :: Indexing/Search -Topic :: Internet :: WWW/HTTP :: Site Management -Topic :: Internet :: WWW/HTTP :: Site Management :: Link Checking -Topic :: Software Development :: Libraries -Topic :: Software Development :: Libraries :: Python Modules -Topic :: Software Development :: Testing -Topic :: Software Development :: Testing :: Traffic Generation -Topic :: System :: Archiving :: Mirroring -Topic :: System :: Networking :: Monitoring -Topic :: System :: Systems Administration -Topic :: Text Processing -Topic :: Text Processing :: Markup -Topic :: Text Processing :: Markup :: HTML -Topic :: Text Processing :: Markup :: XML -""" - - -class Test(test): - - def run(self): - import importlib - orig = sys.path[:] - try: - sys.path.insert(0, os.getcwd()) - m = importlib.import_module('run_tests') - m.main(self._argv) - finally: - sys.path = orig def main(): - setuptools.setup( - name="mechanize", - version=VERSION, - license="BSD", - platforms=["any"], - cmdclass={'test': Test}, - install_requires=['html5lib>=0.999999999'], - extras_require={'fast': ['html5-parser>=0.4.4']}, - classifiers=[c for c in CLASSIFIERS.split("\n") if c], - zip_safe=True, - author="Kovid Goyal", - author_email='n...@no.no', - description=__doc__.split("\n", 1)[0], - long_description=__doc__.split("\n", 2)[-1], - url="https://github.com/python-mechanize/mechanize", - download_url=("https://pypi.python.org/packages/source/m/mechanize/" - "mechanize-%s.tar.gz" % VERSION), - packages=["mechanize"], - ) + setuptools.setup() -if __name__ == "__main__": +if __name__ == '__main__': main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mechanize-0.4.7/test/test_urllib2.py new/mechanize-0.4.8/test/test_urllib2.py --- old/mechanize-0.4.7/test/test_urllib2.py 2021-09-19 05:47:39.000000000 +0200 +++ new/mechanize-0.4.8/test/test_urllib2.py 2022-04-14 16:09:18.000000000 +0200 @@ -1394,7 +1394,7 @@ o = h.parent = MockOpener() # ordinary redirect behaviour - for code in 301, 302, 303, 307, "refresh": + for code in 301, 302, 303, "refresh": for data in None, "blah\nblah\n": method = getattr(h, "http_error_%s" % code) req = Request(from_url, data)