[issue8952] Doc/c-api/arg.rst: fix documentation of number formats

2013-01-03 Thread Georg Brandl

Georg Brandl added the comment:

It's still a valid bug.

--
nosy: +georg.brandl
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue12939] Add new io.FileIO using the native Windows API

2013-01-03 Thread Марк Коренберг

Марк Коренберг added the comment:

Yes, re-writing windows IO to direct API, without intemediate layer is still 
needed.

Please don't close bug. Maybe someone will implement this.

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Ezio Melotti

Ezio Melotti added the comment:

The attached patch adds a couple of section about the single and multiple 
clones approaches. The patch is still incomplete, because the rest of the page 
should be adapted to the new content (in particular the old sections should be 
removed, and the whole structure revisited), but I wanted some early feedback 
about the ones I added.

The idea is that contributors can use the single clone approach, and since they 
don't need to commit/merge, they don't need more instructions then the ones 
provided already in the setup.rst page.
Committers are better off with multiple clones, and the best way to do it is 
IMHO with the share extension, so that's what I described.
Ideally this section should be followed by a FAQ-like list that explains how to 
deal with conflicts, head merges, null merges, long-term features and similar.  
Some of these things are already there; some extra things are also there, and 
they should probably be moved or removed.

--
Added file: http://bugs.python.org/file28540/issue14468.diff

___
Python tracker 

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



[issue16847] sha module broken

2013-01-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 944e86223d1f by Christian Heimes in branch '3.3':
Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
http://hg.python.org/cpython/rev/944e86223d1f

New changeset 4b42d7f288c5 by Christian Heimes in branch 'default':
Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
http://hg.python.org/cpython/rev/4b42d7f288c5

--
nosy: +python-dev

___
Python tracker 

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



[issue16847] sha module broken

2013-01-03 Thread Christian Heimes

Changes by Christian Heimes :


--
assignee: christian.heimes -> 
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16847] sha module broken

2013-01-03 Thread Ronald Oussoren

Ronald Oussoren added the comment:

That's quick, thank :-).

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Content-wise the patch looks pretty good.  I agree with the recommendations.  A 
couple suggestions though: I would break up the 20 lines of command-line 
commands.  Right now that chunk is a bit too long to grasp meaningfully.  My 
suggestion would be to break it up into two sections with text in between: one 
for applying a patch to 2.x or 3.x, and the other for merging (forward-porting) 
from 3.x to 3.y, with a textual explanation of what the subsequent chunk of 
commands will do.

I would also state (or link to) something about forward-porting from 3.x to 3.y 
and that 2.7 should be kept separate (both of which I think the current patch 
assumes knowledge of).  I would also say (or link to) something about pushing 
all branches simultaneously.

Lastly, might it be worth explicitly dividing the Mercurial stuff into separate 
sections for (1) everyone, and (2) committers?  Putting the committer-specific 
stuff (e.g. instructions on merging and pushing changes) in a separate section 
will simplify things for the general contributor.

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Ezio Melotti

Ezio Melotti added the comment:

> I would break up the 20 lines of command-line commands.

I would have to find a compromise for this, because on one hand it's convenient 
to have all the commands in a single place (so it's easy to get an overview), 
but on the other hand that block includes several logically different operation 
(importing, grafting, merging) that would deserve their own "FAQ".

> I would also state (or link to) something about forward-porting from
> 3.x to 3.y and that 2.7 should be kept separate (both of which I
> think the current patch assumes knowledge of).

This is currently explained, but should be reorganized and integrated with my 
patch.

> I would also say (or link to) something about pushing all branches 
> simultaneously.

This happens automatically, so I don't think it deserves more than a short 
mention somewhere.

> Lastly, might it be worth explicitly dividing the Mercurial stuff
> into separate sections for (1) everyone, and (2) committers? 

ISTM that all the things that contributors need to know are already explained 
somewhere else in the devguide.  This includes cloning, switching branches, and 
applying and generating patches.
What I'm described here is mostly aimed to developers, since contributors don't 
have to commit/merging/grafting and dealing with all the related things.

--

___
Python tracker 

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



[issue12939] Add new io.FileIO using the native Windows API

2013-01-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Windows
nosy: +ezio.melotti
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue8821] Range check on unicode repr

2013-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You can accept the patch. You can reject the patch. It doesn't matter.

--

___
Python tracker 

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



[issue16842] Allow to override a function signature for pydoc with a docstring

2013-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, I mixed up the issues. For this issue I have not a patch yet. I wait for 
some suggestions and decisions first.

See also related issue16638.

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue16801] Preserve original representation for integers / floats in docstrings

2013-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> A subclass with a custom representation, as I suggested above, is even
> simpler and involves no change to inspect or docstring conventions.

Agree, but this is a particular and cumbersome solution.

I open new issue16842 for docstring conventions.

