[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue13280] argparse should use the new Formatter class

2013-08-08 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue12806] argparse: Hybrid help text formatter

2013-08-08 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue18693] help() not helpful with enum

2013-08-08 Thread Ethan Furman
Ethan Furman added the comment: With custom __dir__: Help on class Enum in module enum: Enum = Without custom __dir__: Help on class Enum in module enum: class Enum(builtins.object) | Generic enumeration. | | Derive from this clas

[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-08 Thread Larry Hastings
New submission from Larry Hastings: The getxattr() system call retrieves an "extended attribute" on a file. When you call it you pass in a buffer and a size. The expected behavior is, if you pass in a buffer that's too small, the function returns -1 and sets errno to ERANGE. On a ZFS filesy

[issue18606] Add statistics module to standard library

2013-08-08 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: A few small comments and nits. 1. I'm with the author on the question of a sum function in this module. The arguments that builtin sum isn't accurate enough, and neither is math.fsum for cases where all data is of infinite precision, are enough for me.

[issue18693] help() not helpful with enum

2013-08-08 Thread Ethan Furman
New submission from Ethan Furman: help(), when used on an enum member or class, returns almost nothing. I suspect the custom __dir__ is at fault, but whatever is causing the problem needs fixing. -- assignee: ethan.furman messages: 194714 nosy: barry, eli.bendersky, ethan.furman prior

[issue18692] Connection change in compiled code

2013-08-08 Thread R. David Murray
R. David Murray added the comment: This issue tracker is for reporting bugs in Python and its standard library. Your submission looks like a request for help. You are much more likely to get the answer to your question on the python-list mailing list. Please submit your question there. ---

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-08-08 Thread py.user
py.user added the comment: changed iter(arg) to *arg >>> import itertools >>> >>> class A(itertools.chain): ... @classmethod ... def from_iter(cls, arg): ... return cls(*arg) ... >>> class B(A): ... pass ... >>> B('ab', 'cd') <__main__.B object at 0x7fc280e93cd0> >>> b =

[issue18692] Connection change in compiled code

2013-08-08 Thread INNA
New submission from INNA: Hi, I have a compiled code, which currently uses SQLITE connection (datastore). I was wondering if it is possible to change the connection string to use SQL Server database. I would like to export the datastore to SQL server database, as we are having issues with th

[issue18691] sqlite3.Cursor.execute expects sequence as second argument.

2013-08-08 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue18691] sqlite3.Cursor.execute expects sequence as second argument.

2013-08-08 Thread Andrew Myers
New submission from Andrew Myers: Sorry if this isn't the place for this, it is my first python bug report. In PEP 249 Python database API specifiction 2.0 the Cursor execute method[1] is described as taking a variable number of arguments for substitution of '?' in the SQL string. In the docu

[issue14019] Unify tests for str.format and string.Formatter

2013-08-08 Thread Francisco Freire
Francisco Freire added the comment: I increased the coverage of formatter module to 40%. I added a new file "test_formatter.py" including some unit tests. -- keywords: +patch nosy: +francisco.freire Added file: http://bugs.python.org/file31202/mywork.patch _

[issue18679] include a codec to handle escaping only control characters but not any others

2013-08-08 Thread Derek Wilson
Derek Wilson added the comment: > e.encode('latin1', 'backslashreplace').decode('unicode-escape') this works, but still the quotes are backslash escaped. translate will do what i need for my use case, but it doesn't support streaming for larger chunks of data. it is nice that there is a work

[issue18690] memoryview not considered a sequence

2013-08-08 Thread Simon Feltman
New submission from Simon Feltman: This was a bit unexpected as memoryviews support all the methods of the Sequence abstract base class: >>> import collections >>> b = bytearray(b'asdf') >>> isinstance(b, collections.Sequence) True >>> m = memoryview(b) >>> isinstance(m, collections.Sequence) F

[issue18689] add argument for formatter to logging.Handler and subclasses in logging module

2013-08-08 Thread Derek Wilson
New submission from Derek Wilson: It is common when setting up a logger to create both a handler and a formatter. Nice format strings make logging better. Like this: >>> fmt_string = "%(asctime)s [%(levelname)-9s] %(name)s: %(message)s" We would use it like so: >>> from logging import getLog

[issue18688] Document undocumented Unicode object API

