[issue16659] Pure Python implementation of random

2012-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: I wonder whether it would make sense to use an array to hold the MT state, for a closer match with the C code. (Not sure whether this would have a noticeable effect on performance.) -- ___ Python tracker

[issue16662] load_tests not invoked in package/__init__.py

2012-12-11 Thread Robert Collins
New submission from Robert Collins: In loader.py: if fnmatch(path, pattern): # only check load_tests if the package directory itself matches the filter name = self._get_name_from_path(full_path) package =

[issue12600] Add example of using load_tests to parameterise Test Cases

2012-12-11 Thread Robert Collins
Robert Collins added the comment: BTW I'm very happy with testscenarios (on pypi) for this, modulo one small issue which is the use of __str__ by the stdlib [which isn't easily overridable - there is a separate issue on that]. I'd be delighted to have testscenarios be in the stdlib, if thats

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Tests now test both implementation. Thank Ezio for tip. -- Added file: http://bugs.python.org/file28279/random_pure_python_2.patch ___ Python tracker rep...@bugs.python.org

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Pure Python implementation of random ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16651 ___

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I wonder whether it would make sense to use an array to hold the MT state, for a closer match with the C code. I don't think it makes sense. The algorithm is same and list is more natural for Python. Also arrays a little slower than lists, but it doesn't

[issue16656] os.walk ignores international dirs on Windows

2012-12-11 Thread anatoly techtonik
anatoly techtonik added the comment: In Python 3 it fails with UnicodeEncodeError in C:\Python33\lib\encodings\cp437.py, while Vista's 'dir' command shows everything correctly in the same console, so somebody definitely overlooked that aspect. This bug is clearly an issue for developers who

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: What's the purpose of these alternate implementations? For education, experiments? As a replacement for other VMs? Other modules that could be considered: marshal operator unicodedata -- ___ Python tracker

[issue16656] os.walk ignores international dirs on Windows

2012-12-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: - Do you have a full traceback of the failing os.walk() in Python3.3? - What's the result of os.listdir(u'.') ? -- nosy: +amaury.forgeotdarc status: pending - open ___ Python tracker rep...@bugs.python.org