--

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also test_functools, test_xml_etree, test_bisect, test_bz2, test_warnings, 
test_decimal, test_datetime, json_tests, test_io, test_concurrent_futures, and 
many, many other undiscoverable tests.

--
stage: committed/rejected -> patch review

___
Python tracker 

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



[issue1584] Mac OS X: building with X11 Tkinter

2013-01-03 Thread Samuel John

Samuel John added the comment:

Hello from Homebrew (Mac)!

Indeed we also patch setup.py (but right now only for python2.7) and 
uncommented the "detect_tkinter_darwin" related lines to support linking 
against a Tkinter build with homebrew (optionally with X11 support).

(Our patch: https://github.com/mxcl/homebrew/pull/16626/files#L0R270)

I agree that an option to tell setup.py to use another Tk would be much 
appreciated.

--
nosy: +samueljohn

___
Python tracker 

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



[issue15596] pickle: Faster serialization of Unicode strings

2013-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Well, I take care of this. I have the own patch for raw_unicode_escape() 
optimization, but microbenchmarks don't show any speed up. Maybe your approach 
will be better.

--

___
Python tracker 

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



[issue16844] funcName in logging module for python 2.6

2013-01-03 Thread Vinay Sajip

Vinay Sajip added the comment:

You are apparently not using the logging in stdlib, but the older, standalone 
logging package intended to be used in versions of Python older than 2.3 - note 
the presence of "site-packages/logging-0.4.9.6-py2.6.egg" in the traceback.

If you are using Python 2.6, you don't need the standalone logging-0.4.9.6, as 
the logging in the stdlib is more up to date (as you've discovered).

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-03 Thread Samuel John

New submission from Samuel John:

Some tools use `python-config --ldflags` to get the flags in order to link 
against the Python lib on OS X (for example gst-python from pygtk (2.x).

For framework builds, `python-config --ldflags` returns (among few other):

-u _PyMac_Error Python.framework/Versions/2.7/Python

which is an incomplete path.

This issue is almost a duplicate of http://bugs.python.org/issue3588 and the 
fix discussed there would work. However I report this for Python 2.7.

We at Homebrew propose a very similar fix but I'd prefer the one in issue3588:

LINKFORSHARED = -u _PyMac_Error -framework Python
LDFLAGS += -F$(PYTHONFRAMEWORKPREFIX)

--
components: Build
messages: 178936
nosy: hynek, ned.deily, ronaldoussoren, samueljohn
priority: normal
severity: normal
status: open
title: Mac OS X: python-config --ldflags and location of Python.framework
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-03 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Using '-framework Python' is suboptimal because this doesn't control which 
framework is used for linking (in particular, if you have both Python 2.7 and 
3.3 installed '-framework Python' will link against the one installed last).

For Python 3.3 I get:

$ /Library/Frameworks/Python.framework/Versions/3.2/bin/python3-config --ldflags
-L/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config-3.2m 
-ldl -framework CoreFoundation -lpython3.2m

Simular output would also work for python 2.7 (but I don't have a patch right 
now)

--
stage:  -> needs patch

___
Python tracker 

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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-03 Thread R. David Murray

R. David Murray added the comment:

The FAQ (as in, this question gets asked again and again) is something like 
"why do the lambdas I define in a loop all return the same result when the 
input value was different when each one was defined?"

The same applies to regular functions, but people almost never do that in a 
loop, so in that case they are more likely to think of the scoping issue.

--

___
Python tracker 

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



[issue16849] Element.{get, iter} doesn't handle keyword arguments when using _elementtree C accelerator.

2013-01-03 Thread Franck Michea

New submission from Franck Michea:

Documentation:
 - 
http://docs.python.org/3.3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.get
 - 
http://docs.python.org/3.3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.iter

These two functions are documented with keyword arguments. Python 
implementation works correctly, but as of 3.3, _etreeelement module in C is 
hot-patching this module to enhance speed. C implementation only expects normal 
arguments for get and iter. This is what this patch fixes.

First patch so:
 - I am not sure about the "key" string in kwlist array, I followed code above 
and it doesn't work without it, so I guess it's to for the normal arg.
 - I am not sure about how to test iter with this. tag argument is never used.
 - Included a test that shows the problem.

Have a nice day,

--
components: Library (Lib), XML
files: etree.patch
keywords: patch
messages: 178939
nosy: kushou
priority: normal
severity: normal
status: open
title: Element.{get,iter} doesn't handle keyword arguments when using 
_elementtree C accelerator.
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file28541/etree.patch

___
Python tracker 

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



[issue16846] relative import solution

2013-01-03 Thread R. David Murray

R. David Murray added the comment:

Could you give more information about what you see as the bug, here?  I'm not 
understanding the problem because there doesn't appear to be enough context.  
What is your directory structure?  Where is the import happening?

--
components: +Interpreter Core -Windows
nosy: +r.david.murray
type: resource usage -> behavior

___
Python tracker 

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



[issue16281] TODO in tailmatch(): it does not support backward in all cases

2013-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Shouldn't this be applied to 3.3?

As for optimization, I made some benchmarks and didn't saw any significant 
difference. Usually this function used to check short ASCII heads and tails and 
any optimization will not be seen even under a microscope.

--

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2013-01-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Note that on Windows there is an O_NOINHERIT flag which almost corresponds to 
O_CLOEXEC on Linux.

I don't think there is a need to use the win32 api.

--
nosy: +sbt

___
Python tracker 

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



[issue12939] Add new io.FileIO using the native Windows API

2013-01-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

A while ago I did write a PipeIO class which subclasses io.RawIOBase and works 
for overlapped pipe handles.  (It was intended for multiprocessing and doing 
asynchronous IO with subprocess.)

As it is it would not work with normal files because when you do overlapped IO 
on files you must manually track the file position.

> Yes, re-writing windows IO to direct API, without intemediate layer is still 
> needed.

What are the expected benefits?

> It would help feature #12105 to implement "O_CLOEXEC" flag using the 
> lpSecurityAttributes argument.

Isn't O_NOINHERIT the Windows equivalent of O_CLOEXEC?

--

___
Python tracker 

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



[issue16281] TODO in tailmatch(): it does not support backward in all cases

2013-01-03 Thread STINNER Victor

STINNER Victor added the comment:

> Shouldn't this be applied to 3.3?

It's just a cleanup, it doesn't fix any real bug. I prefer to not
pollute old versions with cleanup.

> As for optimization, I made some benchmarks and didn't saw any significant 
> difference. Usually this function used to check short ASCII heads and tails 
> and any optimization will not be seen even under a microscope.

Ok, agreed.

--

___
Python tracker 

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



[issue16846] relative import solution

2013-01-03 Thread Georg Brandl

Georg Brandl added the comment:

David, the "issue" is that Python only allows relative imports within packages. 
 The OP wants to have a.py and b.py in the same directory and then be able to 
said "from . import b" in the a module.

This is a design decision and will not change without a PEP.

--
nosy: +georg.brandl, ncoghlan
resolution:  -> rejected
status: open -> pending

___
Python tracker 

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



[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-03 Thread Eli Bendersky

Eli Bendersky added the comment:

On Tue, Jan 1, 2013 at 2:56 PM, Daniel Shahaf wrote:

>
> Daniel Shahaf added the comment:
>
> Eli Bendersky wrote on Tue, Jan 01, 2013 at 15:54:00 +:
> > Why did you change the class name, by the way, I don't think it's
> > a valid change at least for 3.3 in terms of backwards compatibility.
> >
>
> With unmodified tip of 3.4:
>
> >>> import pickle, xml.etree.ElementTree as ET
> >>> pickle.dumps(ET.Element('foo'))
> Traceback (most recent call last):
>   File "", line 1, in 
> _pickle.PicklingError: Can't pickle : attribute
> lookup builtins.Element failed
>
> I added the "_elementtree" to the tp_name in order to bypass the above
> error.  Module-qualified names were in use elsewhere (including by
> _elementtree._element_iterator) so it seemed reasonable.  I'll defer to
> you about compatibility implications of this change.

I asked on pydev, but this is a key point to resolve. Can
pickling/unpickling be made to work correctly without such (or similar)
change at all? How will the unpickler know which module to load when it
sees a pickled object of Element type?

If this change is required (even if we choose to name it
"xml.etree.ElementTree.Element" for Py compatibility to fix the pickling
regression, we may find ourselves in a need to change it between 3.3 and
3.3.1 and I'm not sure if that's valid. I hope my question on pydev will be
resolved conclusively.

Danial, could you investigate if such a change is absolutely required to
make pickling/unickling of Element work?

--

___
Python tracker 

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



[issue8952] Doc/c-api/arg.rst: fix documentation of number formats

2013-01-03 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-03 Thread Zachary Ware

Zachary Ware added the comment:

Here's version 2 of the genericpath patch.

Should I try to fix everything in one patch, or one patch per test module (or 
group of test modules like test_(generic|mac|nt|posix)path.py)?  And if 
separate, should each one get its own issue, or just keep them all here?

--
Added file: http://bugs.python.org/file28542/issue16748_genericpath.v2.diff

___
Python tracker 

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



[issue16835] Update PEP 399 to allow for test discovery

2013-01-03 Thread Zachary Ware

Zachary Ware added the comment:

> Thanks for the review, new patch attached.

You're quite welcome.  Is there anything I've missed in the process of 
reviewing itself?  This is the first time I've reviewed a patch here...

I did miss another nit in the prose, though; "the tests methods" in the first 
line isn't quite right, but I can't decide if it should be "the test's methods" 
(singular possessive), "the tests' methods" (plural possessive), or "test 
methods" (non-specific, non-possessive).  Any of the three that better gets 
your point across makes me happy :)

>> This should either have another newline inbetween or be reflowed. 
>> Either one paragraph or two makes sense to me, but I can't tell which 
>> way you actually meant
>
> I meant one and half :)
> I guess in HTML that would have been a  inside the , but I don't 
> think it really matters if it's rendered as a single paragraph.

I see.  As is works for me if it works for you, though I might lean towards 
rounding it up to 2 paragraphs :)

--

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread STINNER Victor

New submission from STINNER Victor:

Recent version on different operating systems support opening a file with 
close-on-exec flag set immediatly (atomic). This feature fixes a race condition 
when the process calls execv() between open() and fcntl() (to set the 
FD_CLOEXEC flag to the newly opened file).

It would be nice to expose this feature in Python. The problem is the find a 
portable and safe way to expose the feature: neologix is against a best-effort 
function. For example, Linux kernel older than 2.6.22 simply ignores O_CLOEXEC 
flag (while the libc may expose it).

The feature looks to be supported by at least:

 * Linux kernel >= 2.6.23
 * FreeBSD 8+
 * Windows: _open(filename, _O_NOINHERIT). Is it supported by Windows XP and 
older versions? http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx

See also:

 * Issue #12760 (closed): This issue added an "x" mode to open() to create a 
file in exclusive mode
 * Issue #12103: "Document how to use open with os.O_CLOEXEC"
 * Issue #12105: It was proposed to add an "e" mode to open() for O_CLOEXEC

--
components: Interpreter Core
messages: 178949
nosy: alexey-smirnov, amaury.forgeotdarc, haypo, neologix, sbt
priority: normal
severity: normal
status: open
title: Atomic open + close-and-exec
versions: Python 3.4

___
Python tracker 

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



[issue15067] Clean up the sqlite3 docs

2013-01-03 Thread Zachary Ware

Changes by Zachary Ware :


Removed file: http://bugs.python.org/file27829/sqlite3_cleanup_2.7.patch

___
Python tracker 

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



[issue15067] Clean up the sqlite3 docs

2013-01-03 Thread Zachary Ware

Changes by Zachary Ware :


Removed file: http://bugs.python.org/file27830/sqlite3_cleanup_3.2.patch

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2013-01-03 Thread STINNER Victor

STINNER Victor added the comment:

> Note that on Windows there is an O_NOINHERIT flag which
> almost corresponds to O_CLOEXEC on Linux.
> I don't think there is a need to use the win32 api.

Ah yes. Because this issue is closed, I created the issue #16850 which is more 
specific to open + close-and-exec.

--

___
Python tracker 

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



[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-03 Thread Samuel John

Samuel John added the comment:

Agreed. My patch, I did for Homebrew is to use the full path like so:

PYTHONFRAMEWORKDIR= full/path/to/Frameworks/Python.framework

instead of just `Python.framework`.

--

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread STINNER Victor

STINNER Victor added the comment:

> The problem is the find a portable and safe way to expose the feature

A solution is to add a "e" mode to open() which would raise a 
NotImplementedError if the platform is not known to support this feature. For 
example, if the OS is linux, we would check if the kernel version is at least 
2.6.23, otherwise an exception would be raised.

The check (on the OS/version) would be done at the first call the function (if 
the "e" mode if used).

We already have such behaviour on other functions.

--

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread Christian Heimes

Christian Heimes added the comment:

You could do both: use the O_CLOEXEC flag and do a fcntl() call on POSIX. In my 
opinion it's enough to document that the x flag may be affected by a race 
condition issue on some operation systems.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue12103] Document how to use open with os.O_CLOEXEC

2013-01-03 Thread STINNER Victor

STINNER Victor added the comment:

> x  Open the file exclusively (like the O_EXCL flag of open(2)).
>  If the  file  already exists, fopen() fails, and sets errno to EEXIST.
> This flag is ignored for fdopen().

Python 3.3 adds support for this mode: see issue #12760.

> e (since glibc 2.7)
>   Open  the  file  with  the O_CLOEXEC flag.  See open(2) for more 
> information.

I created the issue #16850 for this mode.

--

Other modes seem to be very specific to some platforms. I don't think that it 
would be possible to expose them in a portable way using the open() function 
directly.

Can we close this issue? I prefer to work on #16850 for the close-on-exec mode.

--

___
Python tracker 

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



[issue16836] configure script disables support for IPv6 on a system where IPv6 is disabled

2013-01-03 Thread Ralf Schmitt

Ralf Schmitt added the comment:

> Would you want to provide a patch for this?

No, sorry.

--

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-03 Thread R. David Murray

R. David Murray added the comment:

I would suggest one patch and issue per test module.  If multiple test modules 
are related enough, they could go in one patch/issue; that's a judgement call.  
We can make this issue dependent on those individual issues.

--

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread STINNER Victor

STINNER Victor added the comment:

> You could do both: use the O_CLOEXEC flag and do a fcntl() call on POSIX

This is the best-effort option. It was already discussed and rejected in the 
issue #12760.

We had a similar discussion for the PEP 418 on monotonic clock. The final 
decision is not only provide time.monotonic() if the OS supports monotonic 
clock.

Using an exception, a developer can develop its own best-effort function:

try:
fileobj = open(filename, "e")
except NotImplementedError:
fileobj = open(filename, "r")
# may also fail here if the fcntl module is missing
import fcntl
flags = fcntl.fcntl(self.socket, fcntl.F_GETFD)
fcntl.fcntl(fileobj, fcntl.F_SETFD, flags | fcntl.FD_CLOEXEC)

We may expose the best-effort function somewhere else, but not in open() which 
must be atomic in my opinion.

--

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-03 Thread Zachary Ware

Zachary Ware added the comment:

Sounds good to me.  Shall I move the genericpath fix to a new issue, or leave 
that one here and begin starting new issues with the next one tackled?

Any volunteers for being nosied on new issues to make the dependency link back 
to this one for me? :)

--

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread Christian Heimes

Christian Heimes added the comment:

Do you mean #12105? I didn't know about the ticket before.

How about two options, like 'e' for guaranteed atomic CLOEXEC and 'E' for 
CLOEXEC with or without atomic ops? It's not much additional work and lowers 
the burden on the user.

It's going to be hard to get a list of platforms and versions where O_CLOEXEC 
is supported. We should go for a white list approach and only enable it on 
platforms that are either documented to support it or have been tested.

--

___
Python tracker 

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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-03 Thread Ezio Melotti

Ezio Melotti added the comment:

> "why do the lambdas I define in a loop all return the same result when
> the input value was different when each one was defined?"

I thought about that, but that sounds a bit too long/specific.  It also has the 
problem that the issue is not strictly related to lambdas or loops (even if 
this combination might be more common), and doesn't say where the "result" come 
from.

--

___
Python tracker 

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



[issue12103] Document how to use open with os.O_CLOEXEC

2013-01-03 Thread Christian Heimes

Christian Heimes added the comment:

Sounds good to me.

--
nosy: +christian.heimes
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue14810] tarfile does not support timestamp older 1970-01-01

