Hello community,

here is the log from the commit of package python-mechanize for 
openSUSE:Factory checked in at 2019-05-20 13:17:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mechanize (Old)
 and      /work/SRC/openSUSE:Factory/.python-mechanize.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mechanize"

Mon May 20 13:17:52 2019 rev:22 rq:703751 version:0.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mechanize/python-mechanize.changes        
2019-04-08 20:53:25.794563680 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-mechanize.new.5148/python-mechanize.changes  
    2019-05-20 13:17:59.783927068 +0200
@@ -1,0 +2,7 @@
+Fri May 17 17:15:36 UTC 2019 - Meera Belur <[email protected]>
+
+- Update to v0.4.2
+  * A couple of python 3 specific fixes for proxy authorization and 
+    adding controls to forms 
+
+-------------------------------------------------------------------

Old:
----
  mechanize-0.4.1.tar.gz

New:
----
  mechanize-0.4.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-mechanize.spec ++++++
--- /var/tmp/diff_new_pack.B4TDjY/_old  2019-05-20 13:18:01.107926377 +0200
+++ /var/tmp/diff_new_pack.B4TDjY/_new  2019-05-20 13:18:01.111926376 +0200
@@ -19,7 +19,7 @@
 %define modname mechanize
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-mechanize
-Version:        0.4.1
+Version:        0.4.2
 Release:        0
 Summary:        Stateful programmatic web browsing
 License:        (BSD-3-Clause OR ZPL-2.1) AND BSD-3-Clause

++++++ mechanize-0.4.1.tar.gz -> mechanize-0.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mechanize-0.4.1/PKG-INFO new/mechanize-0.4.2/PKG-INFO
--- old/mechanize-0.4.1/PKG-INFO        2019-03-16 10:28:05.000000000 +0100
+++ new/mechanize-0.4.2/PKG-INFO        2019-04-12 07:20:14.000000000 +0200
@@ -1,12 +1,12 @@
 Metadata-Version: 2.1
 Name: mechanize
-Version: 0.4.1
+Version: 0.4.2
 Summary: Stateful programmatic web browsing.
 Home-page: https://github.com/python-mechanize/mechanize
 Author: Kovid Goyal
 Author-email: [email protected]
 License: BSD
-Download-URL: 
https://pypi.python.org/packages/source/m/mechanize/mechanize-0.4.1.tar.gz
+Download-URL: 
https://pypi.python.org/packages/source/m/mechanize/mechanize-0.4.2.tar.gz
 Description: Stateful programmatic web browsing, after Andy Lester's Perl 
module
         WWW::Mechanize.
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mechanize-0.4.1/mechanize/_form_controls.py 
new/mechanize-0.4.2/mechanize/_form_controls.py
--- old/mechanize-0.4.1/mechanize/_form_controls.py     2019-01-10 
11:34:12.000000000 +0100
+++ new/mechanize-0.4.2/mechanize/_form_controls.py     2019-04-02 
08:25:15.000000000 +0200
@@ -2488,6 +2488,8 @@
         for control_index in range(len(self.controls)):
             control = self.controls[control_index]
             for ii, key, val in control._totally_ordered_pairs():
+                if ii is None:
+                    ii = -1
                 pairs.append((ii, key, val, control_index))
 
         # stable sort by ONLY first item in tuple
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mechanize-0.4.1/mechanize/_urllib2_fork.py 
new/mechanize-0.4.2/mechanize/_urllib2_fork.py
--- old/mechanize-0.4.1/mechanize/_urllib2_fork.py      2019-03-15 
17:57:58.000000000 +0100
+++ new/mechanize-0.4.2/mechanize/_urllib2_fork.py      2019-03-28 
08:00:21.000000000 +0100
@@ -714,7 +714,11 @@
 
         if user and password:
             user_pass = '%s:%s' % (unquote(user), unquote(password))
+            if not isinstance(user_pass, bytes):
+                user_pass = user_pass.encode('utf-8')
             creds = base64.b64encode(user_pass).strip()
+            if isinstance(creds, bytes):
+                creds = creds.decode('ascii')
             req.add_header('Proxy-authorization', 'Basic ' + creds)
         hostport = unquote(hostport)
         req.set_proxy(hostport, proxy_type)
@@ -851,7 +855,7 @@
             raw = "%s:%s" % (user, pw)
             auth = str('Basic %s' % base64.b64encode(
                     raw.encode('utf-8')).strip().decode('ascii'))
-            if req.headers.get(self.auth_header, None) == auth:
+            if req.get_header(self.auth_header, None) == auth:
                 return None
             newreq = copy.copy(req)
             newreq.add_header(self.auth_header, auth)
@@ -943,7 +947,7 @@
         auth = self.get_authorization(req, chal)
         if auth:
             auth_val = 'Digest %s' % auth
-            if req.headers.get(self.auth_header, None) == auth_val:
+            if req.get_header(self.auth_header, None) == auth_val:
                 return None
             newreq = copy.copy(req)
             newreq.add_unredirected_header(self.auth_header, auth_val)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mechanize-0.4.1/mechanize/_version.py 
new/mechanize-0.4.2/mechanize/_version.py
--- old/mechanize-0.4.1/mechanize/_version.py   2019-03-16 10:27:36.000000000 
+0100
+++ new/mechanize-0.4.2/mechanize/_version.py   2019-04-12 07:20:03.000000000 
+0200
@@ -1,2 +1,2 @@
-"0.4.1"
-__version__ = (0, 4, 1, None, None)
+"0.4.2"
+__version__ = (0, 4, 2, None, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mechanize-0.4.1/mechanize.egg-info/PKG-INFO 
new/mechanize-0.4.2/mechanize.egg-info/PKG-INFO
--- old/mechanize-0.4.1/mechanize.egg-info/PKG-INFO     2019-03-16 
10:28:05.000000000 +0100
+++ new/mechanize-0.4.2/mechanize.egg-info/PKG-INFO     2019-04-12 
07:20:14.000000000 +0200
@@ -1,12 +1,12 @@
 Metadata-Version: 2.1
 Name: mechanize
-Version: 0.4.1
+Version: 0.4.2
 Summary: Stateful programmatic web browsing.
 Home-page: https://github.com/python-mechanize/mechanize
 Author: Kovid Goyal
 Author-email: [email protected]
 License: BSD
-Download-URL: 
https://pypi.python.org/packages/source/m/mechanize/mechanize-0.4.1.tar.gz
+Download-URL: 
https://pypi.python.org/packages/source/m/mechanize/mechanize-0.4.2.tar.gz
 Description: Stateful programmatic web browsing, after Andy Lester's Perl 
module
         WWW::Mechanize.
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mechanize-0.4.1/test/test_form.py 
new/mechanize-0.4.2/test/test_form.py
--- old/mechanize-0.4.1/test/test_form.py       2019-01-07 06:52:06.000000000 
+0100
+++ new/mechanize-0.4.2/test/test_form.py       2019-04-02 08:25:15.000000000 
+0200
@@ -3471,6 +3471,12 @@
             control.add_to_form(form)
         self.assertEqual(form.controls, combined)
 
+    def test_new_control(self):
+        form = first_form('<input type="text" name="foo" value="bar" />')
+        form.new_control('hidden', 'newcontrol', {})
+        form.fixup()
+        form._request_data()
+
 
 # }}}
 


Reply via email to