classification
Title: Bug/Patch: Problem with xml/__init__.py when using freeze.py
Type: Stage:
Components: Versions: Python 2.6, Python 2.5
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, glomde, gvanrossum, meatballhat
Priority: low Keywords: easy

Created on 2008-01-31 22:40 by glomde, last changed 2010-08-04 23:53 by terry.reedy. This issue is now closed.

Messages (7)
msg61937 - (view) Author: Toni Brkic (glomde) Date: 2008-01-31 22:40
Hi,

I tried to do freeze.py for my script that uses ElementTree.
But got the this error:

  File "/usr/lib/python2.5/xml/__init__.py", line 45, in <module>
    _xmlplus.__path__.extend(__path__)
  AttributeError: 'str' object has no attribute 'extend'

The reason seems that _xmlplus.__path__ is a string
after freeze.py.

I fixed it by changing the import to:

            try:
                _xmlplus.__path__.extend(__path__)
                sys.modules[__name__] = _xmlplus
            except AttributeError:
                pass

This might not be the correct solution but it works for me. I do not
really now
how the __path__ variable works in a freezed environment.

Best regards
msg61963 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-02-01 16:06
I think nobody really cares about freeze any more -- it isn't maintained.
msg61984 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-02-02 00:14
Should freeze be removed if it's no longer maintained? Freeze is partly
used by py2exe and py2app. Maybe the maintainers of the apps can step in
and maintain the parts of the freeze api they require. The rest could
then be deprecated for Python 2.6 and removed from 3.0.
msg61989 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-02-02 01:45
Why don't you ask that question on python-dev? Maybe someone volunteers!
msg62089 - (view) Author: Toni Brkic (glomde) Date: 2008-02-06 07:57
I still think the __init__ file should be changed and use
the extend_path function instead of extend. 


Se below for answer I got on the python list.


The extend_path function (found in the pkgutil standard module) can handle  
this.
http://docs.python.org/lib/module-pkgutil.html

-- 
Gabriel Genellina
msg70754 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-08-05 18:44
Nobody seems to care enough.
msg112253 - (view) Author: Dan Buch (meatballhat) Date: 2010-08-01 01:55
can this be closed?  I'd do it myself if I had the triage bit :)
History
Date User Action Args
2010-08-04 23:53:58terry.reedysetstatus: open -> closed
resolution: rejected -> wont fix
2010-08-01 01:55:13meatballhatsetnosy: + meatballhat
messages: + msg112253
2008-08-06 13:37:19akuchlingsetkeywords: + easy
2008-08-05 18:44:52gvanrossumsetresolution: rejected
messages: + msg70754
2008-02-06 07:57:11glomdesetmessages: + msg62089
2008-02-02 01:45:16gvanrossumsetmessages: + msg61989
2008-02-02 00:14:57christian.heimessetnosy: + christian.heimes
messages: + msg61984
versions: + Python 2.6, Python 2.5
2008-02-01 16:06:53gvanrossumsetpriority: low
nosy: + gvanrossum
messages: + msg61963
2008-01-31 22:40:53glomdecreate