2013-01-03 Thread Марк Коренберг

Марк Коренберг added the comment:

Yes, bug exists in python 2.7. The same problem - negative timestamp in mtime 
field. It prepresented in binary value as

'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc7\xfc'

in my case.

--
nosy: +mmarkk

___
Python tracker 

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



[issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions

2013-01-03 Thread Christian Heimes

Christian Heimes added the comment:

NotADirectoryError is missing from the list of exception. The error can occur 
when the directory is removed and replaced by an ordinary file.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue16851] ismethod and isfunction methods error

2013-01-03 Thread Wojciech Danilo

New submission from Wojciech Danilo:

Hi! I think this behaviour is bug. Lets concider the following code:

import inspect
class X(object):
def a(self):pass
def b(self):pass
def c(self):pass

print(inspect.getmembers(X, predicate=inspect.ismethod))
print(inspect.getmembers(X, predicate=inspect.isfunction))

In python 2.7, the results are:
[('a', ), ('b', ), ('c', )]
[]

and in Python 3.2:
[]
[('a', ), ('b', ), ('c', 
)]

I think, the results from python 2.7 are correct.

--
components: Library (Lib)
messages: 178964
nosy: wdanilo
priority: normal
severity: normal
status: open
title: ismethod and isfunction methods error
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-03 Thread Brett Cannon

