<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-lxml.git/src/lxml/html/__init__.py, branch lxml-4.4</title>
<subtitle>github.com: lxml/lxml.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/'/>
<entry>
<title>Fix typos (GH-282)</title>
<updated>2019-06-24T18:49:21+00:00</updated>
<author>
<name>Min ho Kim</name>
<email>minho42@gmail.com</email>
</author>
<published>2019-06-24T18:49:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=6beef451a6690796d13fc3d2a19321434b880d16'/>
<id>6beef451a6690796d13fc3d2a19321434b880d16</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>LP#1799755: Fix ABC imports from collections package to resolve a DeprecationWarning in Py3.7.</title>
<updated>2018-10-24T19:16:26+00:00</updated>
<author>
<name>Stefan Behnel</name>
<email>stefan_ml@behnel.de</email>
</author>
<published>2018-10-24T19:16:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=68cf93c4827ea74e46d2aa6809011f96ed9c689a'/>
<id>68cf93c4827ea74e46d2aa6809011f96ed9c689a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add better fallbacks to SelectElement.value</title>
<updated>2017-10-05T15:18:49+00:00</updated>
<author>
<name>Christopher Schramm</name>
<email>git@cschramm.eu</email>
</author>
<published>2017-09-22T09:05:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=b25b7c9e0012582a759c04f3dfaabc95a5aeb26f'/>
<id>b25b7c9e0012582a759c04f3dfaabc95a5aeb26f</id>
<content type='text'>
If a browser encounters a select element without any selected option element, it automatically pre-selects the first one. If multiple options are selected, all but the last one get deselected.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a browser encounters a select element without any selected option element, it automatically pre-selects the first one. If multiple options are selected, all but the last one get deselected.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix html.SelectElement stripping whitespace from &lt;option&gt; values</title>
<updated>2017-02-16T07:06:11+00:00</updated>
<author>
<name>Ashish Kulkarni</name>
<email>ashish@advarisk.com</email>
</author>
<published>2017-02-16T07:06:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=c39851bbc4b624d27cc65f534064dd316afd093a'/>
<id>c39851bbc4b624d27cc65f534064dd316afd093a</id>
<content type='text'>
This is a fix for bug #1665241, as the original fix for #399249
in 0b14af50fdc878199f8a3be3053eef42d3e9851f should not apply to
option values, which are supposed to be passed through as-is.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a fix for bug #1665241, as the original fix for #399249
in 0b14af50fdc878199f8a3be3053eef42d3e9851f should not apply to
option values, which are supposed to be passed through as-is.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix POST form submission for Python 3</title>
<updated>2017-02-08T21:38:05+00:00</updated>
<author>
<name>Jakub Wilk</name>
<email>jwilk@jwilk.net</email>
</author>
<published>2017-02-08T21:38:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=936852fc80e09622a7461d66bd6a46547dbb3eb5'/>
<id>936852fc80e09622a7461d66bd6a46547dbb3eb5</id>
<content type='text'>
In Python 3, urlencode() returns Unicode string; but urlopen() wants
only bytes in data, so it need to be encoded first.

Fixes:

    &gt;&gt;&gt; form = lxml.html.fromstring('&lt;form method="POST"&gt;', base_url='http://localhost')
    &gt;&gt;&gt; lxml.html.submit_form(form)
    Traceback (most recent call last):
      File "&lt;stdin&gt;", line 1, in &lt;module&gt;
      File ".../lxml/html/__init__.py", line 1119, in submit_form
        return open_http(form.method, url, values)
      File ".../lxml/html/__init__.py", line 1140, in open_http_urllib
        return urlopen(url, data)
      File ".../urllib/request.py", line 163, in urlopen
        return opener.open(url, data, timeout)
      File ".../urllib/request.py", line 464, in open
        req = meth(req)
      File ".../urllib/request.py", line 1183, in do_request_
        raise TypeError(msg)
    TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Python 3, urlencode() returns Unicode string; but urlopen() wants
only bytes in data, so it need to be encoded first.

Fixes:

    &gt;&gt;&gt; form = lxml.html.fromstring('&lt;form method="POST"&gt;', base_url='http://localhost')
    &gt;&gt;&gt; lxml.html.submit_form(form)
    Traceback (most recent call last):
      File "&lt;stdin&gt;", line 1, in &lt;module&gt;
      File ".../lxml/html/__init__.py", line 1119, in submit_form
        return open_http(form.method, url, values)
      File ".../lxml/html/__init__.py", line 1140, in open_http_urllib
        return urlopen(url, data)
      File ".../urllib/request.py", line 163, in urlopen
        return opener.open(url, data, timeout)
      File ".../urllib/request.py", line 464, in open
        req = meth(req)
      File ".../urllib/request.py", line 1183, in do_request_
        raise TypeError(msg)
    TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #197 from creitiv/ignore-disabled-inputs</title>
<updated>2016-08-20T09:35:13+00:00</updated>
<author>
<name>scoder</name>
<email>stefan_ml@behnel.de</email>
</author>
<published>2016-08-20T09:35:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=714b95c49e81a7770ff407989daa3b38f0ec44c4'/>
<id>714b95c49e81a7770ff407989daa3b38f0ec44c4</id>
<content type='text'>
Ignore disabled form inputs</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ignore disabled form inputs</pre>
</div>
</content>
</entry>
<entry>
<title>adapt docs to actual behaviour</title>
<updated>2016-08-13T14:06:19+00:00</updated>
<author>
<name>Stefan Behnel</name>
<email>stefan_ml@behnel.de</email>
</author>
<published>2016-08-13T14:06:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=962c6bfc7395d05558d98bbb51c27596bd59df51'/>
<id>962c6bfc7395d05558d98bbb51c27596bd59df51</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>allow el.set("attr") in HTML trees without having to specify an explicit None value</title>
<updated>2016-07-29T16:39:46+00:00</updated>
<author>
<name>Stefan Behnel</name>
<email>stefan_ml@behnel.de</email>
</author>
<published>2016-07-29T16:39:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=8132c755adad4a75ba855d985dd257493bccc7fd'/>
<id>8132c755adad4a75ba855d985dd257493bccc7fd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ignore disabled form inputs</title>
<updated>2016-07-26T11:56:40+00:00</updated>
<author>
<name>Kristian Klemon</name>
<email>kristian@outbank.io</email>
</author>
<published>2016-06-29T20:14:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=bc6da1efa1e92879a0b375645a5cfcc666335a6d'/>
<id>bc6da1efa1e92879a0b375645a5cfcc666335a6d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Exclude `file` field `value` from `FormElement.form_values`.</title>
<updated>2016-07-20T15:31:09+00:00</updated>
<author>
<name>Tomas Divis</name>
<email>tomas.divis@nic.cz</email>
</author>
<published>2016-07-20T15:31:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-lxml.git/commit/?id=efb70762d057b80f832c8a36d089a4ffb498c379'/>
<id>efb70762d057b80f832c8a36d089a4ffb498c379</id>
<content type='text'>
Similar to `submit`, `image` and `reset`, browsers don't send `file` field values in the POST when form is submitted. `FormElement.form_values` method already correctly excluded `submit`, `image` and `reset` fields, now it also excludes the `file` fields.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to `submit`, `image` and `reset`, browsers don't send `file` field values in the POST when form is submitted. `FormElement.form_values` method already correctly excluded `submit`, `image` and `reset` fields, now it also excludes the `file` fields.
</pre>
</div>
</content>
</entry>
</feed>
