[issue7076] Documentation add note about SystemRandom
chuck jan.hos...@gmail.com added the comment: I think many people who are looking for a random number generator end up on this page and need to be informed if there are alternatives so they can make up their own mind. If you want to discourage people to use it, that's fine and we can do so, but I think it's wrong to hide it from people who don't suspect random functions which are os dependent to be in the os package instead of the random package or don't even know about the os random facility. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7256] parse_qs and parse_qsl in urlparse are not documented as New in version 2.6
New submission from Jeroen Habraken vexoc...@gmail.com: The parse_qs and parse_qsl functions in the urlparse module seem to be new since version 2.6, though this is not documented, please add New in version 2.6.. -- assignee: georg.brandl components: Documentation messages: 94860 nosy: VeXocide, georg.brandl severity: normal status: open title: parse_qs and parse_qsl in urlparse are not documented as New in version 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Changes by Thomas Guettler guet...@thomas-guettler.de: -- nosy: +guettli ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6462] bsddb3 intermittent test failures
R. David Murray rdmur...@bitdance.com added the comment: Unless someone objects, I'm going to disable the replication timeout check unconditionally, since it is the worst culprit for buildbot stability on 2.x. Note that issue 3892 indicates it happens consistently on windows, and there was already a partial disable for that platform. All the other tests usually succeed even if that particular assert fails. -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6462 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7255] Default word boundaries for Unicode data?
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7255 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7117] Backport py3k float repr to trunk
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch for correctly-rounded round in trunk. This patch doesn't change the rounding behaviour between 2.6 and 2.7: it's still doing round-half-away-from-zero instead of round-half-even. It was necessary to detect and treat halfway cases specially to make this work. Removing this special case code would be easy, so we can decide later whether it's worth changing round to do round-half-to-even for 2.7. I want to let this sit for a couple of days before I apply it. -- keywords: +patch Added file: http://bugs.python.org/file15254/round_fixup.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7257] Improve documentation of list.sort and sorted()
New submission from Ole Laursen o...@iola.dk: On my Python 3.1, help() for sorted returns sort(...) L.sort(key=None, reverse=False) -- stable sort *IN PLACE* sorted(...) sorted(iterable, key=None, reverse=False) -- new sorted list Kindly suggest this be expanded. Here's some text: sort(...) Sorts the sequence with a fast stable sort. The sequence is modified in place. To remind you of this, the function always returns None. Example: a = [1, 3, 2] a.sort() # a is now [1, 2, 3] Use the sorted() built-in function if you need to preserve the original list. Set reverse to True to sort the elements in reverse order. A function for extracting a key for comparison from each object can be passed in as key, e.g. a = [{'k': 'foo'}, {'k': 'bar'}] a.sort(key=lambda x: x['k']) # a is now [{'k': 'bar'}, {'k': 'foo'}] Note that key can be used to solve many sorting problems, e.g. key=str.lower can be used for case-insensitive sorting and key=lambda x: (x['a'], x['b']) can be used to sort by first 'a' then 'b'. The sort is stable which means that the relative order of elements that compare equal is not changed. sorted(...) Sorts the sequence with a fast stable sort and returns a new list with the result. Example: [same text as before] I'm not sure how this interacts with what's in the online help (http://docs.python.org/3.1/library/stdtypes.html search for sort(), maybe the text could just be copied over. I think it's important to give copy-pasteable examples for something as important as this, and hint at how you solve common sorting problems. -- assignee: georg.brandl components: Documentation messages: 94863 nosy: georg.brandl, olau severity: normal status: open title: Improve documentation of list.sort and sorted() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7257] Improve documentation of list.sort and sorted()
Georg Brandl ge...@python.org added the comment: Raymond, do you have an opinion on this? -- assignee: georg.brandl - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4969] mimetypes on Windows should read MIME database from registry (w/patch)
Antoine Pitrou pit...@free.fr added the comment: A couple of points: - if the method is Windows-specific, I don't think it shouldn't bear a name as generic as read_registry(). There are registries on other systems. - the method should probably raise early on non-Windows systems (raise NotImplementedError?) - please fix the coding style; don't collapse a try, except or finally and the following statement on a single line - in the tests, rather than defining an empty test case on non-Windows systems, make the tests skip (for example, call self.skipTest() -- nosy: +pitrou priority: - normal stage: - patch review type: - feature request versions: +Python 3.2 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7257] Improve documentation of list.sort and sorted()
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I'm inclined to leave the on-line help docstring as-is (pretty much everywhere, we adopt a style of terse reminders instead of lengthy prose with examples). Instead, was thinking of updating the sorting how-to and providing a link to it from the main docs. -- priority: - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7256] parse_qs and parse_qsl in urlparse are not documented as New in version 2.6
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r76095 and will backport. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests
Phillip J. Eby p...@telecommunity.com added the comment: This is not an issue with CGI, but an issue with using an inappropriate WSGI handler for a long-running process environment that only emulates CGI. That is, in a true CGI environment, there can't be *multiple* requests made to CGIHandler, and so it can't leak. In normal (i.e. pre-GAE) long-running web environments, os.environ would not contain any request information, only the process startup environment. This limitation of CGIHandler should be better documented, but it's a natural consequence of its design. The os_environ and base_environ variables are provided so that subclasses with specialized needs can handle them differently, and GAE is definitely a specialized need. If someone wants to provide a GAEHandler class, great; otherwise, the documented way to run a WSGI app under GAE is the google.appengine.ext.webapp.util.run_wsgi_app function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5094] datetime lacks concrete tzinfo impl. for UTC
Changes by Brett Cannon br...@python.org: -- assignee: brett.cannon - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7257] Improve documentation of list.sort and sorted()
Changes by Georg Brandl ge...@python.org: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7258] test_multiprocessing leaves a temporary directory
New submission from Antoine Pitrou pit...@free.fr: On my buildbot, test_multiprocessing, although it succeeds, leaves an empty temporary directory behind it (something like /tmp/pymp-UHJdgH/). -- assignee: jnoller components: Tests messages: 94874 nosy: jnoller, pitrou, r.david.murray priority: low severity: normal stage: needs patch status: open title: test_multiprocessing leaves a temporary directory type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4
Changes by Antoine Pitrou pit...@free.fr: -- components: +Library (Lib) priority: - normal stage: - needs patch versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7247 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4
Antoine Pitrou pit...@free.fr added the comment: That test was added as part of #1309352, to check that fcntl accepted 64-bit arguments on 64-bit systems. Previously it would raise an OverflowError. Perhaps we should silent the IOError, since it only shows that the OS refuses that particular case, not that the Python wrapper is at fault. (seeing you have problems, I don't know how to make the test pass reliably on all systems; it does pass on my x86-64 system) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7247 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4969] mimetypes on Windows should read MIME database from registry (w/patch)
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ocean-city ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7217] IDLE Subprocess Startup Error
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Do you have some Queue.py in your PYTHONPATH, before the standard one? What do you get when starting python from cmd: import Queue print Queue (It should be module 'Queue' from 'C:\Python26\lib\Queue.pyc') -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7217 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7257] Improve documentation of list.sort and sorted()
Ole Laursen o...@iola.dk added the comment: If you think it's too long, here's a shorter version: Sorts sequence in place with a fast stable sort, returning None. key is a function for extracting a comparison key from each element, e.g. key=lambda x: x['name'] or key=str.lower. reverse=True reverses the result order. a = [1, 3, 2] a.sort() # a is now [1, 2, 3] Use the sorted() built-in function if you need to preserve the original list. Is this better? You could whack the last comment about sorted and/or the example, then it's about the same length as the other built-in docstrings (e.g. zip, reduce, getattr). -- nosy: -rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests
Phillip J. Eby p...@telecommunity.com added the comment: Hm. In retrospect, CGIHandler should probably just set os_environ to an empty dictionary in its class body (thereby not using the cached environ), and this would then work correctly for repeated uses. This would be a clean bugfix and wouldn't affect behavior for any existing uses of CGIHandler that weren't already worse broken than the GAE case. ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7240] subprocess.Popen.stdout.flush fails os OS-X 10.6.1
Changes by Philip Jenvey pjen...@underboss.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7240 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4969] mimetypes on Windows should read MIME database from registry (w/patch)
Changes by Timothy Farrell tfarr...@swgen.com: -- nosy: +tercero12 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7258] test_multiprocessing leaves a temporary directory
Antoine Pitrou pit...@free.fr added the comment: Hmm, apparently it is automatically removed at the end of the test suite. Sorry for the noise :) -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests
Brandon Bloom snprbo...@gmail.com added the comment: That is, in a true CGI environment, there can't be *multiple* requests made to CGIHandler, and so it can't leak. In normal (i.e. pre-GAE) long-running web environments, os.environ would not contain any request information, only the process startup environment. That's fair. In this case the CGIHandler should raise an exception on subsequent requests to prevent this programming error. If someone wants to provide a GAEHandler class, great; otherwise, the documented way to run a WSGI app under GAE is the google.appengine.ext.webapp.util.run_wsgi_app function. I'm not sure if run_wsgi_app was available right from the start, as some early tutorials and samples show using CGIHandler. That's how we ran into this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7257] Improve documentation of list.sort and sorted()
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Will look at it and make an update, but not right away. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7206] 64 bit python fails on Windows 7
Rich Healey ri...@psych0tik.net added the comment: Carey I can send you the steps I used to create the dump if you like so we can check if it's the same issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7259] Documentation update for operator module
New submission from Gabriel Genellina gagsl-...@yahoo.com.ar: This patch fixes some issues with the documentation of the operator module: - docstrings for all augmented assignments incorrectly stated, e.g., `operator.iadd(a,b)` is the same as `a += b`. The main documentation shows `a = operator.iadd(a,b)` instead, and that's correct. This patch updates all affected docstrings in the operator.c module. - Added +obj to the table of operators. - Replaced getslice/setslice/delslice examples (deprecated) with their getitem/setitem/delitem equivalents. This change unfortunately made the table some characters wider. Originally reported by Juanjo Conti: http://permalink.gmane.org/gmane.org.user-groups.python.argentina/28596 -- assignee: georg.brandl components: Documentation files: operator.diff keywords: patch messages: 94878 nosy: gagenellina, georg.brandl severity: normal status: open title: Documentation update for operator module versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file15255/operator.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7259 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7260] SyntaxError with a not-existing offset for unicode code
New submission from Noam Raphael noamr...@gmail.com: Hello, This is from the current svn: ./python Python 3.2a0 (py3k:76104, Nov 4 2009, 08:49:44) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. try: ... eval(u'שלום') ... except SyntaxError as e: ... e ... SyntaxError('invalid syntax', ('string', 1, 11, u'שלום')) As you can see, the offset (11) refers to a non-existing character, as the code contains only 7 characters. Thanks, Noam -- components: Interpreter Core messages: 94879 nosy: noam severity: normal status: open title: SyntaxError with a not-existing offset for unicode code versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests
Brandon Bloom snprbo...@gmail.com added the comment: Hm. In retrospect, CGIHandler should probably just set os_environ to an empty dictionary in its class body (thereby not using the cached environ), and this would then work correctly for repeated uses. This would be a clean bugfix and wouldn't affect behavior for any existing uses of CGIHandler that weren't already worse broken than the GAE case. ;-) Yup, rock on with that :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7260] SyntaxError with a not-existing offset for unicode code
Ezio Melotti ezio.melo...@gmail.com added the comment: Apparently the position of the caret is based on the number of bytes in the line, not on the characters: [aaa for x in] File stdin, line 1 [aaa for x in] ^ SyntaxError: invalid syntax [äää for x in] File stdin, line 1 [äää for x in] ^ SyntaxError: invalid syntax In this example each ä takes two bytes so the caret is 3 extra chars on the right. -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7259] Documentation update for operator module
Georg Brandl ge...@python.org added the comment: Thanks, applied in r76105. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7259 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7260] SyntaxError with a not-existing offset for unicode code
Ezio Melotti ezio.melo...@gmail.com added the comment: This is actually a duplicate of #2382, so I'm closing it. #2382 also has some patch. -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com