Brett Cannon added the comment:

You can go ahead and start a new issue so it isn't forgotten about as this 
becomes a meta issue.

And you can always add me to the nosy, just can't guarantee how fast I will do 
the reviews. =)

--

___
Python tracker 

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



[issue16851] ismethod and isfunction methods error

2013-01-03 Thread Ezio Melotti

Ezio Melotti added the comment:

I think that's expected and by design.  In Python 3 there are no unbound 
methods, but simply functions:
>>> class X:
...   def add(a, b): return a+b
... 
>>> add = X.add
>>> add

>>> add(3, 4)
7
>>> def add(a, b): return a+b
... 
>>> add

>>> add(3, 4)
7

As you can see there's no real difference between the two "add".

It's different though with bound methods (obtained from an instance rather than 
a class):

>>> add = X().add
>>> add
>

The documentation is also clear that ismethod() "Return true if the object is a 
bound method written in Python.".  Maybe an additional note can be added to 
state that "unbound methods" are not included, and that are instead recognized 
by isfunction().

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
keywords: +easy
nosy: +docs@python, ezio.melotti
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue16852] Fix test discovery for test_genericpath.py

2013-01-03 Thread Zachary Ware

New submission from Zachary Ware:

See Issue 16748 for previous discussion.

This patch should fix test_genericpath.py, with changes to test_macpath.py, 
test_ntpath.py, and test_posixpath.py required by the fix to 
test_genericpath.py.  This is version 2 of the patch after a review by Serhiy 
Storchaka in issue 16748.

