[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-08-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Likely they were written before the invention of unittest test
skpping. They could be converted.

See issue18702.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15301
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18707] the readme should also talk about how to build doc.

2013-08-11 Thread madan ram

New submission from madan ram:

Since most of and also I faced problem of building Doc initially then later i 
found out how to build Doc.

So i thought to include details on how to build Doc in README.

--
assignee: docs@python
components: Build, Devguide, Documentation, Installation
files: README.diff
keywords: patch
messages: 194866
nosy: docs@python, eric.araujo, ezio.melotti, georg.brandl, madan.ram
priority: normal
severity: normal
status: open
title: the readme should also talk about how to build doc.
versions: Python 3.4
Added file: http://bugs.python.org/file31227/README.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18707
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18708] Change required in python 3.4 interpretor .

2013-08-11 Thread madan ram

New submission from madan ram:

As I observed when using python 3.4 Interpretor  is that it would be able to 
distinguish between char by '' and string by 

 input()
a
'a'

and 

 input()
aa
'aa'

it would be better if output was
aa

but if i want to fix this which file to edit.

--
components: Interpreter Core
messages: 194867
nosy: madan.ram, rhettinger
priority: normal
severity: normal
status: open
title: Change required in python 3.4 interpretor .
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18708
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are two ways to fix this issue -- one change test_imp.py and other change 
test_codeccallbacks.py. The proposed patch contains both.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file31228/issue18706.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18445
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 stdin, line 1, in module
AttributeError: 'module' object has no attribute 'entities'

Perhaps import machinery should be fixed instead of tests.

--
nosy: +brett.cannon, eric.snow, ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18647
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18693
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18704
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 understand what action is 
needed.
Note that I have also documented find-uname.py.

- README mentions redemo.py which was moved to Tools/Demo.
Done.

- README says all python scripts are executables, but some need chmod +x
I can help here.

 - The script list in readme would benefit from being sorted in alphabetical 
 order
Done.

--
keywords: +patch
Added file: http://bugs.python.org/file31229/issue-18445.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18445
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18445
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 then remove them both, and 
that's what the patch did:

 import sys
 m = set(sys.modules)
 from html import parser
 set(sys.modules) - m
{'html.parser', 'linecache', 'tokenize', 'warnings', '_markupbase', 'html', 
'token'}
 del sys.modules['html']
 set(sys.modules) - m
{'html.parser', 'linecache', 'tokenize', '_markupbase', 'warnings', 'token'}
 del sys.modules['html.parser']
 set(sys.modules) - m
{'token', '_markupbase', 'tokenize', 'warnings', 'linecache'}

I think the problem is that if test_codecencodings_kr is run before test_imp, 
test_imp deletes html and html.parser but leaves the html.entities imported by 
test_codecencodings_kr, and when test_codeccallbacks tries to use it again it 
fails:

 import sys
 m = set(sys.modules)
 import html.entities
 set(sys.modules) - m
{'html.entities', 'html'}
 from html import parser
 set(sys.modules) - m
{'_markupbase', 'html', 'html.entities', 'tokenize', 'html.parser', 
'linecache', 'warnings', 'token'}
 del sys.modules['html']
 set(sys.modules) - m
{'_markupbase', 'tokenize', 'html.entities', 'token', 'html.parser', 
'linecache', 'warnings'}
 del sys.modules['html.parser']
 set(sys.modules) - m
{'_markupbase', 'tokenize', 'html.entities', 'token', 'linecache', 'warnings'}
 html.entities
module 'html.entities' from '/home/wolf/dev/py/py3k/Lib/html/entities.py'
 import html.entities
 html.entities
Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: 'module' object has no attribute 'entities'

A solution would be to remove all the modules that start with 'html.' (see 
attached patch):

 import sys
 m = set(sys.modules)
 import html.entities
 from html import parser
 del sys.modules['html']
 del sys.modules['html.parser']
 set(sys.modules) - m
{'warnings', 'linecache', 'token', 'html.entities', 'tokenize', '_markupbase'}
 del sys.modules['html.entities']
 import html.entities
 html.entities
