[issue1091] [patch] py3k Mac installation errors
New submission from Humberto Diogenes: This patch addresses 3 simple errors (1 syntax, 1 runtime, 1 import) when doing a "make altinstall" on Mac OS X, including the error listed in issue 1078. -- components: Installation, Macintosh files: py3k-mac-install-1.patch messages: 55596 nosy: hdiogenes severity: normal status: open title: [patch] py3k Mac installation errors type: compile error versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1091> __Index: Mac/scripts/cachersrc.py === --- Mac/scripts/cachersrc.py(revision 57880) +++ Mac/scripts/cachersrc.py(working copy) @@ -12,7 +12,8 @@ class NoArgsError(Exception): pass -def handler((verbose, force), dirname, fnames): +def handler(arg1, dirname, fnames): +verbose, force = arg1 for fn in fnames: if fn[-5:] == '.rsrc' and fn[-13:] != '.rsrc.df.rsrc': if force: Index: Lib/plat-mac/macresource.py === --- Lib/plat-mac/macresource.py (revision 57880) +++ Lib/plat-mac/macresource.py (working copy) @@ -76,15 +76,15 @@ AppleSingle file""" try: refno = Res.FSpOpenResFile(pathname, 1) -except Res.Error as arg: -if arg[0] in (-37, -39): +except Res.Error as error: +if error.args[0] in (-37, -39): # No resource fork. We may be on OSX, and this may be either # a data-fork based resource file or a AppleSingle file # from the CVS repository. try: refno = Res.FSOpenResourceFile(pathname, '', 1) -except Res.Error as arg: -if arg[0] != -199: +except Res.Error as error: +if error.args[0] != -199: # -199 is "bad resource map" raise else: @@ -103,15 +103,15 @@ try: refno = Res.FSpOpenResFile(pathname, 1) Res.CloseResFile(refno) -except Res.Error as arg: -if arg[0] in (-37, -39): +except Res.Error as error: +if error.args[0] in (-37, -39): # No resource fork. We may be on OSX, and this may be either # a data-fork based resource file or a AppleSingle file # from the CVS repository. try: refno = Res.FSOpenResourceFile(pathname, '', 1) -except Res.Error as arg: -if arg[0] != -199: +except Res.Error as error: +if error.args[0] != -199: # -199 is "bad resource map" raise else: Index: Lib/plat-mac/Carbon/ControlAccessor.py === --- Lib/plat-mac/Carbon/ControlAccessor.py (revision 57880) +++ Lib/plat-mac/Carbon/ControlAccessor.py (working copy) @@ -1,6 +1,6 @@ # Accessor functions for control properties -from Controls import * +from Carbon.Controls import * import struct # These needn't go through this module, but are here for completeness ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1091] [patch] py3k Mac installation errors
Humberto Diogenes added the comment: One more patch, for: 1. Writing str to binary file; 2. Using string exceptions. Traceback for #2: /usr/bin/install -c -s ../python.exe "/Library/Frameworks/Python.framework/Versions/3.0/Resources/Python.app/ Contents/MacOS/Python" DYLD_FRAMEWORK_PATH=/Users/humberto/src/open/py3k: ../python.exe ./scripts/BuildApplet.py \ --destroot "" \ --python /Library/Frameworks/Python.framework/Versions/3.0/Resources/Python.app/C ontents/MacOS/Python \ --output "/Applications/MacPython 3.0/Build Applet.app" \ ./scripts/BuildApplet.py ./scripts/BuildApplet.py:16: DeprecationWarning: the buildtools module is deprecated import buildtools Traceback (most recent call last): File "./scripts/BuildApplet.py", line 149, in main() File "./scripts/BuildApplet.py", line 34, in main except buildtools.BuildError as detail: TypeError: catching classes that do not inherit from BaseException is not allowed make[1]: *** [install_BuildApplet] Error 1 make: *** [frameworkinstallapps] Error 2 After applying those two attached patches, I was able to succesfully run "make altinstall" (not without some other warnings, though). __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1091> __Index: Lib/plat-mac/buildtools.py === --- Lib/plat-mac/buildtools.py (revision 57912) +++ Lib/plat-mac/buildtools.py (working copy) @@ -17,7 +17,8 @@ warnings.warn("the buildtools module is deprecated", DeprecationWarning, 2) -BuildError = "BuildError" +class BuildError(BaseException): +pass # .pyc file (and 'PYC ' resource magic number) MAGIC = imp.get_magic() Index: Lib/plat-mac/bundlebuilder.py === --- Lib/plat-mac/bundlebuilder.py (revision 57912) +++ Lib/plat-mac/bundlebuilder.py (working copy) @@ -180,8 +180,9 @@ assert len(self.type) == len(self.creator) == 4, \ "type and creator must be 4-byte strings." pkginfo = pathjoin(contents, "PkgInfo") +data = bytes(self.type + self.creator, encoding='ascii') f = open(pkginfo, "wb") -f.write(self.type + self.creator) +f.write(data) f.close() # # Write Contents/Info.plist ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1091] [patch] py3k Mac installation errors
Humberto Diogenes added the comment: Patch 3: some more trivial fixes: new syntax for print() and octal numbers. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1091> __Index: Mac/PythonLauncher/Makefile.in === --- Mac/PythonLauncher/Makefile.in (revision 57912) +++ Mac/PythonLauncher/Makefile.in (working copy) @@ -78,4 +78,4 @@ $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon Info.plist: $(srcdir)/Info.plist.in - sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist + sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist Index: Mac/IDLE/Makefile.in === --- Mac/IDLE/Makefile.in(revision 57912) +++ Mac/IDLE/Makefile.in(working copy) @@ -55,5 +55,5 @@ Info.plist: $(srcdir)/Info.plist.in - sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist + sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist Index: Mac/Tools/fixapplepython23.py === --- Mac/Tools/fixapplepython23.py (revision 57912) +++ Mac/Tools/fixapplepython23.py (working copy) @@ -80,11 +80,11 @@ """Create a wrapper script for a compiler""" dirname = os.path.split(filename)[0] if not os.access(dirname, os.X_OK): -os.mkdir(dirname, 0755) +os.mkdir(dirname, 0o755) fp = open(filename, 'w') fp.write(SCRIPT % compiler) fp.close() -os.chmod(filename, 0755) +os.chmod(filename, 0o755) print('fixapplepython23: Created', filename) def main(): ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1091] py3k Mac installation errors
Humberto Diogenes added the comment: And thanks for accepting them! (without complaining about my errors :-) __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1091> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1099] Mac compile fails with pydebug and framework enabled
New submission from Humberto Diogenes: Running this on Mac OS X: $ ./configure --with-pydebug --enable-framework $ make I get this: (...) ar cr libpython3.0.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o ar cr libpython3.0.a Modules/threadmodule.o Modules/signalmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_fileio.o Modules/zipimport.o Modules/symtablemodule.o Modules/xxsubtype.o ranlib libpython3.0.a /usr/bin/install -c -d -m 755 Python.framework/Versions/3.0 if test ""; then \ gcc -o Python.framework/Versions/3.0/Python -arch i386 -arch ppc -dynamiclib \ -isysroot "" \ -all_load libpython3.0.a -Wl,-single_module \ -install_name /Library/Frameworks/Python.framework/Versions/3.0/Python \ -compatibility_version 3.0 \ -current_version 3.0; \ else \ /usr/bin/libtool -o Python.framework/Versions/3.0/Python -dynamic libpython3.0.a \ -lSystem -lSystemStubs -arch_only i386 -install_name /Library/Frameworks/Python.framework/Versions/3.0/Python -compatibility_version 3.0 - current_version 3.0 ;\ fi ld: Undefined symbols: ___eprintf /usr/bin/libtool: internal link edit command failed make: *** [Python.framework/Versions/3.0/Python] Error 1 If using only --with-pydebug it works fine. -- components: Build, Macintosh messages: 55631 nosy: hdiogenes severity: normal status: open title: Mac compile fails with pydebug and framework enabled versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1099> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1099] Mac compile fails with pydebug and framework enabled
Humberto Diogenes added the comment: I'm using these versions: intel: macosx 10.4.10, xcode 2.4.1 (gcc 4.0.1 build 5367) Tried again with current revision (58153) and with --enable-universalsdk it built just fine. Without it, I still get the same error. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1099> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11463] IncompleteRead: IncompleteRead(168 bytes read)
Humberto Diogenes added the comment: Luís, please analyse the response from the web server to see if it really is a valid HTTP response - AFAIK CPanel web services do not always give valid HTTP responses. -- components: +Library (Lib) type: resource usage -> behavior ___ Python tracker <http://bugs.python.org/issue11463> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10938] Undocumented option for datetime.strftime: %s
New submission from Humberto Diogenes : On some systems, datetime.strftime() accepts a %s format string that returns epoch / UNIX timestamp, but this behavior is not documented at http://docs.python.org/library/datetime.html Python 2.7 (r27:82508, Jul 3 2010, 21:12:11) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.datetime.now().strftime('%s') '1295376929' -- assignee: docs@python components: Documentation messages: 126481 nosy: docs@python, hdiogenes priority: normal severity: normal status: open title: Undocumented option for datetime.strftime: %s versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue10938> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10938] Undocumented option for datetime.strftime: %s
Humberto Diogenes added the comment: David, as discussed on the IRC channel: maybe we could just add pointers to the OS-specific docs. Something like: """ If you want to use platform-specific format strings, search for strftime in your OS documentation (`man strftime` on POSIX systems). Linux: http://www.kernel.org/doc/man-pages/online/pages/man3/strftime.3.html Mac OS: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/strftime.3.html """ -- ___ Python tracker <http://bugs.python.org/issue10938> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2849] Remove usage of rfc822 from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: A quick search for rfc822 imports in py3k reveals this: $ find . -name '*.py' | xargs egrep -nr '(from|import) rfc822' ./Demo/scripts/mboxconvert.py:7:import rfc822 ./Lib/cgi.py:39:import rfc822 ./Lib/mimetools.py:5:import rfc822 ./Lib/test/test_rfc822.py:1:import rfc822 ./Lib/test/test_urllib2.py:587:import rfc822, socket ./Tools/faqwiz/faqwiz.py:210:import rfc822 ./Tools/scripts/mailerdaemon.py:3:import rfc822 ./Tools/versioncheck/pyversioncheck.py:2:import rfc822 The real "release blockers" should be cgi, mimetools and test_urllib2. -- nosy: +hdiogenes __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2849> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2849] Remove usage of rfc822 from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Correction: mimetools is also being removed from py3k (issue 2848). __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2849> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2849] Remove usage of rfc822 from the stdlib
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10375/remove_rfc822-test_urllib2.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2849> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2849] Remove usage of rfc822 from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Tried to just replace rfc822.Message with email.message_from_file in cgi.py but it didn't work. I still have to figure out how to fix FieldStorage.read_multi. Added file: http://bugs.python.org/file10376/remove_rfc822-cgi-incomplete.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2849> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3007] Remove old StringIO docs
New submission from Humberto Diogenes <[EMAIL PROTECTED]>: StringIO was merged into the `io` module, but the old stringio.rst docs are still there. -- assignee: georg.brandl components: Documentation files: io.stringio-docs.patch keywords: patch messages: 67515 nosy: georg.brandl, hdiogenes severity: normal status: open title: Remove old StringIO docs versions: Python 3.0 Added file: http://bugs.python.org/file10472/io.stringio-docs.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3007> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3007] Remove old StringIO docs
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10473/remove-stringio.rst.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3007> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2918] Merge StringIO/cStringIO in 3.0
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: -- nosy: +hdiogenes ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2918> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2849] Remove usage of rfc822 from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Seems that removing rfc822 from `cgi` is not an easy task -- please see issue 1112856. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2849> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2849] Remove usage of rfc822 from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Added a patch that successfully removes rfc822 dependency from the cgi module, using ideas from issue 1112856. I had to change one test, as the email FeedParser ignores trailing spaces in subparts. -- keywords: +patch Added file: http://bugs.python.org/file10494/remove_rfc822_from_cgi.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2849> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1112856] patch 1079734 broke cgi.FieldStorage w/ multipart post req.
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: > Er - while reverting it makes the code work again, I'm > _really_ unhappy with this as a long-term solution. I've addressed almost everything that's discussed here in issue 2849, implementing Josh's suggestion of using FeedParser. It removes rfc822 (but not mimetools [yet]) dependency from the cgi module, without the parsing problem pointed by cgibug.py and without hanging, as shown in server.py + post.html. Also, preliminary tests revealed that the new FieldStorage.read_multi is about 10 times faster than the old one. -- nosy: +hdiogenes ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1112856> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2849] Remove usage of rfc822 from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: With the attached patches, rfc822 won't be used anywhere inside Lib/ anymore (with the exception of mimetools, which is going away too). Is there any reason to convert the files below? Shouldn't they be removed from 3.0? Demo/scripts/mboxconvert.py -> superseded by mailbox.py Tools/faqwiz/faqwiz.py -> really old (1998) Tools/scripts/mailerdaemon.py -> still useful? Tools/versioncheck/pyversioncheck.py -> really old (1997) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2849> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: The only use of mimetools inside cgi is in parse_multipart, which is untested and has huge warnings like these ones: """ XXX This does not parse nested multipart parts -- use FieldStorage for that. XXX This should really be subsumed by FieldStorage altogether -- no point in having two implementations of the same parsing algorithm. Also, FieldStorage protects itself better against certain DoS attacks by limiting the size of the data read in one chunk. The API here does not support that kind of protection. This also affects parse() since it can call parse_multipart(). """ -- nosy: +hdiogenes ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: I'm sending a patch that removes mimetools from urllib and test_urllib. It now returns an email.message.Message instead of mimetools.Message. I also moved some imports to the top of the file. If that's a problem, I can send another patch. -- keywords: +patch Added file: http://bugs.python.org/file10515/remove_mimetools_from_urllib.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10516/remove_mimetools_from_urllib.patch-2 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10515/remove_mimetools_from_urllib.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: It's relatively easy to replace mimetools in most places: it's just a matter of changing mimetools.Message to email.message_from_file, but it gets a lot more complicated when there's inheritance involved. The problem is that mimetools.Message is both a parser and a Message representation, and AFAIK there's no single class in ``email`` which does both -- the functionality is split between the Parser and Message classes. Inheritance happens in two places: ``pydoc.Message`` and ``http.client.HTTPMessage``, and I couldn't find a solution for those cases yet. Any help would be appreciated. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10537/email.parser-small_fix.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Attached a patch to rename all calls to the mimetools-specific .getheader() to .get(), which works on both libraries (mimetools and email.Message). That eases transition without breaking any tests. Added file: http://bugs.python.org/file10538/replace_getheaders_by_get.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: As we're moving away from using .getheader() everywhere (file 10538), I think it's a good time to make HTTPResponse conform to PEP8 and define .get_header (with underscore) instead. Added file: http://bugs.python.org/file10541/rename_HTTPResponse.getheaders.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Raymond, thanks for the parser solution! It worked -- just broke some tests because of the nature of FeedParser. While rfc822.Message can read the file and stop at some point in the middle (meaning that self.fp can still be read), FeedParser will always read the whole file *and* close it, even if setting _headersonly to True. This is the same problem that I had to work around on issue 2849. I'm attaching a patch that demonstrates it: lots of tests giving "I/O operation on closed file." Right now I can think of two options: * Working around it, again (don't know how) * Implement some flag in FeedParser to make it consume only the headers and leave the file open. Any other idea? Oh, and if you think it's better not to mess with the name of other methods like getheader, that's fine by me. It was only a suggestion, after all. ;) Added file: http://bugs.python.org/file10542/remove_mimetools_from_http.client.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: mimetools removal is almost complete, with the exception of only two broken tests: test_urllib2_localnet and test_xmlrpc. I'm not sure if it can make it to this beta, but at least it's really close. Added file: http://bugs.python.org/file10583/remove_mimetools.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2848> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2849] Remove usage of rfc822 from the stdlib
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: [msg68060] >> Why does it need to be in 2.6? mimetools is still there. > > I guess you're right, it doesn't. So, does it make sense to backport this too? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2849> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3150] multiprocessing module not being installed
New submission from Humberto Diogenes <[EMAIL PROTECTED]>: The new multiprocessing module is not being installed: $ python3.0 Python 3.0b1+ (py3k:64417, Jun 19 2008, 21:25:46) [GCC 4.0.1 (Apple Inc. build 5483)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing Traceback (most recent call last): File "", line 1, in ImportError: No module named multiprocessing >>> After adding it to Makefile.pre.in and rebuilding/reinstalling: $ python3.0 Python 3.0b1+ (py3k:64417M, Jun 19 2008, 22:50:25) [GCC 4.0.1 (Apple Inc. build 5483)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>> -- components: Installation files: install_multiprocessing.patch keywords: patch messages: 68439 nosy: hdiogenes severity: normal status: open title: multiprocessing module not being installed versions: Python 3.0 Added file: http://bugs.python.org/file10665/install_multiprocessing.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3150> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3150] multiprocessing module not being installed
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Jesse, not install, but altinstall: sudo rm -fr /usr/local/lib/python3.0 make clean make && sudo make altinstall Forgot to mention that it was originally reported by Rodrigo Fenrrir. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3150> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1180470] BaseHTTPServer uses deprecated mimetools.Message
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: This was solved in Python 3.0: http.server now uses email.parser (issue2848), which is not vulnerable to the DoS attack mentioned by Nick. Should we backport these changes to 2.6? As HTTPMessage's base class was changed to email.message, additional work would be necessary to maintain API compatibility (ie.: implementing an interface similar to mimetools.Message in HTTPMessage). -- nosy: +hdiogenes ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1180470> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: The patch is not applying cleanly. BTW, urlparse has been renamed to urllib.parse, but the old docs are still there (urlparse.rst). -- nosy: +hdiogenes ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue600362] relocate cgi.parse_qs() into urlparse
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Correction: the patch does apply cleanly to 2.6, without breaking tests. It just needs to be ported to 3.0 (new urllib package). ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue600362> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1883] Adapt pydoc to new doc system
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: It looks like there are no automated tests for pydoc; it's even listed in test_sundry.py. There's only one file Lib/test/pydocfodder.py which defines "Something just to look at via pydoc", but isn't used anywhere (I grepped and found nothing). I've attached a patch just to document one point where pydoc behavior differs from 2.5 to 3.0: describe() used to return 'instance of ClassX', now it returns only 'ClassX' (which means this test will pass in 2.5 but not in 3.0). Functions main and test_main were copied from test_modulefinder. -- keywords: +patch nosy: +hdiogenes Added file: http://bugs.python.org/file10082/py3k-test_pydoc.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1883> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1883] Adapt pydoc to new doc system
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Amaury, seems that there's duplicated from render_doc inside pydoc.doc. I removed it and everything kept working, including the new basic tests. Added file: http://bugs.python.org/file10103/py3k-pydoc.doc-cleanup.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1883> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1883] Adapt pydoc to new doc system
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: According to Georg, the "adaptation" referred by this issue is just about changing the URLs in the documentation to point appropriately to the URLs generated by the new doc system. Anyway, the doc-cleanup.patch is still pending... ;) __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1883> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue756982] mailbox should use email not rfc822
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: synx's patch wasn't applying cleanly and broke 2 maildir tests. I'm posting one with updated tests and documentation. Still need to get rid of rfc822 in test_mailbox, though. Question: mailbox.py has one section marked as "classes from the original module (for backward compatibility)". Shouldn't these be removed in py3k? -- nosy: +hdiogenes Added file: http://bugs.python.org/file10272/mailbox.py.patch2 Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue756982> ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1581906] test_sqlite fails on OS X if test_ctypes is run
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Skip, I had the same problem as you, with the same solution. On a MacBook Pro running Mac OS X 10.5.2, running test_ctypes and test_sqlite together would kill my machine. Found another installation of sqlite3 on /usr/local, removed it and now the test works fine. -- nosy: +hdiogenes title: test_sqlite fails on OSX G5 arch if test_ctypes is run -> test_sqlite fails on OS X if test_ctypes is run _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1581906> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2814] Remove old classes from mailbox module
New submission from Humberto Diogenes <[EMAIL PROTECTED]>: mailbox.py has one section marked as "classes from the original module (for backward compatibility)", which are all listed as deprecated in the module documentation. In issue 756982, A. M. Kuchling agreed that "removing those old classes in 3.0 would be very sensible." I've attached a patch to do that, removing the only test that broke (test_unix_mbox). -- components: Library (Lib) files: mailbox-remove_deprecated_classes.patch keywords: patch messages: 66596 nosy: akuchling, hdiogenes severity: normal status: open title: Remove old classes from mailbox module versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10276/mailbox-remove_deprecated_classes.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2814> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2814] Remove old classes from mailbox module
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10277/mailbox-remove_deprecated_doc.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2814> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue756982] mailbox should use email not rfc822
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: I created issue 2814 with a patch to remove those old classes. Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue756982> ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2775] Implement PEP 3108
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Andrews, this discussion would be more appropriate to the mailing list, but anyway: I believe you're mixing things up. When PEP 3108 says "remove symtable/_symtable", it must be talking only about symtable.py and symtablemodule.c, not symtable.[ch] (used by the compiler). -- nosy: +hdiogenes __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2775> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue756982] mailbox should use email not rfc822
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file10279/mailbox-replace_rfc822.patch Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue756982> ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue756982] mailbox should use email not rfc822
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10272/mailbox.py.patch2 Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue756982> ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue756982] mailbox should use email not rfc822
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: > rfc822 is replaced by None in the patch here; is that safe to do? Yes. That's what mailbox documentation says: Parameter factory is a callable object that accepts a file-like message representation [...] and returns a custom representation. If factory is None, MaildirMessage is used as the default message representation. Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue756982> ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue756982] mailbox should use email not rfc822
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Georg, any special reason for not removing rfc822 references from test_mailbox? That section of the patch was not merged. Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue756982> ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2814] Remove old classes from mailbox module
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: I think we should add a deprecation warning for those classes in 2.6, right? As we're not removing the whole module, what's the right place to put that? On the __init__ method of each class? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2814> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2919] Merge profile/cProfile in 3.0
Humberto Diogenes added the comment: How is this going? -- nosy: +hdiogenes ___ Python tracker <http://bugs.python.org/issue2919> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com