--
components: Tests
messages: 178967
nosy: brett.cannon, serhiy.storchaka, zach.ware
priority: normal
severity: normal
status: open
title: Fix test discovery for test_genericpath.py
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue16852] Fix test discovery for test_genericpath.py

2013-01-03 Thread Zachary Ware

Changes by Zachary Ware :


--
keywords: +patch
Added file: http://bugs.python.org/file28543/issue16852.v2.diff

___
Python tracker 

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



[issue16852] Fix test discovery for test_genericpath.py

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> patch review

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-03 Thread Brett Cannon

Changes by Brett Cannon :


--
dependencies: +Fix test discovery for test_genericpath.py

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2013-01-03 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-03 Thread R. David Murray

R. David Murray added the comment:

The point is, it is a FAQ.  We are talking about updating the FAQ document.  It 
doesn't matter if the text is "too specific", if it is in fact a FAQ.  And it 
is.

--

___
Python tracker 

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



[issue12939] Add new io.FileIO using the native Windows API

2013-01-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Attached is a module for Python 3.3+ which subclasses io.RawIOBase.  The 
constructor signature is

WinFileIO(handle, mode="r", closehandle=True)

where mode is "r", "w", "r+" or "w+".  Handles can be created using 
_winapi.CreateFile().

Issues:
- No support for append mode.
- Truncate is not atomic.  (Is atomicity supposed to be guaranteed?)
- Not properly tested.

