[issue18693] help() not helpful with enum

2013-08-11 Thread Ethan Furman
Ethan Furman added the comment: Huh. I just checked `help(Color)` on my proposed __dir__ and got the two-line, rather useless, response. Perhaps help() is broken with all custom __dir__s. -- ___ Python tracker _

[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2013-08-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Smells like a new feature to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue18702] Report skipped tests as skipped

2013-08-11 Thread Vajrasky Kok
Vajrasky Kok added the comment: I read the patch. It looks good. Anyway, I have two questions: 1. I saw 3 variants of writing description for skipping test descriptor: requires os.mkfifo test needs socket.inet_pton() needs os.read Which one is the preferred way to go? "requires" or "test ne

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2013-08-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Please wrap the "businesss" part of the test function in a try... finally. Otherwise the patch looks good. -- nosy: +benjamin.peterson ___ Python tracker __

[issue18660] os.read behavior on Linux

2013-08-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is not a Python bug. Linux is just not accepting "0" as a valid size argument to read(). You don't see this using libc.read because you don't check errno. Just don't call os.read() if size == 0. -- resolution: -> invalid status: open -> closed

[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2013-08-11 Thread Stefan Behnel
Stefan Behnel added the comment: As I already suggested for lxml, you can use the QName class to process qualified names, e.g. QName(some_element.tag).localname Or even just QName(some_element).localname It appears that ElementTree doesn't support this. It lists the QName type as "o

[issue18660] os.read behavior on Linux

2013-08-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Can you please explain what the bug is in Python; that is, what exactly was wrong with os.read? -- nosy: +benjamin.peterson ___ Python tracker _

[issue16038] ftplib: unlimited readline() from connection

2013-08-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: I suppose this is fine for 2.7 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2013-08-11 Thread Stefan Behnel
Stefan Behnel added the comment: Please leave the title as it is now. -- title: ElementTree gets awkward to use if there is an xmlns -> ElementTree -- provide a way to ignore namespace in tags and seaches ___ Python tracker

[issue18304] ElementTree gets awkward to use if there is an xmlns

2013-08-11 Thread Bryce Nesbitt
Bryce Nesbitt added the comment: The mere existence of popular solutions like 'item.tag.split("}")[1][0:]' argues something is wrong. What could lmxl do to make this cleaner (even if the ticket proposal is junk). -- title: ElementTree -- provide a way to ignore namespace in tags and sea

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

2013-08-11 Thread Madison May
Madison May added the comment: > I'm currently leaning towards having sys.path_importer_cache store > the actual directory name. Exactly what I meant by "Creating a new entry in sys.path_importer_cache after changing directories and importing a new module", but expressed much more succinctly

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-11 Thread STINNER Victor
STINNER Victor added the comment: +if (make_inheritable(py_fds_to_keep) < 0) +goto error; +/* errpipe_write is part of py_fds_to_keep. It must be closed at + exec(), but kept open in the child process until exec() is called. */ +if (_Py_set_inheritable((int)errpipe_write

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-11 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file31058/c066794c85cd.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-11 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file31234/1f8979a8c2c5.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-11 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file31235/e4e6f45668c7.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-11 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file31234/1f8979a8c2c5.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18693] help() not helpful with enum

2013-08-11 Thread Ethan Furman
Ethan Furman added the comment: So what do we want Enum's __dir__ to report? Normally we see things like __eq__, __dict__, __getnewargs__, etc. For IntEnum there would be __abs__, __floor__, __div__, etc. Do we want to worry about those kinds of differences? I think we do. And if we do, then

[issue16799] start using argparse.Namespace in regrtest

2013-08-11 Thread Eli Bendersky
Eli Bendersky added the comment: Chris, I was reading through regrtest.py for other reasons and stumbled upon the pointer to this issue. Would you like to update your patch? I will review it. -- nosy: +eli.bendersky ___ Python tracker

[issue12645] test.support. import_fresh_module - incorrect doc

2013-08-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset edaf44136d32 by Eli Bendersky in branch '3.3': Issue #12645: Clarify and reformat the documentation of import_fresh_module http://hg.python.org/cpython/rev/edaf44136d32 New changeset d809ef0e by Eli Bendersky in branch 'default': Close #12645: C

[issue18702] Report skipped tests as skipped

2013-08-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Applies and runs (with text_posix entirely skipped). -- ___ Python tracker ___ ___ Python-bugs-list

[issue18702] Report skipped tests as skipped

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ezio and Terry for review. Here is updated patch. Problems with class initialization solved. I have made a lot of other changes especially in test_os.py and test_posix.py. -- Added file: http://bugs.python.org/file31233/skip_tests_2.patch

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

2013-08-11 Thread Brett Cannon
Brett Cannon added the comment: To answer Eric's question: yes. Since no one seems to be screaming that sys.path be the only place to have the concept of a relative path, then let's use only absolute paths except in sys.path for ''. -- ___ Python t

[issue16968] Fix test discovery for test_concurrent_futures.py

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this problem deserves a discussion on Python-Dev: http://comments.gmane.org/gmane.comp.python.devel/141068 . -- ___ Python tracker __

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-08-11 Thread Ben Hoyt
Ben Hoyt added the comment: Thanks, Tim! Works for me! A couple of code review comments: 1) On 2.7, guess_type(s)[0] is a byte string as usual if the type doesn't exist in the registry, but it's a unicode string if it came from the registry. Seems like it should be a byte string in all cases (

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

2013-08-11 Thread Seydou Dia
Seydou Dia added the comment: Since I am already on bugs.python.org/issue18578 I will tackle this issue, if you don't mind. -- nosy: +seydou ___ Python tracker ___ _

[issue18702] Report skipped tests as skipped

2013-08-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: The patch applies cleanly on my 3.4 Win 7, fresh debug build. Somewhat fortuitously, as it turns out, I have not downloaded the files needed for ssl support. For each modified file, I ran python_d -m test -v test_xxx test test_nntplib crashed -- Traceback (mos

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2013-08-11 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2013-08-11 Thread Eli Bendersky
Eli Bendersky added the comment: > (although, admittedly, sometimes it's those who designed the XML format who didn't understand >namespaces ...). I fully concur. The design of XML, in general, is not the best demonstration of aesthetics in programming. But namespaces always seem to me to be one

[issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper

2013-08-11 Thread Seydou Dia
Seydou Dia added the comment: I am working on a patch. -- nosy: +seydou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue18681] typo in imp.reload

2013-08-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset dab790a17c4d by Serhiy Storchaka in branch '3.3': Issue #18706: Fix a test for issue #18681 so it no longer breaks test_codeccallbacks*. http://hg.python.org/cpython/rev/dab790a17c4d New changeset 1f4aed2c914c by Serhiy Storchaka in branch 'default

[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset dab790a17c4d by Serhiy Storchaka in branch '3.3': Issue #18706: Fix a test for issue #18681 so it no longer breaks test_codeccallbacks*. http://hg.python.org/cpython/rev/dab790a17c4d New changeset 1f4aed2c914c by Serhiy Storchaka in branch 'default

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2013-08-11 Thread Stefan Behnel
Stefan Behnel added the comment: Just to reiterate this point, lxml.etree supports a "pretty_print" flag in its tostring() function and ElementTree.write(). It would thus make sense to support the same thing in ET. http://lxml.de/api.html#serialisation For completeness, the current signature

[issue18670] Using read_mime_types function from mimetypes module gives resource warning

2013-08-11 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> patch review versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-

[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2013-08-11 Thread Stefan Behnel
Stefan Behnel added the comment: There's also the QName class which can be used to split qualified tag names. And it's pretty trivial to pre-process the entire tree by stripping all namespaces from it the intention is really to do namespace agnostic processing. However, in my experience, most

[issue18268] ElementTree.fromstring non-deterministically gives unicode text data

2013-08-11 Thread Stefan Behnel
Stefan Behnel added the comment: Rejecting this ticket was the right thing to do. It's not a bug but a feature. In Python 2.x, ElementTree returns any text content that can correctly be represented as an ASCII encoded string in the native Py2.x string type (i.e. 'str'). Only non-ASCII strings

[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2013-08-11 Thread Eli Bendersky
Eli Bendersky added the comment: I was planning to look more closely at the namespace support in ET at some point, but haven't found the time yet. [changing the title to be more helpful] -- title: ElementTree gets awkward to use if there is an xmlns -> ElementTree -- provide a way to

[issue18670] Using read_mime_types function from mimetypes module gives resource warning

2013-08-11 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached the second patch to use addCleanup rather than tear down method. Also, I added the non-existent file case. -- Added file: http://bugs.python.org/file31232/fix_resource_warning_read_mime_types_v2.patch ___ Pyt

[issue18647] re.error: nothing to repeat

2013-08-11 Thread Matthew Barnett
Matthew Barnett added the comment: I think you're probably right. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue18304] ElementTree gets awkward to use if there is an xmlns

2013-08-11 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, lxml.etree supports wildcards like '{*}tag' in searches, and this is otherwise quite rarely a problem in practice. I'm -1 on the proposed feature and wouldn't mind rejecting this all together. (At least change the title to something more appropriate.) --

[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Ezio Melotti
Ezio Melotti added the comment: > My preference goes to Serhiy's fix for test_imp. Fair enough. Serhiy do you want to commit your fix? > Note that the import machinery oddity would deserve fixing too > (in a separate issue perhaps ?). This should be a separate issue. --

[issue18693] help() not helpful with enum

2013-08-11 Thread Eli Bendersky
Eli Bendersky added the comment: Ethan, as Ned said (and I think you got this answer in the list before), the real feature cutoff is Beta 1. So we have time until the end of November. Note that even new PEPs (like the statistics one) can go in before that. Even after beta, things that appear t

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2013-08-11 Thread Robin Schreiber
Robin Schreiber added the comment: I absolutely agree on mentioning the member names in the comments. :-) In the example Martin gave in his PEP 3121, the PyInit does not perform any INCREFs on the Variables that are referenced from inside the module state. He therefore left out m_free completel

[issue18705] Fix typos/spelling mistakes in Lib/*.py files

2013-08-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the update. All the changes in the updated patch look good to me. -- ___ Python tracker ___

[issue18705] Fix typos/spelling mistakes in Lib/*.py files

2013-08-11 Thread Févry Thibault
Changes by Févry Thibault : -- title: Fix arround 100 typos/spelling mistakes -> Fix typos/spelling mistakes in Lib/*.py files ___ Python tracker ___ ___

[issue18705] Fix arround 100 typos/spelling mistakes

2013-08-11 Thread Févry Thibault
Févry Thibault added the comment: Updated the patch to no longer change BE to AE and fixed two mistakes in my correction. -- Added file: http://bugs.python.org/file31231/spelling_Lib.diff ___ Python tracker __

[issue18708] Change required in python 3.4 interpretor .

2013-08-11 Thread Mark Dickinson
Mark Dickinson added the comment: Unlike C, Python doesn't have any 'character' type: the elements of a string are simply 1-character strings. The two quote styles are mostly interchangeable: again, unlike C, there's no particular meaning attached to the use of single quotes or double quote

[issue15787] PEP 3121, 384 Refactoring

2013-08-11 Thread Robin Schreiber
Robin Schreiber added the comment: I have in fact used abitype.py to produce all of my PEP 384 patches, however it failed to work correctly in like 50% of all cases, and I had to complete the rest of the patch by hand.I thought about correcting the abitype.py throughout the GSOC, but I happene

[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: My preference goes to Serhiy's fix for test_imp. Note that the import machinery oddity would deserve fixing too (in a separate issue perhaps ?). -- ___ Python tracker

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks as too much work for too small gain (and I'm suppose the total gain is negative if we count all costs). -- ___ Python tracker ___ _

[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Ezio Melotti
Changes by Ezio Melotti : Added file: http://bugs.python.org/file31230/issue18706.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps `del sys.modules['module']` should remove all 'module.submodule' from sys.modules. Or perhaps `import module.submodule` should ensure that 'module' is in sys.modules and has the 'submodule' attribute. Ezio, seems you forgot to attach a patch. --

[issue18705] Fix arround 100 typos/spelling mistakes

2013-08-11 Thread Ezio Melotti
Ezio Melotti added the comment: Both AE and BE are OK, as long as each document is internally consistent. For new documents I think AE is preferred, but not forced. -- nosy: +ezio.melotti stage: -> patch review ___ Python tracker

[issue18705] Fix arround 100 typos/spelling mistakes

2013-08-11 Thread Févry Thibault
Févry Thibault added the comment: > I don't think there's a strict policy about using American spellings in the > source; I think spellings like 'behaviour' and 'grey' should be left alone. I didn't really know whether to change them or not and did not find an answer in the devguide (Might be

[issue18663] In unittest.TestCase.assertAlmostEqual doc specify the delta description

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

[issue18663] In unittest.TestCase.assertAlmostEqual doc specify the delta description

2013-08-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset e0f86c3b3685 by Ezio Melotti in branch '3.3': #18663: document that assertAlmostEqual also works when the values are equal and add tests. http://hg.python.org/cpython/rev/e0f86c3b3685 New changeset eeda59e08c83 by Ezio Melotti in branch 'default':

[issue18705] Fix arround 100 typos/spelling mistakes

2013-08-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch. I don't think there's a strict policy about using American spellings in the source; I think spellings like 'behaviour' and 'grey' should be left alone. -- nosy: +mark.dickinson ___ Python trac

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > How large will be a C implementation of this one-line function? > > I'm still -1 for polluting the itertools module with trivial > combinations of existing functions. The solution is to move the current itertools to _itertools and have a companion itertools.p

[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Perhaps import machinery should be fixed instead of tests. Yes, the import machinery is acting weird here. -- ___ Python tracker ___

[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Ezio Melotti
Ezio Melotti added the comment: > ./python -m test -v test_codecencodings_kr test_imp test_codeccallbacks Thanks, I was trying to reproduce the failure yesterday with test_imp test_codeccallbacks but it wasn't working -- now I can reproduce it. My idea was to import html and html.parser and th

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How large will be a C implementation of this one-line function? I'm still -1 for polluting the itertools module with trivial combinations of existing functions. -- ___ Python tracker

[issue18445] Tools/Script/Readme is outdated

2013-08-11 Thread Seydou Dia
Seydou Dia added the comment: >>- README says all python scripts are executables, but some need chmod +x >I can help here. Sorry I meant : "I can't help here". :) -- ___ Python tracker

[issue18445] Tools/Script/Readme is outdated

2013-08-11 Thread Seydou Dia
Seydou Dia added the comment: >Several issues : >- abitype.py, analyze_dxp.py, get-remote-certificate.py, >import_diagnostics.py, parse_html5_entities.py are not documented. Except analyze_dxp.py, all those files have been docummented in README. analyze_dxp.py was already documented so I don't

[issue18704] IDLE: PEP8 Style Check Integration

2013-08-11 Thread Ramchandra Apte
Ramchandra Apte added the comment: I like the idea of having a PEP8-checker for IDLE. -- nosy: +Ramchandra Apte ___ Python tracker ___ ___

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-11 Thread Hynek Schlawack
Hynek Schlawack added the comment: So I wanted to provide a first patch to move the discussion on and realized that itertools appears currently to be completely inside of `Modules/itertoolsmodule.c`. :-/ Any volunteers? :) -- assignee: hynek -> stage: -> needs patch ___

[issue18693] help() not helpful with enum

2013-08-11 Thread Ned Deily
Ned Deily added the comment: Ethan, http://www.python.org/dev/peps/pep-0429/#release-schedule TL;DR - no new features after beta 1 (2013-11-24), no non-release-critical bug fixes after rc1 (2014-01-19) -- nosy: +ned.deily ___ Python tracker

[issue18647] re.error: nothing to repeat

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And not to me. This check forbids some possible legal regexps and doesn't prevent from shooting in the leg. -- ___ Python tracker ___ ___

[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: However it looks weird: >>> def f(): ... import html.entities ... del sys.modules['html'] ... >>> f() >>> import html.entities >>> html.entities Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute

[issue18445] Tools/Script/Readme is outdated

2013-08-11 Thread sdia
sdia added the comment: Hello, I will try to submit a patch for this issue. -- nosy: +seydou ___ Python tracker ___ ___ Python-bugs-l