module 'html.entities' from '/home/wolf/dev/py/py3k/Lib/html/entities.py'

Another (possibly better) solution would be to copy sys.modules before messing 
with it and restore it afterwards.  I was looking in test.support for a context 
manager to do it but I didn't find it, so I just deleted the modules I imported 
manually.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.py.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue18705
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18663
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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':
#18663: merge with 3.3.
http://hg.python.org/cpython/rev/eeda59e08c83

New changeset 9ddc63c039ba by Ezio Melotti in branch '2.7':
#18663: document that assertAlmostEqual also works when the values are equal 
and add tests.
http://hg.python.org/cpython/rev/9ddc63c039ba

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18663
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 worth documenting it ?) so I decided to change it :/.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18705
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18706] test failure in test_codeccallbacks

2013-08-11 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


Added file: http://bugs.python.org/file31230/issue18706.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 happened to find it easier to simply do the missing steps by 
hand. (I don't know If the script has been fixed up to this point though).
In any case, it might also be interesting for external extension module 
developers to make use of a fully working version of this script, so they can 
make their modules PEP 384 compliant without investing too much time.
One has to keep in mind however that almost any script will fail to work by 
itself, once we run into problems like refcounting or concurrency when applying 
the patch to a module.

I will have some free time throughout next week and will start to correct the 
patches for the xx modules (as Alex proposed), and continue from there to all 
the other patches I have submitted a year ago.

I am deeply sorry that I have not continued my work on this project earlier, 
however I dramatically underestimated the amount if work related to university, 
etc... I still feel obliged to complete all these patches.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 quotes.

So you'd be asking for 1-character strings to be represented using single 
quotes and multi-character strings to be representing using double quotes.  
That doesn't seem like a particularly useful distinction.  Worse, it might even 
be misleading, since it would suggest a C-like distinction between characters 
and strings.

As to which file:  you're looking for the implementation of str.__repr__, which 
is in the unicode_repr function in Objects/unicodeobject.c.  The logic for 
choosing which style of quote to use is about 50 lines into that function (line 
12128 at revision eeda59e08c83).

Closing this as rejected.

--
nosy: +mark.dickinson
resolution:  - rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18708
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18705
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-08-11 Thread Févry Thibault

Changes by Févry Thibault thibaultfe...@gmail.com:


--
title: Fix arround 100 typos/spelling mistakes - Fix typos/spelling mistakes 
in Lib/*.py files

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18705
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18705
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 completely as there was nothing to DECREF within 
the module state.
Back when I did my GSoC together with Martin, we decided that the Module state 
itself can be considered a valid container object, an therefore has to INCREF 
and in the end of its lifecycle (that is within m_free) also DECREF every 
object reference it holds. I therefore decided to include that into every 
module I refactored, and consequently also the xxmodule.

I was also thinking about redefining the macro of xx_state_global with a NULL 
check, however this would lead either to a redundant call of PyState_FindModule 
(Which may lead to unnecessary performance degregation as xx_state_global is 
used quite frequently in some parts of the respective module) or I had to find 
some awkward way to store the result o f FindModule in some local variable 
exapnded by the macro, which I would not consider a good idea. Instead Martin 
and I were thinking of including a NULL safe variant of xx_state_global only in 
CPython Debug Builds. What do you think about that?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15849
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to be bugs (like this issue) can usually be fixed 
before the RCs come. So there is no time pressure whatsoever.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18693
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.)

--
components: +Library (Lib), XML -Extension Modules
nosy: +eli.bendersky, scoder
versions: +Python 3.4 -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18304
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18647
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18670
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 ignore namespace in tags and seaches

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18304
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 are returned as unicode values. So it's actually 
completely deterministic and predictable behaviour. Amongst other things, it 
saves memory.

Note that in Python 2.x, ASCII-only str values are compatible with unicode 
values and get promoted to unicode at need. If you want to make sure you always 
use unicode values, you can call unicode(text) on whatever you get back, but 
in practice, it's really not a problem.

--
nosy: +scoder

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18268
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 people who want to do that haven't actually 
understood namespaces (although, admittedly, sometimes it's those who designed 
the XML format who didn't understand namespaces ...).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18304
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-08-11 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - patch review
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18670
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 looks like this:

def tostring(element_or_tree, *, encoding=None, method=xml,
 xml_declaration=None, pretty_print=False,
 with_tail=True, standalone=None, doctype=None,
 exclusive=False, with_comments=True,
 inclusive_ns_prefixes=None):

(The last three options are for C14N serialisation.)

--
nosy: +scoder
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14465
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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':
Issue #18706: Fix a test for issue #18681 so it no longer breaks 
test_codeccallbacks*.
http://hg.python.org/cpython/rev/1f4aed2c914c

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18706
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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':
Issue #18706: Fix a test for issue #18681 so it no longer breaks 
test_codeccallbacks*.
http://hg.python.org/cpython/rev/1f4aed2c914c

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18681
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 further step in the WTF direction. This is precisely why I
didn't reject this issue right away: perhaps it's not a bad idea to provide
Python programmers with *some* way to ease namespace-related tasks (even if
they go against the questionable design principles behind XML).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18304
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18578
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-08-11 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


--
nosy: +eric.snow

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14465
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 (most recent call last):
  File F:\Python\dev\py34\lib\test\regrtest.py, line 1298, in runtest_inner
the_module = importlib.import_module(abstest)
  File F:\Python\dev\py34\lib\importlib\__init__.py, line 93, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File frozen importlib._bootstrap, line 1613, in _gcd_import
  File frozen importlib._bootstrap, line 1594, in _find_and_load
  File frozen importlib._bootstrap, line 1561, in _find_and_load_unlocked
  File frozen importlib._bootstrap, line 607, in _check_name_wrapper
  File frozen importlib._bootstrap, line 1056, in load_module
  File frozen importlib._bootstrap, line 926, in load_module
  File frozen importlib._bootstrap, line 274, in _call_with_frames_removed
  File F:\Python\dev\py34\lib\test\test_nntplib.py, line 305, in module
class NetworkedNNTP_SSLTests(NetworkedNNTPTests):
  File F:\Python\dev\py34\lib\test\test_nntplib.py, line 315, in 
NetworkedNNTP_SSLTests
NNTP_CLASS = nntplib.NNTP_SSL
AttributeError: 'module' object has no attribute 'NNTP_SSL'

I do not understand the frozen importlib stuff, but nntplib._have_ssl is False, 
so the line asking for the non-existent attribute should not be executed.

The problem is that changing a guard from 'if hasattr' to the decorator is a 
*semantic change* in that it allows execution of the guarded statement. Skips 
only skip function calling. For a function statement, creating a function 
object from the compiled code object and binding a name is trivial. Not calling 
the function is the important part. For a class with code other than function 
definitions, the difference is crucial, as the above shows.

The general solution is to put class code inside a function so it is only 
executed later, as part of the test process, rather than during inport.
@classmethod
def setUpClass(cls):
cls.NNTP_CLASS = nntplib.NNTP_SSL

In this case, you could instead guard it with 'if _have_ssl', but since this 
assignment is the only thing being tested by this test case, it should be 
inside a method anyway.

I suggest that you review your patch for other changed classes that might have 
class-level code that could fail with the change to the skip decorator.

Here is similar problem: trying to subclass a class that does not exist.
test test_socketserver crashed
  File F:\Python\dev\py34\lib\test\test_socketserver.py, line 50, in module
socketserver.UnixStreamServer):
AttributeError: 'module' object has no attribute 'UnixStreamServer'

class ForkingUnixStreamServer(socketserver.ForkingMixIn,
  socketserver.UnixStreamServer): pass

I think you have to go back to 'if HAVE_UNIX_SOCKETS:' for this. Or re-factor 
somehow.

---
I cannot help wondering whether test_math.xxx.test_exceptions should still be 
(normally) disabled. I sent Mark Dickinson a separate note.

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18702
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18576
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 (the mime type can only be ASCII 
char). I would say .encode('ascii') and if it raises UnicodeError, ignore that 
key.

2) Would 'subkeyname[0] == .' be better as subkeyname.startswith(.)? More 
idiomatic, and won't bomb out if subkeyname is zero length (though that 
probably can't happen). Relatedly, not subkeyname.startswith() with an 
early-continue would avoid an indent and is what the rest of the code does.

3) I believe the default_encoding variable is not needed anymore. That was used 
in the old registry code.

4) Super-minor: raises EnvironmentError would be the Pythonic way to say 
throws EnvironmentError.

5) Would it be worth adding a test for 'foo.png' as well, as that was another 
super-common type that was wrong?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15207
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16968
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue18416
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18702
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18702
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Clarify and reformat the documentation of import_fresh_module
http://hg.python.org/cpython/rev/d809ef0e

--
nosy: +python-dev
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12645
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16799
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 we are looking at removing items to make our custom __dir__, 
and with each release we would have to revisit the blacklist of items we don't 
want (the tests would catch that for us, but it would still be effort to update 
the code).

What if we took what object.__dir__ gave us, then added the Enum members while 
removing the private, er, non-public data structures?

In other words, this dir in EnumMeta:

def __dir__(cls):
items = set(super().__dir__())
disgard = set([m for m in items if _is_sunder(m)])
members = set(cls.__members__)
return sorted((items | members) ^ disgard)

with this Enum:

 class Color(enum.Enum):
...  RED = 1
...  BLUE = 2
...  GREEN = 3
... 

gives us this result:

 dir(Color)
['BLUE', 'GREEN', 'RED', '__class__', '__delattr__', '__dict__', '__dir__', 
'__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', 
'__getnewargs__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', 
'__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', 
'__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 
'name', 'value']

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18693
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-08-11 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Added file: http://bugs.python.org/file31234/1f8979a8c2c5.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-08-11 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Added file: http://bugs.python.org/file31235/e4e6f45668c7.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-08-11 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Removed file: http://bugs.python.org/file31234/1f8979a8c2c5.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-08-11 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Removed file: http://bugs.python.org/file31058/c066794c85cd.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, 0, NULL)  0)
+goto error;

make_inheritable() should ignore errpipe_write, instead of changing twice the 
inheritable flag of errpipe_write.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 :)  Good to see we're on pretty much the same page.


Here's a (very) preliminary patch for the issue that stores the directory name 
as a key in sys.path_importer_cache and ensures module.__file__ is an absolute 
path. 

I've also modified test_path_importer_cache_empty_string in 
test_importlib/import_/test_path.py to use os.getcwd() instead of os.curdir as 
the key for sys.path_importer_cache.

Finally, I've added a test to test_import.py that tests that module.__file__ is 
equivalent to os.path.abspath(module.__file__).

Look it over when you get a chance and let me know what you would change.  
Thanks...

--
keywords: +patch
Added file: http://bugs.python.org/file31236/Issue18416.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18416
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 seaches - 
ElementTree gets awkward to use if there is an xmlns

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18304
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18304
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16038
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
opaque. However, it does provide a text attribute that contains the 
qualified tag name.

http://docs.python.org/2/library/xml.etree.elementtree.html#xml.etree.ElementTree.QName

Here is the corresponding documentation from lxml:

http://lxml.de/api/lxml.etree.QName-class.html

QName instances in lxml provide the properties localname, namespace and 
text.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18304
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue18644
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 needs or needs? Or 
it does not matter?

2. I saw 2 variants of writing the function name required for running the test.

test needs socket.inet_pton()

test needs socket.inet_pton

Which one is the preferred way to go? With or without parentheses? Or it does 
not matter?

--
nosy: +vajrasky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18702
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16396
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com