lxml.html.open_in_browser fails in Python3

Bug #600482 reported by Matthew Webb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Low
scoder

Bug Description

lxml.html.open_in_browser uses os.tempnam() which was removed in python3 (see
http://docs.python.org/release/3.0.1/whatsnew/3.0.html)

line 1467 of http://codespeak.net/svn/lxml/trunk/src/lxml/html/__init__.py

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/lxml/html/__init__.py", line 1467, in open_in_browser
    fn = os.tempnam() + '.html'
AttributeError: 'module' object has no attribute 'tempnam'

Python : sys.version_info(major=3, minor=1, micro=2, releaselevel='final', serial=0)
lxml.etree : (2, 2, 6, 0)
libxml used : (2, 7, 7)
libxml compiled : (2, 7, 7)
libxslt used : (1, 1, 26)
libxslt compiled : (1, 1, 26)

Revision history for this message
scoder (scoder) wrote :
Changed in lxml:
assignee: nobody → Stefan Behnel (scoder)
importance: Undecided → Low
status: New → Fix Committed
milestone: none → 2.3
Revision history for this message
Matthew Webb (matthew-t-webb) wrote : Re: [Bug 600482] Re: lxml.html.open_in_browser fails in Python3

Fantastic! Thank you. lxml is my hero.

-webb

On Mon, Jul 26, 2010 at 12:46 PM, Stefan Behnel
<email address hidden>wrote:

> Fixed, thanks!
>
> https://codespeak.net/viewvc/?view=rev&revision=76354
>
> ** Changed in: lxml
> Importance: Undecided => Low
>
> ** Changed in: lxml
> Status: New => Fix Committed
>
> ** Changed in: lxml
> Assignee: (unassigned) => Stefan Behnel (scoder)
>
> ** Changed in: lxml
> Milestone: None => 2.3
>
> --
> lxml.html.open_in_browser fails in Python3
> https://bugs.launchpad.net/bugs/600482
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in lxml - the Python XML toolkit: Fix Committed
>
> Bug description:
> lxml.html.open_in_browser uses os.tempnam() which was removed in python3
> (see
> http://docs.python.org/release/3.0.1/whatsnew/3.0.html)
>
> line 1467 of http://codespeak.net/svn/lxml/trunk/src/lxml/html/__init__.py
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/lxml/html/__init__.py",
> line 1467, in open_in_browser
> fn = os.tempnam() + '.html'
> AttributeError: 'module' object has no attribute 'tempnam'
>
>
> Python : sys.version_info(major=3, minor=1, micro=2,
> releaselevel='final', serial=0)
> lxml.etree : (2, 2, 6, 0)
> libxml used : (2, 7, 7)
> libxml compiled : (2, 7, 7)
> libxslt used : (1, 1, 26)
> libxslt compiled : (1, 1, 26)
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/lxml/+bug/600482/+subscribe
>

scoder (scoder)
Changed in lxml:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.