[issue12182] pydoc.py integer division problem
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12182 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12174] Multiprocessing logging levels unclear
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +jnoller, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12164] str.translate docstring doesn't mention that 'table' can be None
Changes by Petri Lehtinen pe...@digip.org: -- keywords: +patch nosy: +petri.lehtinen Added file: http://bugs.python.org/file22122/str_translate_docstring.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass
Justin Warkentin justin.warken...@gmail.com added the comment: Sorry, I haven't had a chance to look at this in a couple days. I've been very busy with work. I'm not sure exactly how to write the test for this, so I don't know that I'd be much help there. One last thing, I was just looking through the commits and I noticed in the NEWS update (http://hg.python.org/cpython/rev/3e3cd0ed82bb/) you have my name as Justin Wark. The last name is actually Warkentin, I just didn't have anything showing that. That's my fault, sorry. I just updated my profile to show my full name. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11109 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12157 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12161] StringIO AttributeError instead of ValueError after close..
Petri Lehtinen pe...@digip.org added the comment: I tested the patch on current 2.7 tip. It works and looks good to me. -- nosy: +benjamin.peterson, petri.lehtinen, pitrou, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12161 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11969] Can't launch multiproccessing.Process on methods
Ram Rachum cool...@cool-rr.com added the comment: Why is this still marked as test needed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11969] Can't launch multiproccessing.Process on methods
Ezio Melotti ezio.melo...@gmail.com added the comment: The test should be a diff against Lib/test/test_multiprocessing.py that adds a unit test. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT
Petri Lehtinen pe...@digip.org added the comment: Should the .pyc/.pyo file writing be disabled altogether if stat() and/or fstat() is not available. In this case, there's no way to check mtimes, right? -- nosy: +brett.cannon, ncoghlan, petri.lehtinen versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
Petri Lehtinen pe...@digip.org added the comment: IMO it should be explained in a comment why getattr is used instead of just self._child_created. Otherwise the patch looks good and useful. -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
STINNER Victor victor.stin...@haypocalc.com added the comment: We can use a class attribute to set the attribute before calling __init__: diff --git a/Lib/subprocess.py b/Lib/subprocess.py --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -664,6 +664,8 @@ _PLATFORM_DEFAULT_CLOSE_FDS = object() class Popen(object): +_child_created = False + def __init__(self, args, bufsize=0, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=_PLATFORM_DEFAULT_CLOSE_FDS, -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
Petri Lehtinen pe...@digip.org added the comment: STINNER Victor wrote: We can use a class attribute to set the attribute before calling __init__: True, this is clever. Will you commit? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
STINNER Victor victor.stin...@haypocalc.com added the comment: True, this is clever. Will you commit? I'm not sure that it's the pythonic way to solve such problem. Can you work on a patch including a test? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
Petri Lehtinen pe...@digip.org added the comment: I'm not sure that it's the pythonic way to solve such problem. Can you work on a patch including a test? Yeah, getattr() might be more Pythonic indeed. How can this be tested? According to the initial report, exceptions raised in __del__ seem to be ignored. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT
STINNER Victor victor.stin...@haypocalc.com added the comment: Does your filesystem store the modification time? Why don't you have/want fstat()? Do you have stat() or a similar function? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12182] pydoc.py integer division problem
Roundup Robot devnull@devnull added the comment: New changeset 7724b53510c4 by Victor Stinner in branch '2.7': Close #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true) http://hg.python.org/cpython/rev/7724b53510c4 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12182 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12182] pydoc.py integer division problem
STINNER Victor victor.stin...@haypocalc.com added the comment: Patch applied, thanks for your patch! -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12182 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12171] Reset method of the incremental encoders of CJK codecs calls the decoder reset function
Walter Dörwald wal...@livinglogic.de added the comment: +1 on the documentation changes. -- nosy: +doerwalter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12171 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12185] Decimal documentation lists first and second arguments, should be self and other
New submission from Eric V. Smith e...@trueblade.com: http://docs.python.org/library/decimal.html In 9.4.2, Decimal objects, some of the methods mention the first and second parameters, when really it should be self and the argument, usually named other and sometimes something more specific. These include: compare_total copy_sign next_toward quantize (argument is exp) rotate scaleb shift It looks this is left over from where the same-named functions are described in the Context objects section. -- assignee: docs@python components: Documentation messages: 136947 nosy: docs@python, eric.smith priority: normal severity: normal status: open title: Decimal documentation lists first and second arguments, should be self and other versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12185 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
Oleg Oshmyan chor...@inbox.lv added the comment: We can use a class attribute to set the attribute before calling __init__ Ah, yes, I thought about adding a class attribute as well, but the class currently does not have any and initializes instance attributes to default values in __init__, so I chose getattr. How can this be tested? According to the initial report, exceptions raised in __del__ seem to be ignored. Exceptions raised in __del__ are printed to sys.stderr, even if it has been reassigned by Python code: import sys, io, subprocess sys.stderr = io.StringIO() subprocess.Popen(fdsa=1) sys.stderr.getvalue() 'Exception AttributeError: \'Popen\' object has no attribute \'_child_created\' in bound method Popen.__del__ of subprocess.Popen object at 0x1006ee710 ignored\nTraceback (most recent call last):\n File stdin, line 1, in module\nTypeError: __init__() got an unexpected keyword argument \'fdsa\'\n' test_generators.py already uses this trick in a test similar to what would be needed for this issue around line 1856. Should I attempt to modify my patch to include a comment and a test? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
STINNER Victor victor.stin...@haypocalc.com added the comment: Should I attempt to modify my patch to include a comment and a test? Yes please, you can use support.captured_stderr() tool. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
Petri Lehtinen pe...@digip.org added the comment: Oleg Oshmyan wrote: Should I attempt to modify my patch to include a comment and a test? Absolutely, go ahead if it's not too much trouble. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12186] readline.replace_history_item still leaks memory
New submission from stefanholek ste...@epy.co.at: This is a continuation of issue #9450. The 'data' element of a history entry may point to an undo list for the entry. When freeing the entry the associated undo list must be freed as well, and 'free(data)' alone does not cut it. I have not found any other use of the 'data' element in all of GNU Readline, so it is safe to assume it is either NULL or an undo list. diff --git a/rl/readline.c b/rl/readline.c index 26ac1e2..c8efd5b 100644 --- a/rl/readline.c +++ b/rl/readline.c @@ -541,8 +541,18 @@ static void _py_free_history_entry(HIST_ENTRY *entry) { - histdata_t data = free_history_entry(entry); - free(data); + UNDO_LIST *undo_list; + UNDO_LIST *release; + + /* A history entry may have an undo_list attached */ + undo_list = (UNDO_LIST *)free_history_entry(entry); + while (undo_list) { + release = undo_list; + undo_list = undo_list-next; + if (release-what == UNDO_DELETE) + free(release-text); + free(release); + } } -- components: Library (Lib) messages: 136951 nosy: stefanholek priority: normal severity: normal status: open title: readline.replace_history_item still leaks memory type: resource usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
Oleg Oshmyan chor...@inbox.lv added the comment: Here is a new patch; please take a look. Do I understand correctly that I should now remove the old one? -- Added file: http://bugs.python.org/file22123/_child_created_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12184] socketserver.ForkingMixin collect_children routine needs to collect only it's children
Charles-François Natali neolo...@free.fr added the comment: In the common case, I don't think that the os.waitpid(0, 0) is the hot spot, but rather this: for child in self.active_children: os.waitpid(child, os.WNOHANG) It's called every time, and it's O(number of active children). os.waitpid(0, 0) is only called when max_children (40) is reached. Also, I'm not sure why it's called without WNOHANG, because that means that we will block until active_children falls below max_children. That's an arbitrary limit, especially since it's not documented. I've written a first draft patch using process group, that removes active_children and max_children. The only slightly tricky part is the call to setpgid from the child and from the parent, to avoid a race where the child could try to join a stale PGID. Note that I assume that setpgid is available on every Unix, since according to http://pubs.opengroup.org/onlinepubs/007908799/xsh/setpgid.html , it's Derived from the POSIX.1-1988 standard. Also, according to buildbots' configure logs, it's available everywhere. -- keywords: +patch Added file: http://bugs.python.org/file22124/ss_wait_group.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12184 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Erik Cederstrand e...@1calendar.dk added the comment: Uploaded patch adding unit tests for %V and %u. Patch is against python2.7 -- Added file: http://bugs.python.org/file22125/test_strptime.py.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Erik Cederstrand e...@1calendar.dk added the comment: Patch by aganders3 doesn't compile. Added comments in review of his patch. Adding a patch against python2.7 with my changes, which pass all unit tests posted previously. -- Added file: http://bugs.python.org/file22126/_strptime.py.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Erik Cederstrand e...@1calendar.dk added the comment: Documentation (I have no idea how to create a patch for this): %V ISO week number of the year (Monday as the first day of the week) as a decimal number (01-53). The week containing January 4 is week 1; the previous week is the last week of the previous year. %u ISO weekday (Monday as the first day of the week) as a decimal number (1-7). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12184] socketserver.ForkingMixin collect_children routine needs to collect only it's children
Charles-François Natali neolo...@free.fr added the comment: Some precisions: 1) Of course, if a handler changes its process group through setsid/setpgrp, it won't be waited on. 2) If a handler running on behalf of a process which is the current process group leader calls setsid, it will get an EPERM error. I don't think anyone is using that, but I'd rather make it clear. The only way I can think of to alleviate 2 would be to spawn a dummy process that would just be used as process group leader (and since it would keep running, no need to re-allocate a new PGID when worker processes exit). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12184 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12187] subprocess.wait() with a timeout uses polling on POSIX
New submission from STINNER Victor victor.stin...@haypocalc.com: Polling should be avoided when it's possible. For subprocess.wait(), we can do something with signals (SIGCHLD and/or SIGCLD). sigtimedwait() can be used to wait a the a child process terminated with a timeout, but not wait a specific process (so we may use a loop). sigtimedwait() doesn't call the signal handler, and so it changes the behaviour if the parent process has a signal handler for SIGCHLD/SIGCLD. If sigtimedwait() is not available, we may use a signal handler. For example, we can use the wakeup fd tool of the signal module. Problem: the parent program may already have such handler / use wakeup fd. We should at least restore the previous signal handler when we are done. -- assignee: pitrou components: Library (Lib) messages: 136958 nosy: haypo, pitrou priority: normal severity: normal status: open title: subprocess.wait() with a timeout uses polling on POSIX type: performance versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12187] subprocess.wait() with a timeout uses polling on POSIX
STINNER Victor victor.stin...@haypocalc.com added the comment: On Linux, the clone() syscall allows the change the signal send by the child to the parent when it terminates. It's also possible to choose to not send a signal when at child exit... But I don't think that subprocess uses such options ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
R. David Murray rdmur...@bitdance.com added the comment: Since this is a new feature it can only go into 3.3. Documentation is in the Doc subdirectory of a checkout, and is in the form of *.rst files. Modify the appropriate .rst file, and the doc update will be included in the patch you generate. If you wish to test your doc patch, execute 'make html' in the Doc subdirectory, which will pull in the appropriate software and build the docs in a Doc/build/html subdirectory. Ashely's patch worked for me on 3.3 in a minimal test; I haven't looked it it further at this point. Thanks for reviewing and for working on the unit tests and docs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11798] Test cases not garbage collected after run
Fabio Zadrozny fab...@users.sourceforge.net added the comment: So Michal, it seems no objections were raised? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11798 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3754] cross-compilation support for python build
wrobell wrob...@pld-linux.org added the comment: as well, by default one experiences checking for /dev/ptmx... not set configure: error: set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling the workaround: 1. create config.site file with the following lines ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no 2. run configure script as: CONFIG_SITE=config.site ./configure --host... would be it ok if i add appropriate options for /dev/ptmx and /dev/ptc to this patch so we do not have to play with config.site file? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3754] cross-compilation support for python build
wrobell wrob...@pld-linux.org added the comment: next question. when starting compilation i am getting In file included from Include/Python.h:50, from ./Modules/python.c:3: Include/pyport.h:257:13: error: #error This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG make: *** [Modules/python.o] Error 1 how to deal with above? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
Oleg Oshmyan chor...@inbox.lv added the comment: Looking at my own patch, I've noticed that the comment I added to Popen.__del__ doesn't sound quite right to me in terms of language and doesn't end in a full stop while all other comments in the same method do. Am I being too picky? I can't really think of a wording that would sound any better without it also being awkward though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, May 26, 2011 at 9:44 AM, R. David Murray rep...@bugs.python.org wrote: .. Documentation is in the Doc subdirectory of a checkout, and is in the form of *.rst files. Modify the appropriate .rst file, More specifically, strftime/strptime directives are listed in a table inside the the Doc/library/datetime.rst file. Note that the narrative before the table says that only C89 standard codes are listed and I don't think %V and %u are standard. Check if there is an applicable standard for them - C99 and POSIX define more codes that C89. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12169] Factor out common code for d2 commands register, upload and upload_docs
Changes by Éric Araujo mer...@netwok.org: -- assignee: tarek - eric.araujo keywords: +easy stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12169 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12154] PyDoc Partial Functions
Éric Araujo mer...@netwok.org added the comment: This section should help: http://docs.python.org/dev/library/inspect#classes-and-functions -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11798] Test cases not garbage collected after run
Michael Foord mich...@voidspace.org.uk added the comment: Sure, let's do it. Fabio, care to provide patch with tests and doc changes? (For 3.3.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11798 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11591] python -S should be robust against e.g. from site import addsitedir
Roundup Robot devnull@devnull added the comment: New changeset 6ee5443773cb by Éric Araujo in branch 'default': Also add versionchanged directive to the function doc (#11591) http://hg.python.org/cpython/rev/6ee5443773cb -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12181] SIGBUS error on OpenBSD (sparc64)
Charles-François Natali neolo...@free.fr added the comment: OpenBSD's struct kevent definition looks fishy: http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/event.h?rev=1.15;content-type=text%2Fplain struct kevent { u_int ident; /* identifier for this event */ short filter; /* filter for event */ u_short flags; u_int fflags; int data; void*udata; /* opaque user data identifier */ }; ident and data should be uintptr_t/intptr_t, no wonder this breaks on 64-bit. See for example FreeBSD's header: http://gitorious.org/freebsd/freebsd/blobs/4369b8d3fe19ee9540bfda1bb5f3db6208ff4c91/sys/sys/event.h -- nosy: -mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9435] test_distutils fails without zlib
Roundup Robot devnull@devnull added the comment: New changeset d5572fd3b768 by Éric Araujo in branch '2.7': Make test_distutils pass without zlib (fixes #9435) http://hg.python.org/cpython/rev/d5572fd3b768 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9435 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9435] test_distutils fails without zlib
Éric Araujo mer...@netwok.org added the comment: Can’t reproduce in 3.x, fixed in 2.7. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: +Python 2.7 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9435 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12161] StringIO AttributeError instead of ValueError after close..
Roundup Robot devnull@devnull added the comment: New changeset 720804a91c01 by Benjamin Peterson in branch '2.7': raise an ValueError in getvalue() on closed StringIO (closes #12161) http://hg.python.org/cpython/rev/720804a91c01 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12161 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12178] csv writer doesn't escape escapechar
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. It would be best if you could attach files as plain text instead of archives. -- components: +Extension Modules -None nosy: +eric.araujo, skip.montanaro versions: +Python 3.1, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12178 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9654] merge PC/getpathp.c into Modules/getpath.c
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, haypo versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9561] distutils: set encoding to utf-8 for input and output files
Éric Araujo mer...@netwok.org added the comment: Definitely. We can fix real bugs in distutils, but sometimes it’s best to avoid disruptive changes and let distutils with its buggy behavior and let the packaging module have the best behavior. -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9561] distutils: set encoding to utf-8 for input and output files
Marc-Andre Lemburg m...@egenix.com added the comment: Éric Araujo wrote: Éric Araujo mer...@netwok.org added the comment: Definitely. We can fix real bugs in distutils, but sometimes it’s best to avoid disruptive changes and let distutils with its buggy behavior and let the packaging module have the best behavior. This is a real bug, since we agreed long ago that distutils should read and write files using the UTF-8 encoding. -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Ashley Anderson agande...@gmail.com added the comment: When trying to add cases for %V and %u in the tests, I ran into an issue of year ambiguity. The problem comes when the ISO year does not match the Gregorian year for a given date. I think this should be fixed by implementing the %G directive (ISO year, which is present in strftime) as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, May 26, 2011 at 12:07 PM, Ashley Anderson rep...@bugs.python.org wrote: I think this should be fixed by implementing the %G directive (ISO year, which is present in strftime) as well. Correct. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9654] merge PC/getpathp.c into Modules/getpath.c
STINNER Victor victor.stin...@haypocalc.com added the comment: I propose to merge both files, this would ease maintenance and understanding of how these paths are determined. You mean to have only one function? I would prefer to keep two functions, but one should call the another one :) (you should factorize the code) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12181] SIGBUS error on OpenBSD (sparc64)
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 26 mai 2011 à 14:54 +, Charles-François Natali a écrit : Charles-François Natali neolo...@free.fr added the comment: OpenBSD's struct kevent definition looks fishy: http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/event.h?rev=1.15;content-type=text%2Fplain struct kevent { u_int ident; /* identifier for this event */ short filter; /* filter for event */ u_short flags; u_int fflags; int data; void*udata; /* opaque user data identifier */ }; ident and data should be uintptr_t/intptr_t ident and data are not pointers, I suppose that T_UINT and T_INT should be used instead of T_UINTPTR_T and T_INTPTR_T. intptr_t is bigger than an int on a 64 bits system (void*: 64 bits, int: 32 bits). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10766] optparse uses %s in gettext calls
Changes by Éric Araujo mer...@netwok.org: -- status: open - versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10766 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11664] Add patch method to unittest.TestCase
Éric Araujo mer...@netwok.org added the comment: There’s also test.support.swap_attr... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8777] Add threading.Barrier
Changes by Daniel Stutzbach stutzb...@google.com: -- stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8777 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10424] better error message from argparse when positionals missing
R. David Murray rdmur...@bitdance.com added the comment: I would remove the docstring from the new test class...if more tests of message content are added that docstring won't be accurate. It really isn't needed. (Also, shouldn't the test method be named test_missingarguments?) I would also like to see a test where there are optional non-option arguments (nargs='?'), where you test that the optional one does *not* appear in the message. That'll give you a second test method, making that test class a *little* less trivial :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10645] Remove egg-info files in stdlib
Éric Araujo mer...@netwok.org added the comment: The egg-info file for Python itself can go, but what about wsgiref.egg-info? It was included in 2.5 too to preserve compatibility with code using pkg_resources.require instead of regular import. I’d like to remove it too: it’s not needed anymore with the new standards, and I don’t think there’s a backward compat issue. There shouldn’t be 3.x code out there using this call, since all 3.x versions have had wsgiref in the stdlib. The only compat issue could be for some 2.x codebase relying on the egg-info file and being converted to Python 3.3: if we remove the file, people would have to remove the pkg_resources.require call. I would argue in favor of the removal: people can assume that wsgiref is in the stdlib if they target 2.5+ or 3.x, and if they do use the require call, then removing it is just another tiny step in the conversion process. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10645 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper
Éric Araujo mer...@netwok.org added the comment: Closing after no reply. If someone can reproduce the bug, please say so and reopen. -- stage: - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
R. David Murray rdmur...@bitdance.com added the comment: What is not-a-charset? I apparently misunderstood what normalize_encodings does. It isn't doing a lookup in the codecs registry and returning the canonical name for the codec. Does that mean we actually have to fetch the codec in order to get the canonical name? I suspect so, and that is probably OK, since in most cases the codec is eventually going to get called while processing the email that triggered the ALIASES lookup. I also notice that there is a table of aliases in the codec module documentation, so that will need to be updated as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12042] What's New multiprocessing example error
Changes by Jordan Stadler jordan.stad...@gmail.com: Added file: http://bugs.python.org/file22127/issue12042_31.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12042] What's New multiprocessing example error
Changes by Jordan Stadler jordan.stad...@gmail.com: Added file: http://bugs.python.org/file22128/issue12042_32.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12042] What's New multiprocessing example error
Jordan Stadler jordan.stad...@gmail.com added the comment: Alright, patches are up for 3.1 and 3.2. I'm not sure if I can just make one for the 3.x's so I made both. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10424] better error message from argparse when positionals missing
Michele Orrù maker...@gmail.com added the comment: Done. -- Added file: http://bugs.python.org/file22129/issue10424_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3754] cross-compilation support for python build
wrobell wrob...@pld-linux.org added the comment: looking into configure.in the above fails due to following check AC_MSG_CHECKING(for %lld and %llu printf() format support) the check compiles and tries to _run_ a bit of software to determine lld/llu support. that of course fails (we are cross compiling). this is similar problem to ptmx/ptc problem (we do not know if host have support for ptmx/ptc). i wonder if the following would be acceptable 1. if in cross compilation mode, the configure.in could load config-cross.site. 2. the config-cross.site would define variables for ptmx/ptc, long long format and other checks which consist of running code snippets 3. appropriate checks (i.e. ptmx/ptc, lld/llu) would not be run in cross compilation mode. variables from config-cross.site would be used instead. 4. it would be a developer responsibility to set appropriate values for his platform in config-cross.site file. does above sound like a solution? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12181] SIGBUS error on OpenBSD (sparc64)
Charles-François Natali neolo...@free.fr added the comment: ident and data are not pointers, That's not the point. struct kevent declaration should be the following: struct kevent { uintptr_t ident;/* identifier for this event */ short filter; /* filter for event */ u_short flags;/* action flags for kqueue */ u_int fflags; /* filter flag value */ intptr_t data; /* filter data value */ void *udata; /* opaque user data identifier */ }; If this doesn't match, you'll unpack garbage when extracting members, and since it's an unaligned access, you can even get a SIGBUS (looks like sparc64 doesn't allow unaligned access). I suppose that T_UINT and T_INT should be used instead of T_UINTPTR_T and T_INTPTR_T. Yes, we could do that on OpenBSD, but that's definitely an OpenBSD bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
Marc-Andre Lemburg m...@egenix.com added the comment: R. David Murray wrote: R. David Murray rdmur...@bitdance.com added the comment: What is not-a-charset? I apparently misunderstood what normalize_encodings does. It isn't doing a lookup in the codecs registry and returning the canonical name for the codec. Does that mean we actually have to fetch the codec in order to get the canonical name? I suspect so, and that is probably OK, since in most cases the codec is eventually going to get called while processing the email that triggered the ALIASES lookup. I also notice that there is a table of aliases in the codec module documentation, so that will need to be updated as well. As far as the aliases.py part of the patch goes, I'm fine with that since it corrects a few real bugs and adds the missing Latin-N codec names. Regarding using this table in the email package, I'm not really clear on what you want to achieve. If you are looking for a way to determine whether Python has a codec installed for a certain charset name, then codecs.lookup() will tell you this (and it also applies all the aliasing and normalization needed). If you want to avoid the actual codec module import (codecs.lookup() imports the module), you can mimic the logic used by the lookup function of the encodings package. Not sure, whether that's worth it, though, since it is rather likely that you're going to use the codec you've just looked up soon after the test and codecs.lookup() caches the found codecs. If you want to convert an arbitrary encoding name to a registered standard IANA MIME charset name, then the aliases.py module is not going to be of much help, since we are using our own canonical names which do not necessarily map to the MIME charset names. You'd have to add a new mime_alias map to the email package for that. I'd suggest to use the same approach as for the aliases.py module, which is to first normalize the encoding name using normalize_encoding() and then running that through the mime_alias map. Hope that helps. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Erik Cederstrand e...@1calendar.dk added the comment: Ashley, can you elaborate on wherein the ambiguity lies? Which combination of year, ISO week number and ISO weekday would lead to ambiguity? Regarding documentation, the %G, %V and %u directives are listed in IEEE Std 1003.1, 2004 Edition for strftime(): http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html For some reason, these directives are not mentioned in the related strptime(): http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12188] PEP 7, C style: add ++ policy and explanation
New submission from Terry J. Reedy tjre...@udel.edu: In response to a discussion of a patch removing 'useless' post-increments, (which issue has apparently come up before) Guido posted Sorry to butt in here, but I agree with Eric that it was better before. There is a common idiom, *pointer++ =something, and whenever you see that you know that you are appending something to an output buffer. Perhaps the most important idea here is that this maintains the *invariant* pointer points just after the last thing in the buffer. Always maintaining the invariant is better than trying to micro-optimize things so as to avoid updating dead values. The compiler is better at that. A condensed version of the above added to PEP 7 would help new developers see the usage as local idiom rather than style bug. -- assignee: docs@python components: Documentation messages: 136991 nosy: docs@python, terry.reedy priority: normal severity: normal status: open title: PEP 7, C style: add ++ policy and explanation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12188 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 succeeds
New submission from Feth AREZKI f...@tuttu.info: At least on Linux debian sid, it seems that Python 2.6.6 compile builtin does not like the empty line with only '\r\n' in it. The following doctest story runs with the attached CRLF'ed file: fd = open('test_win32.py', 'r') compile(fd.read(), 'test_win32.py', 'exec') Traceback (most recent call last): File /usr/lib/python2.6/doctest.py, line 1253, in __run compileflags, 1) in test.globs File doctest testcase_a[1], line 1, in module compile(fd.read(), 'test_win32.py', 'exec') File test_win32.py, line 3 ^ SyntaxError: invalid syntax With Python 2.7, everything seems fine. -- components: Interpreter Core files: test_win32.py messages: 136992 nosy: feth priority: normal severity: normal status: open title: Python 2.6.6 fails to compile a source whereas pycompile 1.0 succeeds type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file22130/test_win32.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 succeeds
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The problem is probably near this code in Lib/doctest.py (in _load_testfile):: # get_data() opens files as 'rb', so one must do the equivalent # conversion as universal newlines would do. return file_contents.replace(os.linesep, '\n'), filename probably something like this would be better:: file_contents.replace('\r\n', '\n').replace('\r', '\n') -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
Michele Orrù maker...@gmail.com added the comment: +1 What do you think? Ezio, David? -- title: The email package should defer to the codecs module for all aliases - The email package should defer to the codecs module for all aliases ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Ashley Anderson agande...@gmail.com added the comment: The example that triggered the issue in testing was January 1, 1905. The ISO date for this day is 1904 52 7. This is reported correctly if you use datetime.isocalendar() or datetime.strftime('%G'), but you get 1905 if you use datetime.strftime('%Y'). When it's read back in it causes the test to fail because ISO '1904 52 7' is different from ISO '1905 52 7'. Likewise if you consider a year starting on a Tuesday, Wednesday, or Thursday, there will be several days at the end of the previous year that will have an ISO year ahead of their Gregorian representation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
R. David Murray rdmur...@bitdance.com added the comment: Well, my thought was to avoid having multiple charset alias lists in the stdlib, and reusing the one in codecs, which is larger than the one in email, seemed to make sense. This came up because a bug was reported where email (silently) failed to encode a string because the charset alias, while present in codecs, wasn't present in the email ALIASES table. I suppose that as an alternative I could add full support for the IANA aliases list to email. Email is the most likely place to run in to variant charset aliases anyway. If that's the way we go, then this issue should be changed over to covering just updating codecs with the missing aliases, and a new issue opened for adding full IANA alias support to email. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12190] intern filenames in bytecode
New submission from Mike Solomon ms...@gmail.com: I work on a large app and we noticed that a surprising portion of our heap was filenames embedded the the bytecode. This one-line patch to intern filenames reduces our on-disk size about ~15% and brings down our heap and in-memory object count by a similar percentage. -- components: Interpreter Core files: codegen.patch keywords: patch messages: 136997 nosy: Mike.Solomon priority: normal severity: normal status: open title: intern filenames in bytecode type: performance versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file22131/codegen.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12190 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
Michele Orrù maker...@gmail.com added the comment: In that case, I could still take care of it; it would be really easy to do. So, it's up to you to tell me what is the best design choice. (: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12188] PEP 7, C style: add ++ policy and explanation
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12188 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12190] intern filenames in bytecode
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12190 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
Marc-Andre Lemburg m...@egenix.com added the comment: R. David Murray wrote: R. David Murray rdmur...@bitdance.com added the comment: Well, my thought was to avoid having multiple charset alias lists in the stdlib, and reusing the one in codecs, which is larger than the one in email, seemed to make sense. This came up because a bug was reported where email (silently) failed to encode a string because the charset alias, while present in codecs, wasn't present in the email ALIASES table. I suppose that as an alternative I could add full support for the IANA aliases list to email. Email is the most likely place to run in to variant charset aliases anyway. If that's the way we go, then this issue should be changed over to covering just updating codecs with the missing aliases, and a new issue opened for adding full IANA alias support to email. I think it would be useful to have a mapping from the Python canoncial name (the one the encodings package uses) to the preferred MIME name as referenced in the IANA list: http://www.iana.org/assignments/character-sets This mapping could also be added to the encodings package together with a function that translates a given encoding name to its canoncial Python name (codec_module_name()) and another one to translate it to the preferred MIME name according to the above list (encoding_mime_name()). Note that we don't support all the aliases mentioned in the IANA list because many of the are outdated and some have proved to be wrong (the aliased encodings are actually different in a few places). There are also a few encodings in the list which we don't support at all. Since we only rarely get requests for supporting new aliases or encodings, I think it's safe to say that the existing set is fairly complete from a practical point of view. -- title: The email package should defer to the codecs module for all aliases - The email package should defer to the codecs module for all aliases ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12190] intern filenames in bytecode
Benjamin Peterson benja...@python.org added the comment: How exactly does it bring down your disk space? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12190 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3754] cross-compilation support for python build
Roumen Petrov bugtr...@roumenpetrov.info added the comment: At least one is really would like to cross-compile. worber, the config site has to look like (sample for linux i?86, i.e. intel 32 bit, as host platform) = ac_cv_little_endian_double=yes ac_cv_broken_sem_getvalue=no ac_cv_computed_gotos=yes ac_cv_buggy_getaddrinfo=no ac_cv_working_tzset=yes #next line require fix typo in configure.in ac_cv_pthread=yes ac_cv_pthread_system_supported=yes ac_cv_tanh_preserves_zero_sign=yes ac_cv_have_long_long_format=yes ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no = Also with following patch into configure.in === diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -1372,7 +1372,7 @@ # so we need to run a program to see whether it really made the # function available. AC_MSG_CHECKING(whether $CC accepts -pthread) -AC_CACHE_VAL(ac_cv_thread, +AC_CACHE_VAL(ac_cv_pthread, [ac_save_cc=$CC CC=$CC -pthread AC_RUN_IFELSE([AC_LANG_SOURCE([[ === -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12190] intern filenames in bytecode
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo type: performance - resource usage versions: +Python 3.3 -Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12190 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Erik Cederstrand e...@1calendar.dk added the comment: Oh, I see, you're talking about strftime(). You're correct that you would need %G to print the year to which the ISO week containing the specific date belongs. I see no ambiguity or need for %G in strptime(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 and Python 2.7 succeed
Feth AREZKI f...@tuttu.info added the comment: Amaury Forgeot d'Arc wrote: The problem is probably near this code in Lib/doctest.py (in _load_testfile):: Hm, I discovered this without using doctest, and used it only to present the testcase. Are you sure that it relates to Lib/doctest (candid question, I never looked in that source before)? -- title: Python 2.6.6 fails to compile a source whereas pycompile 1.0 succeeds - Python 2.6.6 fails to compile a source whereas pycompile 1.0 and Python 2.7 succeed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)
New submission from Sandro Tosi sandro.t...@gmail.com: Hi, following up the discussion on http://mail.python.org/pipermail/python-dev/2011-May/111642.html here'a patch to introduce shutil.chown() along with doc, tests and a change in os doc to link to the new function (I also took the occasion to rewrap os.chown() doc text). As of now only the one-file function is implemented, let's see at a later time what's about for a recursive one. The patch was prepared against default, but it probably makes sense to backport it to 2.7? Any comment/suggestion is welcome! -- assignee: sandro.tosi components: Library (Lib) files: shutil_chown-default.patch keywords: patch messages: 137004 nosy: sandro.tosi priority: low severity: normal stage: patch review status: open title: Shutil - add chown() in order to allow to use user and group name (and not only uid/gid) type: feature request Added file: http://bugs.python.org/file22132/shutil_chown-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)
Changes by Sandro Tosi sandro.t...@gmail.com: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12084] os.stat() on windows doesn't consider relative symlink
Brian Curtin br...@python.org added the comment: Ok, so it's actually 0a1baa619171 that broke it, not sure how I came up with the other revision. In any case, it's too hairy to try and piece everything together across the numerous bug fixes, feature adds, and refactorings in this area in order to get back to a working state (plus you'll want to jump out the window if you try, believe me). I'm going to have a go at basically rewriting the os.stat Windows path tonight and tomorrow and see what that does. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12084 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 and Python 2.7 succeed
R. David Murray rdmur...@bitdance.com added the comment: There are a number of issues with compile that have been fixed. See #4628 and #1479099 for example. Since you say it works with 2.7, and Python3 compile handles \r\n, and 2.6 is in security fix only mode, I'm closing this as out of date. If you think there's still a problem in a maintained version of Python, please reopen. -- nosy: +r.david.murray resolution: - out of date stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
R. David Murray rdmur...@bitdance.com added the comment: I agree that since we get very few requests to add aliases our current tables are probably what we want. So adding the MIME_preferred_name mapping *somewhere* is indeed what I would like to see happen. It doesn't matter to me whether it is in the codecs module or the email module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)
Eric V. Smith e...@trueblade.com added the comment: As a new feature, it can't be added to 2.7. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12192] Doc that collection mutation methods return item or None
New submission from Terry J. Reedy tjre...@udel.edu: BACKGROUND One of most common recurring topics on python-list (perhaps monthly) is newbies tripping over a mutation method returning None when they expect the collection. Today's example: Puzzled by list-appending behavior. An excerpt from the responses: On 5/26/2011 11:58 AM, MRAB wrote: On 26/05/2011 06:17, Chris Rebert wrote: list.remove(), list.sort(), and list.extend() similarly return None rather than the now-modified list. I'd just like to point out that it's a convention, not a rigid rule. Sometimes it's not followed, for example, dict.setdefault. In Python 1, I believe it was true that all mutation methods of mutable builtin collections (ie, lists -- I do not think dicts had any and sets did not exist yet) returned None. With the introduction of list.pop, the return-None rule was 'broken', though the meme continues. However, the flip side of that rule, do-not-return-the-collection, continues to be true. And the return_None rule was not really broken, but broadened to return None or an item from the collection. I believe this should be better documented than it is now. PROPOSALS 1. State the general rule. A. Tutorial: At the top of chapter 5, just after This chapter describes some things you’ve learned about already in more detail, and adds some new things as well., add something like For lists, sets, and dicts, methods that change the contents or order never return the instance. Instead, they return an item from the instance or, more commonly, None. B. Library Manual: Near the top of 4. Built-in Types, after The principal built-in types are numerics, sequences, mappings, classes, instances and exceptions., add something like Some collection classes are mutable. The methods that add, subtract, or rearrange their members never return the collection instance itself but instead return an item from the instance or None. Comment: This rule applies to special methods like __getitem__ and __setitem__. 'lis.append(item)' is equivalent to lis.__setitem__(len(lis):len(lis), item), so it should not be so surprising that it has the same return. 2. Document None returns explicitly. They are currently documented implicitly, by absence. A. Docstrings: Compare the relevant parts of the output from 'help(list.append)' and 'help(list.pop)' L.append(object) -- append object to end L.pop([index]) - item -- remove and return item at index Add ' - None' to specify return for .append. L.append(object) - None -- append object to end I expect experienced Python programmers may object that this puts too much emphasis on the unimportant null return, but it is important that Python programmers know about it and experience shows that many newbies *need* that emphasis. B. Doc entries: Essentially same suggestion -- add 'Return None.' to appropriate entries in tutorial chapter 5. For library manual, possibly add footnote '(9) Returns None' to the method table in 4.6.4. Mutable Sequence Types. For sets and dicts, add 'and return None' to appropriate entries. -- assignee: docs@python components: Documentation messages: 137009 nosy: docs@python, terry.reedy priority: normal severity: normal status: open title: Doc that collection mutation methods return item or None versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12190] intern filenames in bytecode
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12190 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11995] test_pydoc loads all Python modules
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file22133/python-2.7-issue_11995.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11995] test_pydoc loads all Python modules
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: Added file: http://bugs.python.org/file22134/python-3.2-issue_11995.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11995] test_pydoc loads all Python modules
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: Added file: http://bugs.python.org/file22135/python-3.3-issue_11995.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11995] test_pydoc loads all Python modules
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12190] intern filenames in bytecode
Mike Solomon ms...@gmail.com added the comment: If you have a file with say a hundred functions, and each function contains the full path of that file on disk, your pyc file will contain about (100*(path_size+overhead)) bytes. In some cases, this is pretty significant. On Thu, May 26, 2011 at 12:47 PM, Benjamin Peterson rep...@bugs.python.orgwrote: Benjamin Peterson benja...@python.org added the comment: How exactly does it bring down your disk space? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12190 ___ -- Added file: http://bugs.python.org/file22136/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12190 ___If you have a file with say a hundred functions, and each function contains the full path of that file on disk, your pyc file will contain about (100*(path_size+overhead)) bytes. In some cases, this is pretty significant. div brdivdiv class=gmail_quoteOn Thu, May 26, 2011 at 12:47 PM, Benjamin Peterson span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex; br Benjamin Peterson lt;a href=mailto:benja...@python.org;benja...@python.org/agt; added the comment:br br How exactly does it bring down your disk space?br br --br nosy: +benjamin.petersonbr divdiv/divdiv class=h5br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue12190; target=_blankhttp://bugs.python.org/issue12190/agt;br ___br /div/div/blockquote/divbr/div/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)
Charles-François Natali neolo...@free.fr added the comment: I didn't test, but after skimming through the code I think that if an invalid user name/group name is provided, os.chown is passed None, which will fail with ValueError. It would be better to raise an explicit error like no such user / no such group. That's something you could add to the tests. Also, you could initialize _user to -1 instead of None, and replace if user is None: _user = -1 else: [...] with if user is not None: [...] Same goes for _group. -- nosy: +charles-francois.natali ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12190] intern filenames in bytecode
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file22136/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12190 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12192] Doc that collection mutation methods return item or None
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com