--
Added file: http://bugs.python.org/file28544/winfileio.c

___
Python tracker 

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



[issue12939] Add new io.FileIO using the native Windows API

2013-01-03 Thread Richard Oudkerk

Changes by Richard Oudkerk :


Added file: http://bugs.python.org/file28545/test_winfileio.py

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Charles-François Natali

New submission from Charles-François Natali:

Recently, the multiprocessing and telnetlib modules have been patched to use 
poll() instead of select() when available (mainly for the FD_SETSIZE 
limitation):
http://bugs.python.org/issue10527
http://bugs.python.org/issue14635

This leads to code duplication (just have a look at the commits to convince 
yourself), and also it highlights the fact that the select module is too 
low-level: right now, there's no easy way to do portable and efficient I/O 
multiplexing. What's more, /dev/poll and epoll() support have been added 
recently, which can make one puzzled by the myriad of available options.

Therefore, to reduce code duplication, and make writing portable and efficient 
code easier, I suggest the addition of a new select.Selector() class, which 
offers a - hopefully - simple and consistent API.
It has the following advantages:
- portable
- consistent (select() accepts and returns file objects, whereas pol() only 
returns FD, the timeouts don't have the same units - seconds/milliseconds, etc).

You'll find a tentative implementation attached, with tests (but no docs).

I'm also attaching two patches, one for multiprocessing.connection and the 
other for telnetlib, to show the before/after.

I'd like to have your feedback, especially on those points:
- right now, Selector.select() returns a set of (fd, event mask). What do you 
think, would a bare list be OK?
- the current version doesn't retry on EINTR, and I'd like to catch it by 
default: what do you think
- since I use an abstract base class, I don't know how to have docstrings show 
up in the help

--
components: Library (Lib)
files: selector.diff
keywords: patch
messages: 178970
nosy: giampaolo.rodola, neologix, pitrou
priority: normal
severity: normal
status: open
title: add a Selector to the select module
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file28546/selector.diff

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Charles-François Natali

Changes by Charles-François Natali :


Added file: http://bugs.python.org/file28547/selector_multiprocessing.diff

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Charles-François Natali

Changes by Charles-François Natali :


Added file: http://bugs.python.org/file28548/selector_telnetlib.diff

___
Python tracker 

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



[issue14810] tarfile does not support timestamp older 1970-01-01

2013-01-03 Thread Марк Коренберг

Марк Коренберг added the comment:

And yes, bug does not appear in python3.2

--

___
Python tracker 

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



[issue16836] configure script disables support for IPv6 on a system where IPv6 is disabled

2013-01-03 Thread Charles-François Natali

Charles-François Natali added the comment:

Here's a patch, tested with ipv6.disable=1.

--
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file28549/ipv6config.diff

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Felipe Cruz

Felipe Cruz added the comment:

I think you have a point. Did you know about the tulip project?

http://code.google.com/p/tulip/source/browse/tulip/unix_events.py#76

It has a PollsterBase class and a SelectPollster(PollsterBase) so the idea is 
to have a Poller(and you call poll()) but select can be used underneath. Since 
tulip will be merged to stdlib, maybe you can work on tulip itself.

Current tulip Pollers don't return (fd, event) but I have a fork that does for 
Poll, EPoll, KQueue and WindowsPollster: https://bitbucket.org/felipecruz/tulip/

The selector class doesn't have this change (return fd, mask tuple) right now.

--
nosy: +felipecruz

___
Python tracker 

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



[issue16849] Element.{get, iter} doesn't handle keyword arguments when using _elementtree C accelerator.

2013-01-03 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +eli.bendersky

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

tulip is much bigger than simply a select / poll wrapper. It would probably 
make more sense for tulip to reuse the abstraction which is proposed here.

--
nosy: +gvanrossum
stage:  -> patch review

___
Python tracker 

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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-03 Thread Ezio Melotti

Ezio Melotti added the comment:

Here's a patch.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file28550/issue13094.diff

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 

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



[issue16833] http.client delayed ack / Nagle algorithm optimisation performs badly for large messages

2013-01-03 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Sorry, firefox is playing with me. As usual :). Just writing about i in 
python-dev.