2013-08-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Include/unicodeobject.h contains followed names which are declared as public but are not documented in Doc/c-api/unicode.rst. PyUnicodeIter_Type Py_UNICODE_REPLACEMENT_CHARACTER PyUnicode_Resize PyUnicode_InternImmortal PyUnicode_CHECK_INTERNED PyUnicode_Fr

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2013-08-08 Thread Lukas Wunner
Lukas Wunner added the comment: Unfortunately this bug was only fixed in urllib2.py but never in urllib.py. This keeps biting people in the butt to this very day. Example: https://chromiumcodereview.appspot.com/10825107/ The attached patch remedies that and also fixes some more issues: (1) pr

[issue18687] Lib/test/leakers/test_ctypes.py still mentions the need to update Misc/build.sh

2013-08-08 Thread Févry Thibault
New submission from Févry Thibault: "# When this leak is fixed, remember to remove from Misc/build.sh LEAKY_TESTS." -> Misc/build.sh got removed 19 months ago, this should be updated. -- assignee: docs@python components: Documentation files: patch.diff keywords: patch messages: 194703 n

[issue18686] Tkinter focus_get on menu causes crash

2013-08-08 Thread R. David Murray
R. David Murray added the comment: We use the 'crash' type for interpreter crashes (segfaults). So goes under the 'behavior' type. -- nosy: +r.david.murray type: crash -> behavior ___ Python tracker _

[issue18686] Tkinter focus_get on menu results in KeyError

2013-08-08 Thread R. David Murray
Changes by R. David Murray : -- title: Tkinter focus_get on menu causes crash -> Tkinter focus_get on menu results in KeyError ___ Python tracker ___ ___

[issue18680] JSONDecoder should document that it raises a ValueError for malformed data

2013-08-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +easy stage: -> needs patch versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 ___ Python tracker ___ __

[issue18456] Documentation for PyDict_Update is incorrect

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-08-08 Thread py.user
py.user added the comment: >>> import itertools >>> >>> class A(itertools.chain): ... def from_iter(arg): ... return A(iter(arg)) ... >>> class B(A): ... pass ... >>> B('a', 'b') <__main__.B object at 0x7f40116d7730> >>> B.from_iter(['a', 'b']) <__main__.A object at 0x7f40116d7

[issue18445] Tools/Script/Readme is outdated

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18436] Add mapping of symbol to function to operator module

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18679] include a codec to handle escaping only control characters but not any others

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > this doesn't work if you use the wrong quote. without introspecting the data > in e you can't reliably choose whether to use "'%s'" '"%s"' '"""%s"""' or > "'''%s'''". Indeed. > and again tools other than python will run into escaped quotes in the data >

[issue18626] Make "python -m inspect " dump the source of a module

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree that it will be better to output a formalized report about a module and it's contents using inspect.getmoduleinfo() and inspect.getmembers(). -- nosy: +serhiy.storchaka ___ Python tracker

[issue18425] IDLE Unit test for IdleHistory.py

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18671] enhance formatting in logging package

2013-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset a206f952668e by Vinay Sajip in branch 'default': Closes #18671: Output more information when logging exceptions occur. http://hg.python.org/cpython/rev/a206f952668e -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected sta

[issue18423] Document limitations on -m

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti type: -> enhancement versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-li

[issue18410] IDLE Improvements: Unit test for SearchDialog.py

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18409] IDLE Improvements: Unit test for AutoComplete.py

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword

