[ python-Bugs-1427552 ] tarfile.open bug / corrupt data
Bugs item #1427552, was opened at 2006-02-08 14:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris86 (chris86)
Assigned to: Nobody/Anonymous (nobody)
Summary: tarfile.open bug / corrupt data
Initial Comment:
Hi!
I want to create a bz2 compressed tar file.
Here is my code:
full="/home/test/test.sql"
tar = tarfile.open("test.tar.bz2", "w:bz2")
tarinfo = tar.gettarinfo(full,"blubb.sql")
tar.addfile(tarinfo,file(full))
tar.close()
i think this should work, but the sql file is corrupt:
- the created sql file in the compressed tar has only
4745 Lines, the original file has 4753
Regards,
Chris
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1427552 ] tarfile.open bug / corrupt data
Bugs item #1427552, was opened at 2006-02-08 14:13
Message generated for change (Settings changed) made by chris86
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
>Priority: 7
Submitted By: Chris86 (chris86)
Assigned to: Nobody/Anonymous (nobody)
Summary: tarfile.open bug / corrupt data
Initial Comment:
Hi!
I want to create a bz2 compressed tar file.
Here is my code:
full="/home/test/test.sql"
tar = tarfile.open("test.tar.bz2", "w:bz2")
tarinfo = tar.gettarinfo(full,"blubb.sql")
tar.addfile(tarinfo,file(full))
tar.close()
i think this should work, but the sql file is corrupt:
- the created sql file in the compressed tar has only
4745 Lines, the original file has 4753
Regards,
Chris
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1427552 ] tarfile.open bug / corrupt data
Bugs item #1427552, was opened at 2006-02-08 14:13
Message generated for change (Comment added) made by chris86
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 7
Submitted By: Chris86 (chris86)
Assigned to: Nobody/Anonymous (nobody)
Summary: tarfile.open bug / corrupt data
Initial Comment:
Hi!
I want to create a bz2 compressed tar file.
Here is my code:
full="/home/test/test.sql"
tar = tarfile.open("test.tar.bz2", "w:bz2")
tarinfo = tar.gettarinfo(full,"blubb.sql")
tar.addfile(tarinfo,file(full))
tar.close()
i think this should work, but the sql file is corrupt:
- the created sql file in the compressed tar has only
4745 Lines, the original file has 4753
Regards,
Chris
--
>Comment By: Chris86 (chris86)
Date: 2006-02-08 14:15
Message:
Logged In: YES
user_id=1133569
I'm using Python 2.4.2 (#2, Nov 20 2005, 17:04:48)
[GCC 4.0.3 2005 (prerelease) (Debian 4.0.2-4)] on linux2
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1427552 ] tarfile.open bug / corrupt data
Bugs item #1427552, was opened at 2006-02-08 15:13
Message generated for change (Comment added) made by gustaebel
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 7
Submitted By: Chris86 (chris86)
Assigned to: Nobody/Anonymous (nobody)
Summary: tarfile.open bug / corrupt data
Initial Comment:
Hi!
I want to create a bz2 compressed tar file.
Here is my code:
full="/home/test/test.sql"
tar = tarfile.open("test.tar.bz2", "w:bz2")
tarinfo = tar.gettarinfo(full,"blubb.sql")
tar.addfile(tarinfo,file(full))
tar.close()
i think this should work, but the sql file is corrupt:
- the created sql file in the compressed tar has only
4745 Lines, the original file has 4753
Regards,
Chris
--
Comment By: Lars Gustäbel (gustaebel)
Date: 2006-02-08 16:13
Message:
Logged In: YES
user_id=642936
Just to identify whether this is a tarfile or bz2 module
related issue:
- Do you have the same problem without compression or with
gzip compression?
- Have you tried compressing your sql file directly with the
bz2 module?
--
Comment By: Chris86 (chris86)
Date: 2006-02-08 15:17
Message:
Logged In: YES
user_id=1133569
same error with Python 2.3.5 (#2, Aug 30 2005, 15:50:26)
[GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2
--
Comment By: Chris86 (chris86)
Date: 2006-02-08 15:15
Message:
Logged In: YES
user_id=1133569
I'm using Python 2.4.2 (#2, Nov 20 2005, 17:04:48)
[GCC 4.0.3 2005 (prerelease) (Debian 4.0.2-4)] on linux2
--
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427552&group_id=5470
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1424171 ] patch for etree cdata and attr quoting
Bugs item #1424171, was opened at 2006-02-04 13:23 Message generated for change (Comment added) made by chrism You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1424171&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: XML Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Chris McDonough (chrism) Assigned to: Fredrik Lundh (effbot) Summary: patch for etree cdata and attr quoting Initial Comment: Attached is a patch for ElementTree (based on a checkout from the SVN trunk's xmlcore.etree) that seems to perform better escaping of cdata and attribute values. Instead of replacing, for example ""e;" with ""e;" or "&" with "&", it tries to avoid requoting ampersands in things that look like entities. Sorry, I haven't tested this with anything except Python 2.4, I'm not quite sure what to do about _encode_entity, and I haven't patched any tests or written a new one for this change. Consider this more of a RFC than a patch ready-for-submission as a result. -- >Comment By: Chris McDonough (chrism) Date: 2006-02-08 12:00 Message: Logged In: YES user_id=32974 Doh, of course. Sorry, I suspect I'll need to go to remedial XML class. Ignore this. -- Comment By: Fredrik Lundh (effbot) Date: 2006-02-06 16:55 Message: Logged In: YES user_id=38376 I'm not sure I follow. ET works on the infoset side of things, where everything is decoded into Unicode strings (or compatible ASCII strings). If you set an attribute to "&" in the infoset, it *must* be encoded on the way out. If you want an ampersand, use "&". -- Comment By: Chris McDonough (chrism) Date: 2006-02-04 15:23 Message: Logged In: YES user_id=32974 Egads, I did this time. -- Comment By: Georg Brandl (birkenfeld) Date: 2006-02-04 13:29 Message: Logged In: YES user_id=1188172 OP: You did check the box? -- Comment By: Chris McDonough (chrism) Date: 2006-02-04 13:26 Message: Logged In: YES user_id=32974 Sorry, the tracker doesn't seem to want to allow me to upload the file. See http://www.plope.com/static/misc/betterescape.patch for the patch. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1424171&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1427789 ] List not initialized if used as default argument
Bugs item #1427789, was opened at 2006-02-08 13:55 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Jason (griminventions) Assigned to: Nobody/Anonymous (nobody) Summary: List not initialized if used as default argument Initial Comment: class A( object ): def __init__( self, someList = [] ): self.someList = someList if __name__ == "__main__": for i in range( 10 ): a = A() a.someList.append( "abc" ) print a.someList Instead of each instance of A getting an empty list, it is somehow the same list as the previous instance of A. It will not occur with the following change: class A( object ): def __init__( self ): self.someList = [] I'm using Windows XP, Python 2.4.1. [EMAIL PROTECTED] -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1427789 ] List not initialized if used as default argument
Bugs item #1427789, was opened at 2006-02-08 19:55 Message generated for change (Settings changed) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Jason (griminventions) Assigned to: Nobody/Anonymous (nobody) Summary: List not initialized if used as default argument Initial Comment: class A( object ): def __init__( self, someList = [] ): self.someList = someList if __name__ == "__main__": for i in range( 10 ): a = A() a.someList.append( "abc" ) print a.someList Instead of each instance of A getting an empty list, it is somehow the same list as the previous instance of A. It will not occur with the following change: class A( object ): def __init__( self ): self.someList = [] I'm using Windows XP, Python 2.4.1. [EMAIL PROTECTED] -- >Comment By: Georg Brandl (birkenfeld) Date: 2006-02-08 20:13 Message: Logged In: YES user_id=1188172 This is intended behavior. Default values for function arguments are only evaluated once, so it's not advisable to use mutables there. Use None as default and create your empty list within the constructor if None is given, as in your second example. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1427789 ] List not initialized if used as default argument
Bugs item #1427789, was opened at 2006-02-08 19:55 Message generated for change (Comment added) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.4 Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Jason (griminventions) Assigned to: Nobody/Anonymous (nobody) Summary: List not initialized if used as default argument Initial Comment: class A( object ): def __init__( self, someList = [] ): self.someList = someList if __name__ == "__main__": for i in range( 10 ): a = A() a.someList.append( "abc" ) print a.someList Instead of each instance of A getting an empty list, it is somehow the same list as the previous instance of A. It will not occur with the following change: class A( object ): def __init__( self ): self.someList = [] I'm using Windows XP, Python 2.4.1. [EMAIL PROTECTED] -- >Comment By: Georg Brandl (birkenfeld) Date: 2006-02-08 20:13 Message: Logged In: YES user_id=1188172 This is intended behavior. Default values for function arguments are only evaluated once, so it's not advisable to use mutables there. Use None as default and create your empty list within the constructor if None is given, as in your second example. -- Comment By: Georg Brandl (birkenfeld) Date: 2006-02-08 20:13 Message: Logged In: YES user_id=1188172 This is intended behavior. Default values for function arguments are only evaluated once, so it's not advisable to use mutables there. Use None as default and create your empty list within the constructor if None is given, as in your second example. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1427789 ] List not initialized if used as default argument
Bugs item #1427789, was opened at 2006-02-08 13:55 Message generated for change (Comment added) made by goodger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.4 Status: Closed Resolution: Invalid Priority: 5 Submitted By: Jason (griminventions) Assigned to: Nobody/Anonymous (nobody) Summary: List not initialized if used as default argument Initial Comment: class A( object ): def __init__( self, someList = [] ): self.someList = someList if __name__ == "__main__": for i in range( 10 ): a = A() a.someList.append( "abc" ) print a.someList Instead of each instance of A getting an empty list, it is somehow the same list as the previous instance of A. It will not occur with the following change: class A( object ): def __init__( self ): self.someList = [] I'm using Windows XP, Python 2.4.1. [EMAIL PROTECTED] -- >Comment By: David Goodger (goodger) Date: 2006-02-08 14:15 Message: Logged In: YES user_id=7733 This is not a bug. Default values are evaluated when the "def" statement is evaluated, at compile time. See http://www.python.org/doc/faq/general.html#why-are-default-values-shared-between-objects -- Comment By: Georg Brandl (birkenfeld) Date: 2006-02-08 14:13 Message: Logged In: YES user_id=1188172 This is intended behavior. Default values for function arguments are only evaluated once, so it's not advisable to use mutables there. Use None as default and create your empty list within the constructor if None is given, as in your second example. -- Comment By: Georg Brandl (birkenfeld) Date: 2006-02-08 14:13 Message: Logged In: YES user_id=1188172 This is intended behavior. Default values for function arguments are only evaluated once, so it's not advisable to use mutables there. Use None as default and create your empty list within the constructor if None is given, as in your second example. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1427789 ] List not initialized if used as default argument
Bugs item #1427789, was opened at 2006-02-08 13:55 Message generated for change (Comment added) made by dstanek You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.4 Status: Closed Resolution: Invalid Priority: 5 Submitted By: Jason (griminventions) Assigned to: Nobody/Anonymous (nobody) Summary: List not initialized if used as default argument Initial Comment: class A( object ): def __init__( self, someList = [] ): self.someList = someList if __name__ == "__main__": for i in range( 10 ): a = A() a.someList.append( "abc" ) print a.someList Instead of each instance of A getting an empty list, it is somehow the same list as the previous instance of A. It will not occur with the following change: class A( object ): def __init__( self ): self.someList = [] I'm using Windows XP, Python 2.4.1. [EMAIL PROTECTED] -- Comment By: David Stanek (dstanek) Date: 2006-02-08 14:18 Message: Logged In: YES user_id=260643 This is actually correct behavior. See the "Important Warning" in this section of the tutorial: http://docs.python.org/tut/node6.html#SECTION00671 -- Comment By: David Goodger (goodger) Date: 2006-02-08 14:15 Message: Logged In: YES user_id=7733 This is not a bug. Default values are evaluated when the "def" statement is evaluated, at compile time. See http://www.python.org/doc/faq/general.html#why-are-default-values-shared-between-objects -- Comment By: Georg Brandl (birkenfeld) Date: 2006-02-08 14:13 Message: Logged In: YES user_id=1188172 This is intended behavior. Default values for function arguments are only evaluated once, so it's not advisable to use mutables there. Use None as default and create your empty list within the constructor if None is given, as in your second example. -- Comment By: Georg Brandl (birkenfeld) Date: 2006-02-08 14:13 Message: Logged In: YES user_id=1188172 This is intended behavior. Default values for function arguments are only evaluated once, so it's not advisable to use mutables there. Use None as default and create your empty list within the constructor if None is given, as in your second example. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1427789&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1425482 ] msvccompiler.py modified to work with .NET 2005 on win64
Bugs item #1425482, was opened at 2006-02-06 19:28 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1425482&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Build Group: Platform-specific >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: beaudrym (beaudrym) Assigned to: Nobody/Anonymous (nobody) Summary: msvccompiler.py modified to work with .NET 2005 on win64 Initial Comment: Hi, I tried to compile and install pywin32 (python extension) using Microsoft Visual Studio .NET 2005. This was done on a AMD64 platform which had Python 2.4.2.10 installed (from www.activestate.com). When I try to compile pywin32, it uses the file msvccompiler.py that comes with python. For the compilation to work, I had to modify msvccompiler.py. I attached a patch file of my modifications. Basically, I had to modify two things: 1 - use .NET framework 2.0 when 1.1 is not found. 2 - use environment variables "path", "lib" and "included" already defined in console when compiling with Visual Studio 8.0. See comments in patch file for more details. Let me know if these patches look reasonable to you. Regards, Maxime -- >Comment By: Martin v. Löwis (loewis) Date: 2006-02-08 20:36 Message: Logged In: YES user_id=21627 Please report this to ActiveState - currently, there is not a supported AMD64 distribution from python.org. If it ever is, it is likely that your patch will be incorrect: I'm currently planning to use the Platform SDK compiler for AMD64 binaries, instead of VS2005. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1425482&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1409403 ] email.Message should supress warning from uu.decode
Bugs item #1409403, was opened at 2006-01-18 15:55 Message generated for change (Comment added) made by bwarsaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1409403&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Mark Sapiro (msapiro) Assigned to: Barry A. Warsaw (bwarsaw) Summary: email.Message should supress warning from uu.decode Initial Comment: part.get_payload(decode=True) of a uuencoded email.Message() sub-part can result in warning messages being written to sys.stderr. These warnings occur when pad characters other than encoded zeros were used to fill out the last encoded line to a multiple of 4 characters (+1 for the count character). Such non-zero padded encoded parts are produced by some current versions of Eudora and perhaps other MUAs. The warnings are unnecessary in this case and cause problems for other software, e.g., Mailman. get_payload(decode=True) calls uu.decode to actually decode the part payload. It should specify the quiet=True flag in this call to supress the warning. A suggested patch against Python 2.4.2 is attached. -- >Comment By: Barry A. Warsaw (bwarsaw) Date: 2006-02-08 23:04 Message: Logged In: YES user_id=12800 r42279 for email 2.5, although we have to be more elaborate since Python 2.1's uu.decode() does not have a 'quiet' flag. When I port this to Python 2.4 and 2.5, I will implement the fix as given since we won't need the sneakiness. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1409403&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