Thanks for the heads up.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-03 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

$ ./python -m test.regrtest -u spam
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "/home/serhiy/py/cpython/Lib/runpy.py", line 73, in _run_code
exec(code, run_globals)
  File "/home/serhiy/py/cpython/Lib/test/regrtest.py", line 1599, in 
main()
  File "/home/serhiy/py/cpython/Lib/test/regrtest.py", line 473, in main
usage('Invalid -u/--use option: ' + a)
NameError: global name 'usage' is not defined


This is 3.4 only issue.

--
components: Tests
messages: 178977
nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: usage() is not defined in Lib/test/regrtest.py
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +chris.jerdonek
stage:  -> needs patch

___
Python tracker 

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



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I observed this issue earlier in issue 16799.  See that issue for a fix.  Can 
one of you review that patch?  Thanks.

--

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Charles-François Natali

Charles-François Natali added the comment:

> I think you have a point. Did you know about the tulip project?
>
> http://code.google.com/p/tulip/source/browse/tulip/unix_events.py#76
>
> It has a PollsterBase class and a SelectPollster(PollsterBase) so the idea is 
> to have a Poller(and you call poll()) but select can be used underneath. 
> Since tulip will be merged to stdlib, maybe you can work on tulip itself.

I've had a look, and indeed it has its own Pollster wrapper.
Since it can be useful outside of Tulip, it would probably make sense
to make it part of the expose API.

> Current tulip Pollers don't return (fd, event) but I have a fork that does 
> for Poll, EPoll, KQueue and WindowsPollster

Indeed, I think it would be useful.

I'm not sure what's best, accept events masks or have distinct methods
to register read and write events.

--

___
Python tracker 

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



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-03 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
dependencies: +switch regrtest from getopt options to argparse Namespace

___
Python tracker 

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



[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-03 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
assignee:  -> chris.jerdonek

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Charles-François Natali

Charles-François Natali added the comment:

Oh, I noticed that EpollPollster never closes the underlying epoll FD:
that's why Pollster objects should have a close() method (and probably
support a context manager).

--

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Felipe Cruz

Felipe Cruz added the comment:

Hi Antonie,

What you said also makes sense to me.

