[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build
Ned Deily n...@acm.org added the comment: You did run sudo make install? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build
John Szakmeister j...@szakmeister.net added the comment: I'm installing into an area that I own ($HOME/.local/python3), so no need for sudo. I just ran make install. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build
Ronald Oussoren ronaldousso...@mac.com added the comment: 'make install' works for me as well (OSX 10.6, configure --prefix=/tmp/python32). Could you attach the output of make install, with some luck there will be a clear indication of why the install doesn't work on your machine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension
Jonathan Livni jonathan.li...@gmail.com added the comment: Let my foolishness be a reminder to all not to use from [module] import * After saying that - I believe overloading a built in Python function in a popular package\module is a mistake! I still don't know if pylab's all() is erroneous or if it's correct functionality. I'll open a ticket there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11221 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build
John Szakmeister j...@szakmeister.net added the comment: Attached the output. -- Added file: http://bugs.python.org/file20775/make-install-output.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build
John Szakmeister j...@szakmeister.net added the comment: This one is my fault. I have a .pydistutils.cfg that was causing them to be installed somewhere else or not at all. :-( Moving my custom config out of the way, I'm good. I'm not sure what's happening there, but that's a different problem. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used
Sébastien Sablé sa...@users.sourceforge.net added the comment: Here is what faulthandler reports when I trigger it as Python is locked in test_socket: [108/349] test_socket Traceback (most recent call first): File /san_cis/home/cis/.buildbot/python-aix6/3.x.phenix.xlc/build/Lib/test/fork_wait.py, line 30 in f (sic) It is coherent with what truss tells: _getpid() = 1474634 _select(0, 0x, 0x, 0x, 0x317535F0) = 0 _getpid() = 1474634 _select(0, 0x, 0x, 0x, 0x315E35F0) = 0 And we can find this comment in the file: # waitpid() shouldn't hang, but some of the buildbots seem to hang # in the forking tests. This is an attempt to fix the problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used
Sébastien Sablé sa...@users.sourceforge.net added the comment: faulthandler is great by the way! I will use that in my application. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used
STINNER Victor victor.stin...@haypocalc.com added the comment: Here is what faulthandler reports when I trigger it as Python is locked in test_socket: ... File .../Lib/test/fork_wait.py, line 30 in f faulthandler doesn't print the source code line (yet?). Here is the code: class ForkWait(unittest.TestCase): ... def f(self, id): while not self.stop: self.alive[id] = os.getpid() try: time.sleep(SHORTSLEEP) ~~~ here except IOError: pass ForkWait.f() is used by ForkWait.test_wait() which creates 4 threads. You may use all_threads=True option of faulthandler to get the backtrace of all threads. Because ForkWait.test_wait() uses fork, you may also need to dump the backtrace of two processes. Debug threads+multiple processes is something horrible :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used
Sébastien Sablé sa...@users.sourceforge.net added the comment: At the time of the lock, there is only one python process running. So I guess the other processes have already left but this is not correctly detected. I will try again with all_threads=True. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used
Sébastien Sablé sa...@users.sourceforge.net added the comment: I kinda feel this is related to issue 11185 which I reported earlier. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11223] interruption of locks by signals not guaranteed when the semaphore implementation is not used
Antoine Pitrou pit...@free.fr added the comment: Could you open another issue? (or post in issue 11185 above) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11230] Full unicode import system not in 3.2
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11230 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11230] Full unicode import system not in 3.2
STINNER Victor victor.stin...@haypocalc.com added the comment: Short answer: In Python 3.2, « import héhé » doesn't work on Windows, but you can have non-ASCII paths in sys.path. Longer answer: I fixed the import machinery to handle correctly non-ASCII characters in module *paths*. But the import machinery is unable to handle non-ASCII characters in module *names*: it fails if the filesystem encoding is not UTF-8 (eg. it fails on Windows). There is another exception: Python doesn't support (yet) non encodable module paths on Windows. On Windows, you can use any character in directory names, but Python 3.2 encodes paths to the filesystem encoding (ANSI code page) which is a smaller charset. In practical, this Windows specific limitation on module paths doesn't really matter. I plan to fix all these issues in Python 3.3: see #3080. -- Could you please make it clear in documentation and web pages, that this feature is not working yet. What's New in Python 3.2 documentation has this sentence: Python’s import mechanism can now load modules installed in directories with non-ASCII characters in the path name. This solved an aggravating problem with home directories for users with non-ASCII characters in their usernames. which is correct. Which web page should updated/fixed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11230 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7330] PyUnicode_FromFormat segfault
Ray.Allen ysj@gmail.com added the comment: Thanks hyapo! It looks like your patch fixes #10829: you should add tests for that, you can just reuse the tests of my patch (attached to #10829). Sorry, but I think my patch doesn't fix #10829. It seems link another issue. And by applying my patch and add tests from #10829's patch, the tests cannot passed. Or did I missed something? You should also avoid the creation of a temporary unicode object (it can be slow if precision is large) using PySequence_GetSlice(). Py_UNICODE_COPY() does already truncate the string because you can pass an arbitrary length. In order to use Py_UNICODE_COPY, I have to create a unicode object with required length first. I feel this have the same cost as using PySequence_GetSlice(). If I understand correctly? With your patch, %.200s truncates the input string to 200 *characters*, but I think that it should truncate to 200 *bytes*, as printf does. Sorry, I don't understand. The result of PyUnicode_FromFormatV() is a unicode object. Then how to truncate to 200 *bytes*? I think the %s formatter just indicate that the argument is c-style chars, the result is always unicode string, and the width and precision formatters are to applied after converting c-style chars to string. I don't like this change because I hate having to compute manually strings length. It should that it would be easier if you format directly strings with width and precision at step 3, instead of doing it at step 4: so you can just read the length of the formatted string, and it avoids having to handle width/precision in two steps (which may be inconsistent :-/). Do you mean combine step 3 and step 4 together? Currently step 3 is just to compute the biggest width value and step 4 is to compute exact width and do the real format work. Only by doing real format we can get the exact width of a string. So I have to compute each width twice in both step 3 and step 4. Is combining the two steps in to one a good idea? In my opinion, the patch is a little bit too big. We may first commit the fix on the code parsing the width and precision: fix #10829? Again, I guess #10829 need another its own patch to fix. Can you add tests for %.s? I would like to know if %.s is different than %s :-) Err, '%.s' causes unexpected result both with and without my patch. Maybe it's still another bug? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10709] Misc/AIX-NOTES needs updating
Sébastien Sablé sa...@users.sourceforge.net added the comment: Could this doc be added before the 3.2 release? I think it is convenient for the (few) AIX users and harmless. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10709] Misc/AIX-NOTES needs updating
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11185] test_wait4 error on AIX
Sébastien Sablé sa...@users.sourceforge.net added the comment: This issue already existed on Python 2.5.2 with AIX 5.2: http://www.mail-archive.com/python-list@python.org/msg192219.html The documentation for WNOHANG says: http://docs.python.org/library/os.html#os.WNOHANG The option for waitpid() to return immediately if no child process status is available immediately. The function returns (0, 0) in this case. It seems wait4 always returns 0 on AIX when WNOHANG is specified. Removing WNOHANG will make the test succeed. waitpid does not have the same limitation. I suppose this is a bug of AIX, though there is not even a man page to describe wait4 on this platform. Here is a proposition for a patch that will workaround this bug... Index: Lib/test/test_wait4.py === --- Lib/test/test_wait4.py (revision 88430) +++ Lib/test/test_wait4.py (working copy) @@ -3,6 +3,7 @@ import os import time +import sys from test.fork_wait import ForkWait from test.support import run_unittest, reap_children, get_attribute @@ -13,10 +14,14 @@ class Wait4Test(ForkWait): def wait_impl(self, cpid): +option = os.WNOHANG +if sys.platform.startswith('aix'): +# wait4 is broken on AIX and will always return 0 with WNOHANG +option = 0 for i in range(10): # wait4() shouldn't hang, but some of the buildbots seem to hang # in the forking tests. This is an attempt to fix the problem. -spid, status, rusage = os.wait4(cpid, os.WNOHANG) +spid, status, rusage = os.wait4(cpid, option) if spid == cpid: break time.sleep(1.0) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11185 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Eric Smith e...@trueblade.com added the comment: [I doubt my terminology is exactly correct in this post, but I've tried my best to make it so.) The more I think about this the more I realize we can't implement a parser that doesn't make guesses about '-' prefixed args and that works with arparse's existing behavior with respect to optional arguments. For example: parser = argparse.ArgumentParser() parser.add_argument('--foo', nargs='?') parser.add_argument('--bar', nargs='?') print parser.parse_args(['--foo', '--bar', 'a']) print parser.parse_args(['--foo', 'x', '--bar', 'a']) Unless the parser tries to guess that --bar is an optional argument by itself, it can't know that --foo has an argument or not. I guess it could look and say that if you called this with '--foo --baz', then '--baz' must be an argument for '--foo', but then you could never have an argument to '--foo' named '--bar', plus it all seems fragile. Maybe this new parser (as Steven described it) wouldn't allow a variable number of arguments to optional arguments? That is, nargs couldn't be '?', '*', or '+', only a number. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11212] Python memory limit on AIX
R. David Murray rdmur...@bitdance.com added the comment: Here is a proofread diff. I did make one substantive change: I added a comment about the test suite not running with the default maxdata and not raising memory errors with 512MB. Is that correct? -- nosy: +r.david.murray Added file: http://bugs.python.org/file20776/aix-notes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11221] all() returns wrong result when the parameters are non-encapsulated list-comprehension
Mark Dickinson dicki...@gmail.com added the comment: After saying that - I believe overloading a built in Python function in a popular package\module is a mistake! I believe NumPy had 'any' and 'all' *before* Python did. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11221 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Senthil Kumaran orsent...@gmail.com added the comment: Here are couple of Review Comments on What's new document. 1. The logging dictConfig example fails if you try directly out-of-text. The conf file is opened as a 'rb' and json module throws an error as TypeError: can't use a string pattern on a bytes-like object. Suggestion - Just reading it as string is fine. Also, this example throws another error from json, when you read it as string. ValueError: Expecting property name: line 4 column 17 (char 204) I was able to fix it by simplifying the conf.json, but I think the current one itself should be fixed and made to work. Related suggestion - I see another section on logging further down. It would be better to combine the sections. 2.Issue number for functools.lru_cache is not mentioned. If no tracker id/ discussion is available, checkin link can be mentioned. 3. There is section for Popen which says, subprocess.Popen() functions now support with statements for auto-closing of the file descriptors. Not really. Only os.popen() function supports it. 4. In the concurrent.futures example, it is given as: import threading, shutil with threading.ThreadPoolExecutor(max_workers=4) as e: It should be: import concurrent.futures, shutil with concurrent.futures.ThreadPoolExector(max_workers=4) as e: Please correct these before the release on 19th. -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11212] Python memory limit on AIX
Antoine Pitrou pit...@free.fr added the comment: David, I think you attached your patch to the wrong issue. Sébastien, according to the IBM docs, the memory limit can be changed using the LDR_CNTRL variable, so running the test suite shouldn't need special linker flags, or? (also, wouldn't it be simpler to use large pages?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11212] Python memory limit on AIX
Sébastien Sablé sa...@users.sourceforge.net added the comment: The AIX documentation says: http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.itame3.doc_5.1/am51_perftune113.htm It is a good idea to unset the LDR_CNTRL environment variable, so that it does not unintentionally affect other processes. I think people may be more interested in setting permanently the maximum memory that can be allocated by python rather than using an environment variable that may be lost and which impacts all the applications. Another way to increase the memory available for an application is to use the ldedit command on the python executable: ldedit -b maxdata:0x2000 ./python That may be easier than passing it directly to the linker. Concerning large pages, I found that in an IBM documentation: Users are advised to be cautious in their use of the environment variable to specify large page usage. Performance tests have shown there can be a significant performance loss in environments where a number of shell scripts or small, short running applications are invoked. One example saw a shell script's execution time increase over 10 times when the large page environment variable was specified. Customers are advised to only set the large page environment variable around specific applications which can benefit from large page usage. Also large pages must be activated on the system by root. This does not seem to be available by default according to the doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11212] Python memory limit on AIX
Sébastien Sablé sa...@users.sourceforge.net added the comment: The doc would become: To allocate more segment registers to Python, you must use the linker option -bmaxdata or ldedit to specify the number of bytes you need in the data segment. For example, if you want to allow 512MB of memory for Python (this is enough for the test suite to run without MemroyErrors), you should run the following command at the end of compilation: ldedit -b maxdata:0x2000 ./python -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11212] Python memory limit on AIX
R. David Murray rdmur...@bitdance.com added the comment: oops. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11212] Python memory limit on AIX
Changes by R. David Murray rdmur...@bitdance.com: Removed file: http://bugs.python.org/file20776/aix-notes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10709] Misc/AIX-NOTES needs updating
R. David Murray rdmur...@bitdance.com added the comment: Here is a proofread diff. I did make one substantive change: I added a comment about the test suite not running with the default maxdata and not raising memory errors with 512MB. Is that correct? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10709] Misc/AIX-NOTES needs updating
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +patch Added file: http://bugs.python.org/file20777/aix-notes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10709] Misc/AIX-NOTES needs updating
Sébastien Sablé sa...@users.sourceforge.net added the comment: Yes it is correct. And thank you for proof reading it too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11212] Python memory limit on AIX
Antoine Pitrou pit...@free.fr added the comment: I think people may be more interested in setting permanently the maximum memory that can be allocated by python rather than using an environment variable that may be lost and which impacts all the applications. Agreed, but it's impossible to standardize the configure script on a good enough value. Some people might need 512MB, others 2GB... Another way to increase the memory available for an application is to use the ldedit command on the python executable: ldedit -b maxdata:0x2000 ./python That may be easier than passing it directly to the linker. Sounds better. That means that it can be decoupled from the build process. (although for a hypothetical buildbot, I think passing LDR_CNTRL would be the most practical solution) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11231] bytes() constructor is not correctly documented
New submission from STINNER Victor victor.stin...@haypocalc.com: There are 5 different usages of the bytes() constructor: 1) bytes(iterable_of_ints) - bytes 2) bytes(string, encoding[, errors]) - bytes 3) bytes(bytes_or_buffer) - immutable copy of bytes_or_buffer 4) bytes(memory_view) - bytes 5) bytes(int) = b'\0' * size The docstring describes the four first usages, the documentation only (3). http://docs.python.org/dev/library/functions.html#bytes Note: bytes(3) accepts 2 other arguments, but I don't think that they are used: bytes(3, 'unused encoding', 'unused errors'). -- assignee: docs@python components: Documentation messages: 128739 nosy: docs@python, haypo priority: normal severity: normal status: open title: bytes() constructor is not correctly documented versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11231] bytes() constructor is not correctly documented
Antoine Pitrou pit...@free.fr added the comment: 3) bytes(bytes_or_buffer) - immutable copy of bytes_or_buffer 4) bytes(memory_view) - bytes These are AFAIR the same. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11231] bytes() constructor is not correctly documented
STINNER Victor victor.stin...@haypocalc.com added the comment: These are AFAIR the same. So the docstring should also maybe be updated too: $ python help(bytes) Help on class bytes in module builtins: class bytes(object) | bytes(iterable_of_ints) - bytes | bytes(string, encoding[, errors]) - bytes | bytes(bytes_or_buffer) - immutable copy of bytes_or_buffer | bytes(memory_view) - bytes | | Construct an immutable array of bytes from: |- an iterable yielding integers in range(256) |- a text string encoded using the specified encoding |- a bytes or a buffer object |- any object implementing the buffer API. | ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Éric Araujo mer...@netwok.org added the comment: 2.Issue number for functools.lru_cache is not mentioned. If no tracker id/ discussion is available, checkin link can be mentioned. There was no tracker issue for that; the checkin is r83327, but I don’t think it would be useful to mention it in whatsnew. 3. There is section for Popen which says, subprocess.Popen() functions now support with statements for auto-closing of the file descriptors. Not really. Only os.popen() function supports it. You must have missed line 752 and following of Lib/functools.py. Brian did add context management support to Popen in response to my request in #10554. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Éric Araujo mer...@netwok.org added the comment: I meant Lib/subprocess.py, of course :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example
New submission from Sandro Tosi sandro.t...@gmail.com: Hi, following up http://mail.python.org/pipermail/docs/2011-February/003095.html I'm attaching a simple patch to avoid a traceback similar to this when a client disconnects: error: uncaptured python exception, closing channel __main__.EchoHandler 127.0.0.1:41884 at 0x150ae60 (class 'socket.error':[Errno 9] Bad file descriptor [/home/morph/python-dev/py3k/Lib/asyncore.py|read|81] [/home/morph/python-dev/py3k/Lib/asyncore.py|handle_read_event|440] [stdin|handle_read|4] [/home/morph/python-dev/py3k/Lib/asyncore.py|send|550] [/home/morph/python-dev/py3k/Lib/asyncore.py|initiate_send|537] [/home/morph/python-dev/py3k/Lib/asyncore.py|send|367]) -- assignee: sandro.tosi files: asyncore-notraceback-py3k.patch keywords: patch messages: 128744 nosy: giampaolo.rodola, sandro.tosi priority: low severity: normal stage: patch review status: open title: asyncore - don't throw a traceback when a client disconnects in echo server example Added file: http://bugs.python.org/file20778/asyncore-notraceback-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example
Changes by Sandro Tosi sandro.t...@gmail.com: -- components: +Documentation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example
Giampaolo Rodola' g.rod...@gmail.com added the comment: +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11233] clarifying Availability: Unix
New submission from Sandro Tosi sandro.t...@gmail.com: Hi, following up http://mail.python.org/pipermail/docs/2011-February/003083.html we have a chat on #python-dev on the topic, the situation is - all started with os.lchmod() and as.lchflags() methods not available on a Debian system - that's because POSIX does not require those functions and then Linux systems don't provide them - so we then thought about clarifying, only for those 2 methods, that they might not be available with a format like availability: some unix systems - then we noticed that on top of os doc there's a notice An “Availability: Unix” note means that this function is commonly found on Unix systems. It does not make any claims about its existence on a specific operating system. and so we thought about linking every 'Availability: Unix' to that note - or transform that not in a footnote and link every 'Availability: Unix' for functions that might not be present to that footnote. It's enough for the conversation dump: ideas/suggestions? :) -- assignee: docs@python components: Documentation messages: 128746 nosy: docs@python, sandro.tosi priority: normal severity: normal status: open title: clarifying Availability: Unix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11233 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var)
New submission from Carl Chenet cha...@ohmytux.com: Hi, It seems a mistake could be in the What's new in Python 3.2 (rc3) documentation in the sysconfig.get_config_var('SO') example : sysconfig.get_config_var('SO') # find the full filename extension 'cpython-32mu.so' On my system (Debian GNU/Linux, Python3.2rc3), the same command gives : sysconfig.get_config_var('SO') '.cpython-32m.so' A dot at the beginning of the string could be missing in the example of the current documentation. This dot also appears in the example of the PEP 3149. Regards, Carl Chenet -- assignee: docs@python components: Documentation messages: 128747 nosy: chaica_, docs@python priority: normal severity: normal status: open title: Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var)
Sandro Tosi sandro.t...@gmail.com added the comment: On Thu, Feb 17, 2011 at 20:22, Carl Chenet rep...@bugs.python.org wrote: sysconfig.get_config_var('SO') '.cpython-32m.so' A dot at the beginning of the string could be missing in the example of the current documentation. This dot also appears in the example of the PEP 3149. and also in a freshly built python from last checkout. -- nosy: +sandro.tosi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var)
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build
Ned Deily n...@acm.org added the comment: Here's a minimal patch (a subset of Victor's original) that fixes the release blocker issue. It has been tested in both a shared library build (which now works) and a framework build (which is not affected as expected). I recommend that it be applied before 3.2final. -- components: +Macintosh stage: - commit review Added file: http://bugs.python.org/file20779/issue11222_osx_shared_build.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11233] clarifying Availability: Unix
R. David Murray rdmur...@bitdance.com added the comment: I like the footnote idea. I wonder if it would also be worth marking which functions are Posix (Availability: posix) and therefore likely to be available on all unix systems. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11233 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11233] clarifying Availability: Unix
Antoine Pitrou pit...@free.fr added the comment: I like the footnote idea. Me too. I wonder if it would also be worth marking which functions are Posix (Availability: posix) and therefore likely to be available on all unix systems. POSIX has optional APIs, hasn't it? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11233 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11233] clarifying Availability: Unix
R. David Murray rdmur...@bitdance.com added the comment: Good point :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11233 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
New submission from Guy Kisel guy.ki...@gmail.com: Tested in Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Exception thrown: OverflowError: modification time overflows a 4 byte field Steps to reproduce: 1. Set system time to 2/8/2106 or later and modify a .py file (or use a utility to change the date modified directly). 2. Try to run or import the .py file. This date is 2^32 seconds after the Unix epoch. -- components: None messages: 128753 nosy: Guy.Kisel priority: normal severity: normal status: open title: Source files with date modifed in 2106 cause OverflowError type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +barry, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z
Merlijn van Deen valhall...@gmail.com added the comment: To allow people to cancel at the password prompt, we added a manual post-check. Although this check runs after return is pressed, it's better than nothing. Index: branches/rewrite/pywikibot/userinterfaces/terminal_interface.py === --- branches/rewrite/pywikibot/userinterfaces/terminal_interface.py (revision 8977) +++ branches/rewrite/pywikibot/userinterfaces/terminal_interface.py (revision 8978) @@ -175,6 +175,11 @@ if password: import getpass text = getpass.getpass('') +# See PYWP-13 / http://bugs.python.org/issue11236 +# getpass does not always raise an KeyboardInterrupt when ^C +# is pressed. +if '\x03' in text: +raise KeyboardInterrupt() else: text = raw_input() finally: http://www.mediawiki.org/wiki/Special:Code/pywikipedia/8978 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11236 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11237] odbc module crashes Python interpretter
New submission from Maurice Maneschi mamanes...@gmail.com: In Python 3.1.3 under Windows XP sp3, I enter the following under the interpretter: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\MauriceMc:\Python31\python.exe Python 3.1.3 (r313:86834, Nov 27 2010, 18:30:53) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import odbc c = odbc.odbc('Quantum/Quantum/Quantum3') dir(c) C:\Documents and Settings\MauriceM At that point, Windows pops up a crash notification and asked if MS should be informed. Questions = 1) Is ODBC no longer supported? -- components: Windows messages: 128756 nosy: Maurice.Maneschi priority: normal severity: normal status: open title: odbc module crashes Python interpretter type: crash versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11238] sets - refer to sets/frozenset in stdtypes
New submission from Sandro Tosi sandro.t...@gmail.com: Hi, following up http://mail.python.org/pipermail/docs/2011-February/003088.html, here's a patch to make sets.html big red notice :) refer to set/frozenset into stdtypes page with a couple of links. -- assignee: sandro.tosi components: Documentation files: sets_refers_to_stdtypes-rel2.7.patch keywords: patch messages: 128757 nosy: sandro.tosi priority: low severity: normal stage: patch review status: open title: sets - refer to sets/frozenset in stdtypes versions: Python 2.7 Added file: http://bugs.python.org/file20780/sets_refers_to_stdtypes-rel2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11238 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
STINNER Victor victor.stin...@haypocalc.com added the comment: The problem occurs on import (import bla reads bla.py), when Python tries to create bla.pyc. The problem is that Python stores the timestamp as 4 bytes in .pyc files, whereas time_t is 64 bits on Windows (at least on Windows XP with Visual Studio). To support bigger timestamps, we have to change the file format of .pyc files. It cannot be done in Python 2.7, I propose to do it in Python 3.3 See also #5537 and #4379: other issues with 64 bits = 32 bits timestamps. -- nosy: +belopolsky, haypo versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11222] Python3.2rc3 fails to build on Mac OS X with a non-framework build
Antoine Pitrou pit...@free.fr added the comment: Looks good to me. I guess it needs Georg's approval, though. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11238] sets - refer to sets/frozenset in stdtypes
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11238 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example
Sandro Tosi sandro.t...@gmail.com added the comment: well, since we are at it, sed 's/abasic/a basic/' in the first line of echo server example; I'm too lazy to regenerate the patch tho :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
STINNER Victor victor.stin...@haypocalc.com added the comment: To support bigger timestamps, we have to change the file format of .pyc files. write_compiled_module(), check_compiled_module() and other functions use the marshal module to read/write binary file, but marshal has no function for int64_t, only for long (which may be 32 bits, especially on Windows). I don't know if Python has a builtin 64 bits integer type. There is PY_LONG_LONG, but this type is optional. A possible solution is to always store timestamp as 64 bits signed integer, but reject timestamp 2^32 (as currently) if we don't have 64 bits integer type (like PY_LONG_LONG). Something like: #ifdef PY_LONG_LONG write_timestamp64(t); #else if (t 32) { error; } write_timestamp32(t); write_long32(0); /* emulate 64 bits in big endian */ #endif -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4379] Py_SAFE_DOWNCAST in FILE_TIME_to_time_t_nsec failing
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, this issue was already fixed by r87666 to fix the duplicate issue #8278. -- nosy: +haypo resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4379] Py_SAFE_DOWNCAST in FILE_TIME_to_time_t_nsec failing
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, this issue was already fixed by r87666 ... in py3k, and then merged into release31-maint (r87668) and release27-maint (r87669). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: [issue11071] What's New review comments
On Fri, Feb 18, 2011 at 2:18 AM, Éric Araujo rep...@bugs.python.org wrote: You must have missed line 752 and following of Lib/functools.py. Brian did add context management support to Popen in response to my request in #10554. Yes, I did miss it because the What's new document referenced only issue 7461 and I saw that checkin had changes for os.popen only. Thanks for pointing this out. I think #10554 should be referenced where the claim for subprocess.Popen Context Manager support is mentioned. Other comments have been care of. -- Senthil ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms
STINNER Victor victor.stin...@haypocalc.com added the comment: Shouldn't module time be changed to use a cross-platform implementation that uses a 64 bit time_t-like type? Apparently Perl 6 has made the equivalent change. The error occurs on time.gmtime(t): even if we use 64 bits time_t type, we have to downcast it to system time_t later, because we would like to call gmtime() function at the end. To workaround gmtime() limitation: we can simply use datetime instead. Attached patch replaces gmtime() by datetime.utcfromtimestamp(), and use its .strftime() method which has no such limitation. -- nosy: +belopolsky, haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5537 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2571] cmd.py always uses raw_input, even when another stdin is specified
Changes by Ron Adam ron_a...@users.sourceforge.net: -- nosy: +ron_adam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z
Changes by Éric Araujo mer...@netwok.org: -- stage: - needs patch versions: +Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11236 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Initialization scope bug?
The following code does not work for some reason in Python 2.6.5 (r265:79063, Jun 9 2010, 16:26:11) [MSC v.1500 32 bit (Intel)] on win32 Apparently, the class's function definition is accepted just fine by Python, however when the function is called during the initialization that follows, the function cannot see the class attribute defined before it and an error is returned! class MyClass: START=10 def getStart(): return START x = START # OK y = getStart () # Error! The error I get is: Traceback (most recent call last): File stdin, line 1, in module File stdin, line 5, in MyClass File stdin, line 3, in getStart NameError: global name 'START' is not defined Is this a bug? -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11237] odbc module crashes Python interpretter
Brett Cannon br...@python.org added the comment: odbc is not a module provided by Python. -- nosy: +brett.cannon resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11239] regexp-howto - add missing } to metachars
New submission from Sandro Tosi sandro.t...@gmail.com: hi, following up http://mail.python.org/pipermail/docs/2011-February/003099.html, here's a patch to add '}' to metachars, currently missing. -- assignee: sandro.tosi components: Documentation files: regex-howto-add-missin-metachar-py3k.patch keywords: patch messages: 128767 nosy: sandro.tosi priority: low severity: normal stage: patch review status: open title: regexp-howto - add missing } to metachars versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20781/regex-howto-add-missin-metachar-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11239 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows
New submission from Matt Chaput m...@whoosh.ca: If you start unit tests with a command line such as python setup.py test or nosetests, if the tested code starts a multiprocessing.Process on Windows, each new process will act as if it was started as python setup.py test/nosetests, leading to an infinite explosion of processes that eventually locks up the entire machine. -- components: Windows messages: 128768 nosy: mattchaput priority: normal severity: normal status: open title: Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11240 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError
New submission from Steve Thompson steve.f.thomp...@gmail.com: Consider the following: python code: class my_array( ctypes.Array ): _type_= ctypes.c_uint8 _length_ = 256 class my_array2( my_array ): pass Output: class my_array2( my_array ): AttributeError: class must define a '_length_' attribute, which must be a positive integer This is analogous to the C code typedef char my_array[ 256 ]; typedef my_array my_array2; However, the python code raises exceptions claiming _type_ and _length_ have not been defined. This seems like a bug. I shouldn't need to redefine _type_ and _length_, otherwise there was no point in subclassing my_array. I tried to step into this using pdb but didn't have any luck. -- assignee: theller components: ctypes messages: 128769 nosy: Steve.Thompson, theller priority: normal severity: normal status: open title: ctypes: subclassing an already subclassed ArrayType generates AttributeError type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Using multiprocessing on Windows can be different; please read http://docs.python.org/library/multiprocessing.html#windows especially the part named Safe importing of main module. On Windows, fork() does not exist, so a new interpreter must be started, which will import the current module; this must not start the test suite again! Adding if __name__ == '__main__' somewhere is probably the solution. If not, you should move the target function to another module. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11240 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows
Matt Chaput m...@whoosh.ca added the comment: Thank you, I understand all that, but I don't think you understand the issue. My code is not __main__. I am not starting the test suite. It's the distutils/nose code that's doing that. It seems as if the multiprocessing module is starting new Windows processes by duplicating the command line of the original process. That doesn't seem to work very well, given the example of running test suites, hence the bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11240 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It seems as if the multiprocessing module is starting new Windows processes by duplicating the command line of the original process. It does not. The spawned processes use the command:: python.exe -c 'from multiprocessing.forking import main; main()' --multiprocessing-fork [handle#] And only after, the multiprocessing machinery overrides sys.argv with the same value as the initial process. There is certainly some code in one of your modules that starts running the tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11240 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11236 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2571] can cmd.py's API/docs for the use of an alternate stdin be improved?
Changes by R. David Murray rdmur...@bitdance.com: -- title: cmd.py always uses raw_input, even when another stdin is specified - can cmd.py's API/docs for the use of an alternate stdin be improved? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2571] can cmd.py's API/docs for the use of an alternate stdin be improved?
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7330] PyUnicode_FromFormat segfault
Ray.Allen ysj@gmail.com added the comment: Do you mean combine step 3 and step 4 together? Currently step 3 is just to compute the biggest width value and step 4 is to compute exact width and do the real format work. Only by doing real format we can get the exact width of a string. So I have to compute each width twice in both step 3 and step 4. Is combining the two steps in to one a good idea? Sorry, Here I mean: Do you mean combine step 3 and step 4 together? Currently step 3 is just to compute the biggest width value and step 4 is to compute exact width and do the convert work(by calling PyObject_Str()/PyObject_Repr()/PyObject_ASCII()/PyUnicode_DecodeUTF8() for %S/%R/%A/%s). Only by doing convert we can get the exact width of a string. So I have to compute each width twice in both step 3 and step 4. Is combining the two steps in to one a good idea? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11230] Full unicode import system not in 3.2
John jh45...@gmail.com added the comment: Victor asked Which web page should updated/fixed? Answer: The Python 3.2 download page. But what should it say? The main point is that people like me, who remember seeing a statement about this a few months ago, may expect unicode to work in every conceivable situation, and a prominent warning that it's not *all* fixed yet, with a link to details in the documentation, would save them from trying things that don't work. By the way, I hadn't grasped a simple point from issue 3080: I tested on *English* Windows by putting a Greek character in the path to some python modules. But the usual situation is where a *Greek* version of Windows has some Greek characters in the path, and from what you just wrote, that's OK now. -- jh -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11230 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7833] Bdist_wininst installers fail to load extensions built with Issue4120 patch
Mark Hammond mhamm...@users.sourceforge.net added the comment: I'm failing to get a new pywin32 out of the door due to this issue. I've spent a few hours playing with this and I think the analysis is generally correct here. The key thing is that when using distutils, the extensions end up with a manifest (albeit one without a reference to the CRT) whereas the extensions shipped with Python have no manifest at all. I agree with Martin that it seems strange the CRT fails to be used even though the CRT is obviously already loaded, but it seems to be a fact. I can't find much on this, but suspect it relates to the different activation contexts in use and how the activation contexts are designed to allow side-by-side loading of DLLs; Windows doesn't know if the version of the DLL already loaded is suitable. I also guess that the fact the DLL has *any* manifest means they use a more strict interpretation of things (ie, refuse to use already loaded ones) whereas a dll with no manifest gets given a little more slack. I can confirm that with the attached patch, pywin32 builds and installs fine on a machine without the CRT installed globally - so I'm +1 on this patch with one caveat: The check for '.pyd' should either be expanded to include '.dll', or else the check should just use the 'target_desc == CCompiler.EXECUTABLE' condition already used. I'm happy to make the change once I get some feedback and/or guidance about where I should check this in - I believe it is too late for python 2.6 which is a shame... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7330] PyUnicode_FromFormat segfault
STINNER Victor victor.stin...@haypocalc.com added the comment: It looks like your patch fixes #10829: you should add tests for that, you can just reuse the tests of my patch (attached to #10829). Sorry, but I think my patch doesn't fix #10829. Ah ok, so don't add failing tests :-) You should also avoid the creation of a temporary unicode object (it can be slow if precision is large) using PySequence_GetSlice(). Py_UNICODE_COPY() does already truncate the string because you can pass an arbitrary length. In order to use Py_UNICODE_COPY, I have to create a unicode object with required length first. No you don't. You can copy a substring of the input string with Py_UNICODE_COPY: just pass a smaller length. With your patch, %.200s truncates the input string to 200 *characters*, but I think that it should truncate to 200 *bytes*, as printf does. Sorry, I don't understand. The result of PyUnicode_FromFormatV() is a unicode object. Then how to truncate to 200 *bytes*? You can truncate the input char* on the call to PyUnicode_DecodeUTF8: pass a size smaller than strlen(s). case 's': { /* UTF-8 */ const char *s = va_arg(count, const char*); PyObject *str = PyUnicode_DecodeUTF8(s, strlen(s), replace); if (!str) goto fail; n += PyUnicode_GET_SIZE(str); /* Remember the str and switch to the next slot */ *callresult++ = str; break; } I don't know if we should truncate to a number of bytes, or a number of characters. I don't like this change because I hate having to compute manually strings length. It should that it would be easier if you format directly strings with width and precision at step 3, instead of doing it at step 4: so you can just read the length of the formatted string, and it avoids having to handle width/precision in two steps (which may be inconsistent :-/). Do you mean combine step 3 and step 4 together? Currently step 3 is just to compute the biggest width value and step 4 is to compute exact width and do the real format work. Only by doing real format we can get the exact width of a string. So I have to compute each width twice in both step 3 and step 4. Is combining the two steps in to one a good idea? Do you mean combine step 3 and step 4 together? Yes, but I am no more sure that it is the right thing to do. Can you add tests for %.s? I would like to know if %.s is different than %s :-) Err, '%.s' causes unexpected result both with and without my patch. Maybe it's still another bug? If the fix (always have the same behaviour) is short, it would be nice to include it in your patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com