2013-08-08 Thread py.user
py.user added the comment: > This would require you to provide at least two elements I see how about "def repeatfunc(func, *args, times=None):" ? >>> from itertools import starmap, repeat >>> >>> def repeatfunc(func, *args, times=None): ... """Repeat calls to func with specified arguments.

[issue18381] unittest warnings counter

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> patch review type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue18375] python -m test --randseed 1234 does not randomize tests

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue18357] add tests for dictview set difference operations

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue18357] add tests for dictview set difference operations

2013-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0152152b09d0 by Ezio Melotti in branch '2.7': #18357: add tests for dictview set difference. Patch by Fraser Tweedale. http://hg.python.org/cpython/rev/0152152b09d0 New changeset 8b557ef46d7c by Ezio Melotti in branch '3.3': #18357: add tests for d

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18326] Mention 'keyword only' for list.sort, improve glossary.

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: "keyword-only" is a well-established term, and I think it's better to use it and possibly make it a link to the "parameter" entry of the glossary. -- nosy: +ezio.melotti stage: needs patch -> patch review ___ Python tr

[issue18686] Tkinter focus_get on menu causes crash

2013-08-08 Thread Jeffrey Goeders
New submission from Jeffrey Goeders: I am experiencing a crash when calling focus_get() when a Tk Menu has focus. Here is sample code, just click the menu and it will crash. import Tkinter as tk class App(tk.Tk): def __init__(self, *args, **kw): tk.Tk.__init__(self, *args, **kw)

[issue18626] Make "python -m inspect " dump the source of a module

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18628] Better index entry for encoding declarations

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mai

[issue18581] Duplicate test and missing class test in test_abc.py

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: +Python 3.3 ___ Pytho

[issue18581] Duplicate test and missing class test in test_abc.py

2013-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset e8f8f81c5af6 by Ezio Melotti in branch '3.3': #18581: remove duplicate test and run a test class that was skipped. Initial patch by Vajrasky Kok. http://hg.python.org/cpython/rev/e8f8f81c5af6 New changeset 328b1a29102c by Ezio Melotti in branch 'd

[issue18679] include a codec to handle escaping only control characters but not any others

2013-08-08 Thread Derek Wilson
Derek Wilson added the comment: > ast.literal_eval("'%s'" % e) this doesn't work if you use the wrong quote. without introspecting the data in e you can't reliably choose whether to use "'%s'" '"%s"' '"""%s"""' or "'''%s'''". which ones break (and break siliently) depend on the data. > e.enc

[issue18679] include a codec to handle escaping only control characters but not any others

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: ast.literal_eval("'%s'" % e) e.encode().decode('unicode-escape').encode('latin1').decode() e.encode('latin1', 'backslashescape').decode('unicode-escape') -- nosy: +serhiy.storchaka ___ Python tracker

[issue18588] timeit examples should be consistent

2013-08-08 Thread Clay McClure
Clay McClure added the comment: There's a 68% difference in running time between the command-line and programmatic invocations shown in the current documentation, and a 1% difference between the runtimes shown in the patch. I can't speak for why that is the case, but I did find it somewhat con

[issue18668] Properly document setting m_size in PyModuleDef

2013-08-08 Thread Nick Coghlan
Nick Coghlan added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue18677] Enhanced context managers with ContextManagerExit and None

2013-08-08 Thread Nick Coghlan
Nick Coghlan added the comment: Allowing a context manager to skip the statement body isn't a new proposal, and I previously argued your side. However, with multiple context managers, there is no invisible flow control. Two context managers are locally visible, which means the outer one completel

[issue18679] include a codec to handle escaping only control characters but not any others

2013-08-08 Thread Derek Wilson
Derek Wilson added the comment: using repr(x)[1:-1] is not safe for my use case as i need this for encoding and decoding data. the "deserialization" of repr would be eval, and aside from the security issues with that, if I strip the quotes off I can't reliably eval the result and get back the

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2013-08-08 Thread Eli Bendersky
Eli Bendersky added the comment: On Thu, Aug 8, 2013 at 7:14 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > Would you mind removing it from the patch, due to the case described > > above? > > ISTM that in real scenarios the sys.modules cache kicks in anyway. It > > should

[issue18685] Restore re performance to pre-PEP393 level

2013-08-08 Thread Matthew Barnett
Matthew Barnett added the comment: It appears that in your tests Python 3.2 is faster with Unicode than bytestrings and that unpatched Python 3.4 is a lot slower. I get somewhat different results (Windows XP Pro, 32-bit): C:\Python32\python.exe -m timeit -s "import re; f = re.compile(b'abc').s

[issue17974] Migrate unittest to argparse

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is the patch good? -- assignee: -> serhiy.storchaka keywords: +needs review ___ Python tracker ___ __

[issue18588] timeit examples should be consistent

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In command-line invocation the gc is disabled. And timit.repeat() is used instead of timit.timit(). -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2013-08-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Would you mind removing it from the patch, due to the case described > above? > ISTM that in real scenarios the sys.modules cache kicks in anyway. It > should not be really bypassed for any given sub-interpreter in sane > code. Yeah, I think you're right. I'll

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2013-08-08 Thread Eli Bendersky
Eli Bendersky added the comment: On Thu, Aug 8, 2013 at 7:00 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > This code in the beginning in PyInit__elementtree: > > > > m = PyState_FindModule(&elementtreemodule); > > if (m) { > > Py_INCREF(m); > > ret

[issue18673] Add and use O_TMPFILE for Linux 3.11

2013-08-08 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2013-08-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > This code in the beginning in PyInit__elementtree: > > m = PyState_FindModule(&elementtreemodule); > if (m) { > Py_INCREF(m); > return m; > } > > Can you explain what use case it tries to cover? I couldn't find > similar code in ot

[issue18604] Consolidate gui available checks in test.support

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18602] "_io" module names itself "io"

2013-08-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Have you tried to change it and run the test suite? Maybe it breaks > pickling or something similar? Yeah, it came to me that it may break pickle. The test suite may not pick it, though. -- ___ Python tracker

[issue18602] "_io" module names itself "io"

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: Have you tried to change it and run the test suite? Maybe it breaks pickling or something similar? -- nosy: +ezio.melotti ___ Python tracker ___

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2013-08-08 Thread Eli Bendersky
Eli Bendersky added the comment: > Can you explain what use case it tries to cover? What I'm trying to say is that although I think I understand its effect (if the same sub-interpreter re-imports _elementtree bypassing the Python module cache, this is an additional level of caching), I'm not s

[issue18592] IDLE: Unit test for SearchDialogBase.py

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2013-08-08 Thread Eli Bendersky
Eli Bendersky added the comment: Thanks Antoine. I think I understand the patch better now. Just a couple small questions and otherwise LGTM This code in the beginning in PyInit__elementtree: m = PyState_FindModule(&elementtreemodule); if (m) { Py_INCREF(m); return m;

[issue18588] timeit examples should be consistent

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: IIRC those were the actual values I got. I think I investigated why they were different, but right now I don't remember if I found out why. -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti versions: -Python 2.6, Python 3.1, Python 3.2, Pytho

[issue18576] Rename and document test.script_helper as test.support.script_helper

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue18668] Properly document setting m_size in PyModuleDef

2013-08-08 Thread Eli Bendersky
Eli Bendersky added the comment: Nick, you're right - m_size=0 is a valid value. How about the attached patch? -- Added file: http://bugs.python.org/file31199/issue18668.msize-fix.patch ___ Python tracker _

[issue18572] Remove redundant note about surrogates in string escape doc

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: I think it's OK to remove the sentence. Converting a surrogate pair to a non-BMP char is something that works only while decoding a UTF-16 byte sequence. Surrogates are invalid in UTF-8/32, and while dealing with Unicode strings, surrogates have no special mean

[issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: > it should be: "def repeatfunc(func, times, *args):" > and None for times described in the docstring This would require you to provide at least two elements, whereas now it's possible to pass just the function (e.g. repeatfunc(random.random)). The problem with

[issue18685] Restore re performance to pre-PEP393 level

2013-08-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Before PEP 393 the regex functions scanned an array of char or Py_UNICODE and character testing was cheap. After PEP 393 they checks a kind of an unicode string for every tested character and processing of unicode strings becomes slower. _sre.c already gen

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: > I would just remove the decorator. +1 -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs

[issue18267] xmlrpc.client documentation multicall example missleading for division behaviour of python3

2013-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 38d341ef28b3 by Ezio Melotti in branch '3.3': #18267: make whitespace consistent and fix an operator. http://hg.python.org/cpython/rev/38d341ef28b3 New changeset 9875410ed390 by Ezio Melotti in branch 'default': #18267: merge with 3.3. http://hg.pyt

[issue18267] xmlrpc.client documentation multicall example missleading for division behaviour of python3

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report! -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed status: open -> closed type: -> enhancement versions: -Python 3.1, Python 3.2 ___ Python tracker

[issue18273] Simplify calling and discovery of json test package

2013-08-08 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! (Thanks Ned too!) -- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue18273] Simplify calling and discovery of json test package

2013-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 95cf8640b271 by Ezio Melotti in branch '3.3': #18273: move the tests in Lib/test/json_tests to Lib/test/test_json and make them discoverable by unittest. Patch by Zachary Ware. http://hg.python.org/cpython/rev/95cf8640b271 New changeset f7ed301e71

[issue18416] Move to absolute file paths for module.__file__

2013-08-08 Thread Brett Cannon
Brett Cannon added the comment: So this is bringing up a sticky situation that I ran across when initially implementing all of this: what should sys.path_importer_cache use as a key? '' would be what happens with Madison's option 3, and with option 1 it would be os.getcwd(). Now if you iterate

[issue18683] Core dumps on CentOS

2013-08-08 Thread R. David Murray
R. David Murray added the comment: Can you reproduce this using 2.7? 2.6 only gets security fixes. -- nosy: +r.david.murray ___ Python tracker ___ __

[issue18684] Pointers point out of array bound in _sre.c

2013-08-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In _sre.c pointers can point out of boundaries of array. This is an undefined behavior and is one of causes of a bug in issue17998 (end-ptr can be negative). The proposed patch change code to check if pointers will point out of boundaries before their chan

[issue18683] Core dumps on CentOS

2013-08-08 Thread Marc Schlaich
New submission from Marc Schlaich: I'm running unittests on a CentOS 6.4 Virtual Box slave via Jenkins on a Windows host. Randomly I get core dumps for no obvious reason. I don't use any C extension in my code and don't use ctypes. The (proprietary) software is plain Python with a multi-threaded

[issue18677] Enhanced context managers with ContextManagerExit and None

2013-08-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Using my latest patch, the ExitStack inline example can be rewritten: with ExitStack() as stack: files = [stack.enter_context(open(fname)) for fname in filenames] # All opened files will automatically be closed at the end of

[issue18677] Enhanced context managers with ContextManagerExit and None

2013-08-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Thanks, Eric. I read that bit and I can't say that I disagree. And I'm not necessarily advocating that "skipping the body" become a standard feature of context managers. But it is a necessary functionality if you want to be able to dynamically nest one

[issue18677] Enhanced context managers with ContextManagerExit and None

2013-08-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I've modified the patch. The problem that nested_delayed was trying to solve are "hybrid" context managers, ones that allocate resources during __init__ and release them at exit. A proper context manager should allocate resources during __enter__, an

[issue8713] multiprocessing needs option to eschew fork() under Linux

2013-08-08 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Richard, can you say what failed on the OS X 10.4 (Tiger) buildbot? There seems to be a problem which depends on the order in which you run the test, and it happens on Linux also. For example if I do ./python -m test -v \ test_multiprocessing_for

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Larry Hastings
Larry Hastings added the comment: Okay then, closing. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Georg Brandl
Georg Brandl added the comment: Looks like an unnecessary change for the maintenance releases then. -- ___ Python tracker ___ ___ Pyth

[issue18682] [PATCH] remove bogus codepath from pprint._safe_repr

2013-08-08 Thread Michal Vyskocil
Changes by Michal Vyskocil : Added file: http://bugs.python.org/file31194/check.py ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue18682] [PATCH] remove bogus codepath from pprint._safe_repr

2013-08-08 Thread Michal Vyskocil
Michal Vyskocil added the comment: This is simple code checks if .isalnum is or is not locale sensitive and a small measurement of how much is the repr faster, compared to old codepath. BTW: python3 test_pprint.py on patched version have succeeded OK (expected failures=1) --

[issue18682] [PATCH] remove bogus codepath from pprint._safe_repr

2013-08-08 Thread Michal Vyskocil
New submission from Michal Vyskocil: pprint._safe_repr for type str uses much slower codepath by default, which does not makes a sense in Python3 context. Instead of simply using repr, it check the existence of 'locale' in sys.modules and if found, it goes one-by-one-char call str.isalpha() on

[issue8713] multiprocessing needs option to eschew fork() under Linux

2013-08-08 Thread Ned Deily
Ned Deily added the comment: Richard, can you say what failed on the OS X 10.4 (Tiger) buildbot? FWIW, I tested b3620777f54c.diff (and commented out the darwin skip of test_multiprocessing_forkserver) on OS X 10.4, 10.5, and 10.8. There were no failures on any of them. The only vaguely suspi

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The original issue was fixed in issue4591. Larry's patch only adds support of PyNumber_Index() and refactors already existing uid/gid converters. -- ___ Python tracker _

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think we should leave 2.7 at rest for the moment. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2013-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Embedding JSON inside

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Larry Hastings
Larry Hastings added the comment: Now fixed in trunk. I am waiting to hear from Georg and the only-recently-pinged Benjamin to see if they want these fixes in 3.3 or 2.7. -- ___ Python tracker ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset f871f8662509 by Larry Hastings in branch 'default': Issue #15301: Parsing fd, uid, and gid parameters for builtins http://hg.python.org/cpython/rev/f871f8662509 -- ___ Python tracker