There is one problem(?) that _map_events() is called for every event(for Poll 
and EPoll) and this can make things slower (I didn't tested it). Also, does it 
needs to be thread-safe?

--

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> How about two options, like 'e' for guaranteed atomic CLOEXEC and 'E'
> for CLOEXEC with or without atomic ops?

Why would you want that? Best effort is sufficient.
Also, I'm not sure why "e".

--
nosy: +pitrou

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Chris Jerdonek

Chris Jerdonek added the comment:

One thing that occurred to me is that it is often or usually not sufficient to 
go from 2.7 to 3.2 and on forward because applying a patch made against the 
default branch loses information if first applied to an earlier branch.  The 
given workflow assumes no loss of information and so should probably note this 
constraint.

I usually craft my patch against the default branch.  If applying to 2.7 or 
3.2, etc. loses information (which has been more often the case for me), then 
instead of merging I null-merge and reapply the original patch.  Should the 
recommended workflow cover this possibility?

--

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread Charles-François Natali

Charles-François Natali added the comment:

I don't comfortable exposing this.
The main reason is that this flag is really non-portable.
Having open() fail at runtime because the platform doesn't support it looks 
really wrong to me. And silently ignore it is even worse.
The 'x' flag was added because it is useful, on available on all platforms (I 
mean, even Windows has it). Here's, it's by definition Unix-specific, and even 
then, many Unices don't support it.
So I'm -1.

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Ezio Melotti

Ezio Melotti added the comment:

It can probably be added to the list of "FAQs", or mentioned together with null 
merges.

--

___
Python tracker 

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



[issue2771] Test issue

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
type:  -> behavior

___
Python tracker 

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



[issue2771] Test issue

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy:  -python-dev
type: behavior -> enhancement

___
Python tracker 

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



[issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions

2013-01-03 Thread David Pritchard

David Pritchard added the comment:

Here's an example where Python 3.3.0 crashes, but where the patched code works. 
I have only been able to trigger the bug when PYTHONPATH is set (even if to an 
empty value). 

(1) create a directory
(2) chmod a-rw+x on that directory
(3) export PYTHONPATH=""
(4) python3 from within that directory: should crash on loading

Note, without step (3) the error does not occur. Alternatively, do (1), (2),

(3') set PYTHONPATH to that -rw'ed directory
(4') python3 from outside of that directory: should crash on loading

--

___
Python tracker 

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



[issue16849] Element.{get, iter} doesn't handle keyword arguments when using _elementtree C accelerator.

2013-01-03 Thread Eli Bendersky

Eli Bendersky added the comment:

Thank you for the patch, Franck. I will review it when I have the time.

--
assignee:  -> eli.bendersky
stage:  -> patch review
versions: +Python 3.4

___
Python tracker 

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



[issue16840] Tkinter doesn't support large integers

2013-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which adds support of "wideInt" and "bignum" Tcl types.

--
assignee: serhiy.storchaka -> 
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file28551/tkinter_bignum.patch

___
Python tracker 

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



[issue16843] sporadic test_sched failure

2013-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a second way patch. It adds a deterministic non-realtime timer.

--
assignee: serhiy.storchaka -> 
stage:  -> patch review
Added file: 
http://bugs.python.org/file28552/test_sched_deterministic_timer.patch

___
Python tracker 

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



[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti

___
Python tracker 

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



[issue16843] sporadic test_sched failure

2013-01-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue5309] packaging doesn't parallelize extension module compilation

2013-01-03 Thread Bradley Froehle

Changes by Bradley Froehle :


--
nosy: +bfroehle

___
Python tracker 

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



[issue16674] Faster getrandbits() for small integers

2013-01-03 Thread Mark Dickinson

Mark Dickinson added the comment:

Looks good to me.

--

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti
resolution: fixed -> 
stage: committed/rejected -> patch review
status: closed -> open

___
Python tracker 

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



[issue16855] traceback module leaves off module name in last line of formatted tracebacks

2013-01-03 Thread Walter Mundt

New submission from Walter Mundt:

The documentation for the traceback module states that it "exactly mimics the 
behavior of the Python interpreter when it prints a stack trace."  However, 
this does not seem to be the case.  In Python 2.7.3, executing the following:

import socket
import sys
import traceback

def raises_socket_timeout():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(0.001)
s.connect(('8.8.8.8', ))

try:
raises_socket_timeout()
except Exception:
print "print_exc():"
traceback.print_exc()
print "-"
print "uncaught:"
raise

Results in this output:

print_exc():
Traceback (most recent call last):
  File "test.py", line 11, in 
raises_socket_timeout()
  File "test.py", line 8, in raises_socket_timeout
s.connect(('8.8.8.8', ))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
timeout: timed out
-
uncaught:
Traceback (most recent call last):
  File "test.py", line 11, in 
raises_socket_timeout()
  File "test.py", line 8, in raises_socket_timeout
s.connect(('8.8.8.8', ))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.timeout: timed out

Note that the last line of the former message is "timeout: timed out" while the 
latter is "socket.timeout: timed out" (much more informative).  I've run into 
this specific difference in trying to debug production systems that use the 
traceback module to log exceptions.  It also affects traceback.format_exc(), 
traceback.format_exception_only(), logging.exception(), and logging.info(..., 
exc_info=True) and friends.

--
messages: 178991
nosy: waltermundt
priority: normal
severity: normal
status: open
title: traceback module leaves off module name in last line of formatted 
tracebacks
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue16840] Tkinter doesn't support large integers

2013-01-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue16009] Json error messages could provide more information about the error

2013-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Charles-François Natali

Charles-François Natali added the comment:

Here's a new version closer to Tulip's one.

--
Added file: http://bugs.python.org/file28553/selector-1.diff

___
Python tracker 

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



[issue16853] add a Selector to the select module

2013-01-03 Thread Charles-François Natali

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file28546/selector.diff

___
Python tracker 

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



[issue5309] setup.py doesn't parallelize extension module compilation

2013-01-03 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The original request is really about setup.py, not packaging. I don't care 
about packaging, and it's not in the stdlib.

--
assignee: tarek -> 
components: +Build -Distutils2
title: packaging doesn't parallelize extension module compilation -> setup.py 
doesn't parallelize extension module compilation
versions: +Python 3.4 -3rd party

___
Python tracker 

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



[issue16850] Atomic open + close-and-exec

2013-01-03 Thread STINNER Victor

STINNER Victor added the comment:

> The feature looks to be supported by at least:
> * FreeBSD 8+

Hum, it looks like it was only added to FreeBSD 8.3:

http://www.freebsd.org/cgi/man.cgi?query=open&apropos=0&sektion=0&manpath=FreeBSD+8.3-RELEASE&arch=default&format=html

(O_CLOEXEC doesn't appear in FreeBSD 8.2 manual page)

--

___
Python tracker 

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



  1   2   >