[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods

2012-12-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: Close the issue as duplicate for #16490 -- nosy: +asvetlov resolution: - duplicate stage: test needed - committed/rejected status: open - closed superseder: - inspect.getargspec() and inspect.getcallargs() don't work for builtins

[issue16656] os.walk ignores international dirs on Windows

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are the results of os.listdir(b'.') and os.listdir(u'.') on Python 2.7 and Python 3.3+? What are the results of os.stat(b'Русское имя') and os.stat(b'Русское имя') on Python 2.7 and Python 3.3+? What are the results of sys.getdefaultencoding(),

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: How Argument Clinic solves problems like #16490? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16612 ___ ___

[issue16659] Pure Python implementation of random

2012-12-11 Thread Brett Cannon
Brett Cannon added the comment: To see how to write tests that exercise both the C and Python versions look at test_heapq and test_warnings as examples. It will require some refactoring, but it's easy to do. -- ___ Python tracker

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-11 Thread Brett Cannon
Brett Cannon added the comment: Alex: yes, the builtins could almost all be re-implemented in pure Python, but there is a performance consideration vs. benefit (e.g. if we re-implemented map() in Python which VMs would use it vs. implement it in some native way for performance?). But one

[issue16656] os.walk ignores international dirs on Windows

2012-12-11 Thread R. David Murray
R. David Murray added the comment: My guess is that your unicode issue is issue 1602, which is non-trivial to solve. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16656 ___

[issue16662] load_tests not invoked in package/__init__.py

2012-12-11 Thread R. David Murray
R. David Murray added the comment: test_email is a package, and has a load_tests in its __init__.py that I had to add in order to make python -m unittest test.test_email work. So I'm not sure what bug you are reporting here. -- nosy: +r.david.murray

[issue16663] Poor documentation for METH_KEYWORDS

2012-12-11 Thread r3m0t
New submission from r3m0t: http://docs.python.org/3.3/c-api/structures.html#METH_KEYWORDS Methods with these flags must be of type PyCFunctionWithKeywords. The function expects three parameters: self, args, and a dictionary of all the keyword arguments. The flag is typically combined with

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I used test_heapq and test_decimal as an example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659 ___

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28278/random_pure_python.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659 ___

[issue16656] os.walk ignores international dirs on Windows

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My guess is that your unicode issue is issue 1602, which is non-trivial to solve. In such case the output will be something like: ['English name', ''] [] [] -- ___ Python tracker rep...@bugs.python.org

[issue16596] Skip stack unwinding when next, until and return pdb commands executed in generator context

2012-12-11 Thread Xavier de Gaye
Xavier de Gaye added the comment: The 'until' command is also broken (by xdegaye's patch) when issued at a return debug event and not debugging a generator. This new patch fixes both problems. The patch also adds another test case to check that pdb stops after a 'next', 'until' or 'return'

[issue16664] [PATCH] Test Glob: files starting with .

2012-12-11 Thread Sebastian Kreft
New submission from Sebastian Kreft: Please find attached a patch to improve the test cases for the glob module. It adds test cases for files starting with '.'. -- components: Tests files: python.patch keywords: patch messages: 177345 nosy: Sebastian.Kreft priority: normal severity:

[issue16662] load_tests not invoked in package/__init__.py

2012-12-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: I think he's saying that a test package will never be discovered by default, because the default value of discover()'s pattern argument is test*.py: http://hg.python.org/cpython/file/bc322469a7a8/Lib/unittest/loader.py#l152 So I think he wants package

[issue16664] [PATCH] Test Glob: files starting with .

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue16618. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16664 ___ ___

[issue16641] sched.scheduler.enter arguments should not be modifiable

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. Thanks Amaury for nits. -- Added file: http://bugs.python.org/file28282/sched_nonmodifiable_args_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16641

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28283/random_pure_python_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659 ___

[issue16659] Pure Python implementation of random

2012-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file28279/random_pure_python_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16659 ___

[issue11290] ttk.Combobox['values'] String Conversion to Tcl

2012-12-11 Thread Jayden Kneller
Jayden Kneller added the comment: I also ran into this issue in python 3.3 64bit on windows 7. I was adding paths into a combo box and was escaping all \'s myself. When I created a folder with a space I noticed the paths with the space had double the \'s I wanted. I removed my escaping and

[issue16665] doc for builtin hex() is poor

2012-12-11 Thread rurpy the second
New submission from rurpy the second: The documentation of the hex() builtin function is poor. Specifically it does not say (directly) that: 1. The resulting string is prefixed with 0x. 2. Any a-f characters used are lower case. 3. Negative integers are converted by prefixing a minus sign

[issue16662] load_tests not invoked in package/__init__.py

2012-12-11 Thread Robert Collins
Robert Collins added the comment: I have a package with tests in it. If the tests match test*.py, they are loaded, and load_tests within each one called. But load_tests on the package isn't called. If I change the pattern supplied by the user to match the package, then the tests within

[issue11290] ttk.Combobox['values'] String Conversion to Tcl

2012-12-11 Thread Jayden Kneller
Jayden Kneller added the comment: I should also add that I yellow highlighed where the space is in the image I attached so it easier to see. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11290

[issue11290] ttk.Combobox['values'] String Conversion to Tcl

2012-12-11 Thread Jayden Kneller
Jayden Kneller added the comment: On a side note: If you pass raw string literals into the combo box as values this issue doesn't happen. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11290

[issue16665] doc for builtin hex() is poor

2012-12-11 Thread Ezio Melotti
Ezio Melotti added the comment: +1 -- keywords: +easy nosy: +ezio.melotti stage: - needs patch type: - enhancement versions: -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16665

[issue11290] ttk.Combobox['values'] String Conversion to Tcl

2012-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue15861 has a more general patch which fixes also this issue. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11290 ___

[issue2516] Instance methods are misreporting the number of arguments

2012-12-11 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2516 ___ ___ Python-bugs-list

[issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x

2012-12-11 Thread Mikel Ward
New submission from Mikel Ward: The docs for 2.6 and 2.7 say socket.getaddrinfo takes keyword arguments. http://docs.python.org/release/2.6.6/library/socket.html?highlight=socket#socket.getaddrinfo socket.getaddrinfo(host, port, family=0, socktype=0, proto=0, flags=0) But that doesn't

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-11 Thread Stefan Krah
Stefan Krah added the comment: Larry Hastings rep...@bugs.python.org wrote: I disagree that the Clinic DSL is verbose. Certainly I find it more succinct than what we do now. I was referring to the total size of the generated output, not to the DSL. On the other hand, the syntax you

[issue16667] timezone docs need versionadded: 3.2

2012-12-11 Thread Nick Coghlan
New submission from Nick Coghlan: The docs for the fixed offset timezone objects added in 3.2 need a versionadded tag. Also, the see also link for pytz in the preceding section still incorrectly states that the stdlib only provides UTC as a timezone, rather than handling arbitrary fixed

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: doesn't the size of code setting up ParseTupleWithKeywords and checking the values afterwards bother you? that's the same thing only much less consistent. -- ___ Python tracker rep...@bugs.python.org

[issue16667] timezone docs need versionadded: 3.2

2012-12-11 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - docs@python components: +Documentation nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16667 ___

[issue16667] timezone docs need versionadded: 3.2

2012-12-11 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +easy nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16667 ___ ___

[issue16629] IDLE: Calltips test fails due to int docstring change

2012-12-11 Thread Roger Serwy
Roger Serwy added the comment: @Chris: Thanks for applying the patch. As for IDLE tests, there are no official tests. Issue15392 calls for the creation of a unit test framework. There are a few tests in some of IDLE, such as the ones in CallTips. Terry added much needed improvement for those

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-12-11 Thread Roger Serwy
Roger Serwy added the comment: I haven't had any serious problems with calltips on the dev branches for 2.7 and 3.4, except for issue16630. I think this issue can be closed as being completed in order to avoid further expanding its scope. Feel free to reopen if anyone disagrees. --

[issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x

2012-12-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: This might be a good place to use the newly-documented positional-only nomenclature: http://docs.python.org/2.7/glossary.html#term-parameter -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org

[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2012-12-11 Thread Ezra Berch
Ezra Berch added the comment: Here's a patch to do this, including some tests for the changed behavior. -- keywords: +patch nosy: +ezberch Added file: http://bugs.python.org/file28285/issue15045.patch ___ Python tracker rep...@bugs.python.org

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2012-12-11 Thread joelpitt
joelpitt added the comment: Just ran into this problem using Python 2.7.3 and the issue others mention in conjunction with Django. Note the 2.7 docs still imply it's ASCII: http://docs.python.org/2/library/pickle.html#data-stream-format It has a weak caveat (and of some other characteristics

[issue16665] doc for builtin hex() is poor

2012-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 for the suggested text. For some of the points, a couple examples will do a better job of explaining hex() that trying to write-out the full code specification in prose. Overly wordy documentation is harder to use than something short that addresses

[issue16665] doc for builtin hex() is poor

2012-12-11 Thread Ezio Melotti
Ezio Melotti added the comment: FTR my +1 was about the suggestion, not the proposed text. The first 3 points can be explained with an example, the last 2 can be added in the prose. I also agree that notes are not necessary (especially if they use the note rst directive). --