![](https://secure.gravatar.com/avatar/8b97b5aad24c30e4a1357b38cc39aeaa.jpg?s=120&d=mm&r=g)
Hi all, I just released lxml 4.0.0 with several new features. Thanks to everyone who contributed. The documentation is here: http://lxml.de/ Download: https://pypi.python.org/packages/07/76/9f14811d3fb91ed7973a798ded15eda416070... Signature: https://pypi.python.org/packages/07/76/9f14811d3fb91ed7973a798ded15eda416070... Changelog: http://lxml.de/4.0/changes-4.0.0.html Github: https://github.com/lxml/lxml/releases/tag/lxml-4.0.0 This release was built using Cython 0.26.1. If you are interested in commercial support or customisations for the lxml package, please contact me directly. Have fun, Stefan 4.0.0 (2017-09-17) ================== Features added -------------- * The ElementPath implementation is now compiled using Cython, which speeds up the ``.find*()`` methods quite significantly. * The modules ``lxml.builder``, ``lxml.html.diff`` and ``lxml.html.clean`` are also compiled using Cython in order to speed them up. * ``xmlfile()`` supports async coroutines using ``async with`` and ``await``. * ``iterwalk()`` has a new method ``skip_subtree()`` that prevents walking into the descendants of the current element. * ``RelaxNG.from_rnc_string()`` accepts a ``base_url`` argument to allow relative resource lookups. * The XSLT result object has a new method ``.write_output(file)`` that serialises output data into a file according to the ``<xsl:output>`` configuration. Bugs fixed ---------- * GH#251: HTML comments were handled incorrectly by the soupparser. Patch by mozbugbox. * LP#1654544: The html5parser no longer passes the ``useChardet`` option if the input is a Unicode string, unless explicitly requested. When parsing files, the default is to enable it when a URL or file path is passed (because the file is then opened in binary mode), and to disable it when reading from a file(-like) object. Note: This is a backwards incompatible change of the default configuration. If your code parses byte strings/streams and depends on character detection, please pass the option ``guess_charset=True`` explicitly, which already worked in older lxml versions. * LP#1703810: ``etree.fromstring()`` failed to parse UTF-32 data with BOM. * LP#1526522: Some RelaxNG errors were not reported in the error log. * LP#1567526: Empty and plain text input raised a TypeError in soupparser. * LP#1710429: Uninitialised variable usage in HTML diff. * LP#1415643: The closing tags context manager in ``xmlfile()`` could continue to output end tags even after writing failed with an exception. * LP#1465357: ``xmlfile.write()`` now accepts and ignores None as input argument. * Compilation under Py3.7-pre failed due to a modified function signature. Other changes ------------- * The main module source files were renamed from ``lxml.*.pyx`` to plain ``*.pyx`` (e.g. ``etree.pyx``) to simplify their handling in the build process. Care was taken to keep the old header files as fallbacks for code that compiles against the public C-API of lxml, but it might still be worth validating that third-party code does not notice this change.
![](https://secure.gravatar.com/avatar/8b97b5aad24c30e4a1357b38cc39aeaa.jpg?s=120&d=mm&r=g)
Stefan Behnel schrieb am 17.09.2017 um 13:06:
I just released lxml 4.0.0 with several new features. Windows wheels took a little longer to build, but all binary packages are uploaded now, using the latest libxml2 2.9.5 and libxslt 1.1.30. This will hopefully resolve the schema/parsing/whatnot problems that the previous binary releases suffered from.
Have fun! Stefan
![](https://secure.gravatar.com/avatar/b8068a88d2830f8004d71b74fae4d41c.jpg?s=120&d=mm&r=g)
Do we have windows 64 bit available for the same? lxml-4.0.0.win-amd64-py2.7.exe? Kindly get back. Regards, Swarnalatha K On Mon, Sep 18, 2017 at 11:24 AM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Stefan Behnel schrieb am 17.09.2017 um 13:06:
I just released lxml 4.0.0 with several new features. Windows wheels took a little longer to build, but all binary packages are uploaded now, using the latest libxml2 2.9.5 and libxslt 1.1.30. This will hopefully resolve the schema/parsing/whatnot problems that the previous binary releases suffered from.
Have fun!
Stefan _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
![](https://secure.gravatar.com/avatar/3a93c5a0f975385738c1f27848f3b50a.jpg?s=120&d=mm&r=g)
Am .09.2017, 15:53 Uhr, schrieb Swarnalatha Kannan <swarna298@gmail.com>:
Do we have windows 64 bit available for the same? lxml-4.0.0.win-amd64-py2.7.exe? Kindly get back.
Have a look for yourself: https://pypi.org/project/lxml/#files Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Kronenstr. 27a Düsseldorf D- 40217 Tel: +49-211-600-3657 Mobile: +49-178-782-6226
![](https://secure.gravatar.com/avatar/8b97b5aad24c30e4a1357b38cc39aeaa.jpg?s=120&d=mm&r=g)
Swarnalatha Kannan schrieb am 18.09.2017 um 15:53:
Do we have windows 64 bit available for the same? lxml-4.0.0.win-amd64-py2.7.exe? Kindly get back.
Actually, I just checked and saw that the Py2.7 build still uses the libxml2 2.7.8 libs from here: ftp://ftp.zlatkovic.com/pub/libxml/ While that site also has 64bit libraries, it's only version 0.9.3. Sorry, there isn't currently a binary with recent libraries for Py2.7 on Windows. The wheels by Christoph Gohlke probably use 2.9.3 currently, but I don't know. http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml Failing that, you can try and see if you can get anything working for you with the libraries built here: https://github.com/mhils/libxml2-win-binaries/releases Stefan
![](https://secure.gravatar.com/avatar/b8068a88d2830f8004d71b74fae4d41c.jpg?s=120&d=mm&r=g)
Team, I was able to successfully build lxml-4.0.0.win-amd64-py2.7.exe from the sources. Thanks a lot for all your help. I can share the exe if its useful to someone. Let me know. Special thanks to Mr. Stefan Behnel for all his help and suggestions. Basically I am not a Python developer. I started supporting a python project recently and start learning the environment. Once again thanks to all lxml team members for the support. Following sources were used for the same. iconv-1.14.vs2008.win64 libxml2-2.9.5.vs2008.win64 libxslt-1.1.30.vs2008.win64 zlib-1.2.11.vs2008.win64 (Got the sources from this link https://github.com/mhils/ libxml2-win-binaries/releases) Regards, Swarna On Mon, Sep 18, 2017 at 10:06 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Swarnalatha Kannan schrieb am 18.09.2017 um 15:53:
Do we have windows 64 bit available for the same? lxml-4.0.0.win-amd64-py2.7.exe? Kindly get back.
Actually, I just checked and saw that the Py2.7 build still uses the libxml2 2.7.8 libs from here:
ftp://ftp.zlatkovic.com/pub/libxml/
While that site also has 64bit libraries, it's only version 0.9.3.
Sorry, there isn't currently a binary with recent libraries for Py2.7 on Windows.
The wheels by Christoph Gohlke probably use 2.9.3 currently, but I don't know.
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
Failing that, you can try and see if you can get anything working for you with the libraries built here:
https://github.com/mhils/libxml2-win-binaries/releases
Stefan _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
![](https://secure.gravatar.com/avatar/b8068a88d2830f8004d71b74fae4d41c.jpg?s=120&d=mm&r=g)
Kindly share me the path. I couldnt find it out. Thanks. Regards, Swarna On Tue, Sep 19, 2017 at 12:47 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Swarnalatha Kannan schrieb am 18.09.2017 um 15:53:
Do we have windows 64 bit available for the same? lxml-4.0.0.win-amd64-py2.7.exe? Kindly get back.
Available now, built with libxml2 2.9.5 and libxslt 1.1.30. Untested, but hopefully working.
Stefan _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
![](https://secure.gravatar.com/avatar/b8068a88d2830f8004d71b74fae4d41c.jpg?s=120&d=mm&r=g)
I could see only .whl file in this location for python 2.7. I am interested in windows 64 bit .exe for the same. http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml Regards, Swarna On Tue, Sep 19, 2017 at 1:38 PM, Swarnalatha Kannan <swarna298@gmail.com> wrote:
Kindly share me the path. I couldnt find it out. Thanks.
Regards, Swarna
On Tue, Sep 19, 2017 at 12:47 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Swarnalatha Kannan schrieb am 18.09.2017 um 15:53:
Do we have windows 64 bit available for the same? lxml-4.0.0.win-amd64-py2.7.exe? Kindly get back.
Available now, built with libxml2 2.9.5 and libxslt 1.1.30. Untested, but hopefully working.
Stefan _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
![](https://secure.gravatar.com/avatar/3a93c5a0f975385738c1f27848f3b50a.jpg?s=120&d=mm&r=g)
Am .09.2017, 10:20 Uhr, schrieb Swarnalatha Kannan <swarna298@gmail.com>:
I could see only .whl file in this location for python 2.7. I am interested in windows 64 bit .exe for the same.
Wheels are the standard format for binary distributions. Really Swarna, do you know anything about Python libraries? -- Charlie Clark Managing Director Clark Consulting & Research German Office Kronenstr. 27a Düsseldorf D- 40217 Tel: +49-211-600-3657 Mobile: +49-178-782-6226
![](https://secure.gravatar.com/avatar/8b97b5aad24c30e4a1357b38cc39aeaa.jpg?s=120&d=mm&r=g)
Swarnalatha Kannan schrieb am 19.09.2017 um 10:20:
I could see only .whl file in this location for python 2.7. I am interested in windows 64 bit .exe for the same.
.whl (or "wheel") is the standard Python packaging format, especially for binary packages. Amongst other features, it uses semantic naming and avoids executing code during the installation. That is a major security advantage, given that the installation usually happens with higher privileges than the later execution. You probably have other packages that your deployment depends on, in which case I recommend changing them all into wheels. This can quickly be done with the "wheel" tool by executing wheel convert installer1.exe installer2.exe ... After that, you can install all your wheels in one go using pip, whether you have them locally or want to retrieve them from PyPI: pip install package1.whl package2.whl a_package_from_pypi ... But instead, you would normally store your dependencies in a requirements.txt file under version control as described here https://pip.readthedocs.io/en/stable/user_guide/#requirements-files and then just say pip install -r requirements.txt See "pip install --help" for options on specifying additional download directories etc. That's it, simple enough. Hope it helps. Stefan
participants (3)
-
Charlie Clark
-
Stefan Behnel
-
Swarnalatha Kannan