[issue19193] Improve cross-references in tutorial

2013-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ac826284fdd1 by Serhiy Storchaka in branch '2.7':
Issue #19193: Improved cross-references in the tutorial.
http://hg.python.org/cpython/rev/ac826284fdd1

New changeset 012380d57e44 by Serhiy Storchaka in branch '3.3':
Issue #19193: Improved cross-references in the tutorial.
http://hg.python.org/cpython/rev/012380d57e44

New changeset e338a5c8fcfa by Serhiy Storchaka in branch 'default':
Issue #19193: Improved cross-references in the tutorial.
http://hg.python.org/cpython/rev/e338a5c8fcfa

--
nosy: +python-dev

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-08 Thread Tim Peters

Changes by Tim Peters :


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

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e06edc0c7a49 by Tim Peters in branch '3.3':
Issue 19158:  a rare race in BoundedSemaphore could allow .release() too often.
http://hg.python.org/cpython/rev/e06edc0c7a49

New changeset 7c56bf5afee6 by Tim Peters in branch 'default':
Issue 19158:  a rare race in BoundedSemaphore could allow .release() too often.
http://hg.python.org/cpython/rev/7c56bf5afee6

New changeset cb4fd7515cb4 by Tim Peters in branch '2.7':
Issue 19158:  a rare race in BoundedSemaphore could allow .release() too often.
http://hg.python.org/cpython/rev/cb4fd7515cb4

--
nosy: +python-dev

___
Python tracker 

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



[issue19200] grammar in forkserver docs

2013-10-08 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +sbt

___
Python tracker 

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



[issue19165] Change formatter warning to DeprecationWarning in 3.5

2013-10-08 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue19201] lzma and 'x' mode open

2013-10-08 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
nosy: +nadeem.vawda

___
Python tracker 

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



[issue19201] lzma and 'x' mode open

2013-10-08 Thread Tim Heaney

Changes by Tim Heaney :


--
versions: +Python 3.3

___
Python tracker 

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



[issue19201] lzma and 'x' mode open

2013-10-08 Thread Tim Heaney

New submission from Tim Heaney:

I love the 'x' mode open in recent versions of Python. I just discovered that 
lzma.open doesn't support it. It seems there's an elif that explicitly checks 
the modes allowed. I added "x" and "xb" to the choices and now it works as I 
would like.

--
files: patch.lzma.py
messages: 199272
nosy: oylenshpeegul
priority: normal
severity: normal
status: open
title: lzma and 'x' mode open
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32010/patch.lzma.py

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Removed file: http://bugs.python.org/file32008/byte_format.py

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Here is a proof of concept Python function, with a minimal test. It is similar 
to how str.format could be coded in Python, with re.split and ''.join, except 
that it does not allow anything before : in the format specification. By 
default (no format spec given), it copies bytes objects without change. If a 
format specification *is* given, it does not restrict the object, as this code 
simply uses builtin format sandwiched between decode and encode.

--
Added file: http://bugs.python.org/file32009/byte_format.py

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Added file: http://bugs.python.org/file32008/byte_format.py

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Glyph Lefkowitz

Glyph Lefkowitz added the comment:

On Oct 8, 2013, at 3:19 PM, Augie Fackler wrote:

> No, I'm not. In Mercurial, all end-user data is OPAQUE BYTES, and must remain 
> that way.

The PEP 383 technique for handling file names is completely capable of 
round-tripping exact bytes, given one encoding for both input and output.  You 
can still handle file names this way internally in Mercurial and not risk 
disturbing any observable output.  You do not need to change that in order to 
do what Victor suggests.

We should get together in some other forum and discuss file-name handling 
though, since you can't actually round-trip "opaque bytes" through a 
*filesystem* and not disturb your output.

> Ouch. Is there any way to write things to stderr and stdout without decoding 
> and hopelessly breaking user data?

You can use sys.stdout.buffer.write.

--

___
Python tracker 

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



[issue19200] grammar in forkserver docs

2013-10-08 Thread Elazar Gershuni

New submission from Elazar Gershuni:

in http://docs.python.org/3.4/library/multiprocessing.html#start-methods
for `forkserver`:
"whenever a new process is need the parent process connects to the server and 
requests that it fork a new process."

replace "need " with "needed, ".

--
assignee: docs@python
components: Documentation
messages: 199269
nosy: docs@python, elazar
priority: normal
severity: normal
status: open
title: grammar in forkserver docs
versions: Python 3.4

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Augie, to understand what Viktor meant, I suggest reading
http://www.python.org/dev/peps/pep-0383/
One point of the pep is round-trip filenames without loss on all systems, which 
is just what you say you need.

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Augie Fackler

Augie Fackler added the comment:

On Oct 8, 2013, at 6:28 PM, "Terry J. Reedy"  wrote:

> http://www.python.org/dev/peps/pep-0383/
> One point of the pep is round-trip filenames without loss on all systems, 
> which is just what you say you need.

At a quick skim, likely not good enough, because 
http://en.wikipedia.org/wiki/Shift_JIS isn't completely ASCII-compatible, and 
we've got a fair number of users on weird Shift-JIS using platforms.

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Augie Fackler

Augie Fackler added the comment:

On Oct 8, 2013, at 6:19 PM, Glyph Lefkowitz  wrote:

> Glyph Lefkowitz added the comment:
> 
> On Oct 8, 2013, at 2:35 PM, Eric V. Smith wrote:
> 
>> What proposal is actually on the table here?
> 
> Sorry Eric, you're right, there is too much discussion here.  This issue 
> ought to be about .format, like the title says.  There should be a separate 
> ticket for %-formatting, since it seems to be an almost wholly unrelated 
> task.  While I'm sympathetic to Mercurial's issues, they're somewhat 
> different from Twisted's, in that we're willing to adopt the "one new way" to 
> do things in order to achieve compatibility whereas that would be too hard 
> for Mercurial.

Yeah, my bad too. I suppose I should add a new bug for %-formatting on bytes 
objects?

Note that for hg, we can't drop Python 2.6 or so (we'll only drop *2.4* if we 
can do 2.6 and some 3.x from a single source tree) for a while, due to 
supporting the system interpreter on a variety of LTS platforms.

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Augie Fackler

Augie Fackler added the comment:

On Oct 8, 2013, at 5:24 PM, STINNER Victor  wrote:

> 
> STINNER Victor added the comment:
> 
> 2013/10/8 Augie Fackler :
>> sys.stdout.write('%(state)s %(path)s\n' % {'state': 'M', 'path':
>> 'some/filesystem/path'})
>> 
>> except we don't know the encoding of the filesystem path (Hi unix!) so we
>> have to treat the whole thing as opaque bytes.
> 
> You are doing it wrong. In Python 3, you "should" store filenames as
> Unicode (str type). If Python fails to decode a filename, undecodable
> bytes are stored as surrogate characters (see the PEP 383).

No, I'm not. In Mercurial, all end-user data is OPAQUE BYTES, and must remain 
that way. We're not able to change either our on-disk data format OR our stdout 
format, even to support a newer version of Python. I don't know the encoding of 
the filename's bytes, but I _must_ faithfully reproduce them exactly as they 
are or I'll break tools like make(1) and patch(1). Similarly, if a file goes 
from ISO-8859-1 to UTF-8, I have to emit a diff that has some ISO bytes and 
some UTF bytes - it's not in *any* valid encoding. Changing that is a 
showstopper regression.

> The Unicode type became natural in Python 3, as byte string (old "str"
> type) was natural in Python 2.
> 
> sys.stdout.write() expects a Unicode string, not a byte string.

Ouch. Is there any way to write things to stderr and stdout without decoding 
and hopelessly breaking user data?

> Does it mean that Mercurial is moving to Python 3? Cool :-)

Not likely, honestly. I tackle this when I've got some spare cycles and my 
ability to handle pain is high. As it stands, I have the test-runner barely 
working, but it's making wrong assumptions to get there. The best estimate is 
that it's a year of work to upgrade to Python 3.

> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Glyph Lefkowitz

Glyph Lefkowitz added the comment:

On Oct 8, 2013, at 2:35 PM, Eric V. Smith wrote:

> What proposal is actually on the table here?

Sorry Eric, you're right, there is too much discussion here.  This issue ought 
to be about .format, like the title says.  There should be a separate ticket 
for %-formatting, since it seems to be an almost wholly unrelated task.  While 
I'm sympathetic to Mercurial's issues, they're somewhat different from 
Twisted's, in that we're willing to adopt the "one new way" to do things in 
order to achieve compatibility whereas that would be too hard for Mercurial.

--

___
Python tracker 

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



[issue19199] Remove PyThreadState.tick_counter field

2013-10-08 Thread Tim Peters

Changes by Tim Peters :


--
nosy: +tim.peters

___
Python tracker 

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



[issue19199] Remove PyThreadState.tick_counter field

2013-10-08 Thread Tim Peters

Changes by Tim Peters :


--
nosy: +arigo

___
Python tracker 

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



[issue19199] Remove PyThreadState.tick_counter field

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Should we add a new counter to count the number of executed Python
> instructions per thread? Or fix tick_counter?

Let's just drop it. It's useless and nobody complained.

--

___
Python tracker 

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



[issue19199] Remove PyThreadState.tick_counter field

2013-10-08 Thread STINNER Victor

STINNER Victor added the comment:

PyThreadState.tick_counter field was added in 2002 by Armin Rigo: see issue 
#617311.
"A very very small statistic-collecting patch. (...) The purpose is to give a 
useful measure of the number of interpreted bytecode instructions in a given 
thread."

My patch will probably break the following module :-)
http://packages.ubuntu.com/fr/lucid/python-tickcount
"Python C extension module giving access to the internal tickcounter of python. 
This is useful for certain forms of profiling or performance analysis."
(But tickcounter was meanless since Python 3.2.)

The PyThreadState.tick_counter field was mentionned in the following question:
"Read how many Python instructions have been interpreted?"
http://stackoverflow.com/questions/16437487/read-how-many-python-instructions-have-been-interpreted

Should we add a new counter to count the number of executed Python instructions 
per thread? Or fix tick_counter?

Does we really need such counter or other profilers (cProfile) are enough?

--

___
Python tracker 

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



[issue19199] Remove PyThreadState.tick_counter field

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

Should there be a mention in whats new in case any external tools are (still) 
looking at it and thinking it is meaningful?

--
nosy: +nedbat, r.david.murray

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Eric V. Smith

Eric V. Smith added the comment:

I've lost track what we were talking about. I thought we were trying to support 
b''.format() in 3.4, for a restricted set of arguments.

I don't see how a third-party package is going to help, if the goal is to allow 
3.4 to be source compatible with 2.7. And the recent example uses %-formatting, 
which is not the subject of this ticket.

What proposal is actually on the table here?

--

___
Python tracker 

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



[issue19199] Remove PyThreadState.tick_counter field

2013-10-08 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch.

I'm going to commit it in one week if nobody complains.

--
keywords: +patch
Added file: http://bugs.python.org/file32007/remove_tick_counter.patch

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread STINNER Victor

STINNER Victor added the comment:

2013/10/8 Augie Fackler :
> sys.stdout.write('%(state)s %(path)s\n' % {'state': 'M', 'path':
> 'some/filesystem/path'})
>
> except we don't know the encoding of the filesystem path (Hi unix!) so we
> have to treat the whole thing as opaque bytes.

You are doing it wrong. In Python 3, you "should" store filenames as
Unicode (str type). If Python fails to decode a filename, undecodable
bytes are stored as surrogate characters (see the PEP 383).

The Unicode type became natural in Python 3, as byte string (old "str"
type) was natural in Python 2.

sys.stdout.write() expects a Unicode string, not a byte string.

Does it mean that Mercurial is moving to Python 3? Cool :-)

--

___
Python tracker 

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



[issue19199] Remove PyThreadState.tick_counter field

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Yes, we can :)

--

___
Python tracker 

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



[issue19199] Remove PyThreadState.tick_counter field

2013-10-08 Thread STINNER Victor

New submission from STINNER Victor:

The C structure "PyThreadState" has a counter which is incremented in the 
bytecode evaluation loop (ceval.c), but never used.

/* XXX doesn't mean anything anymore (the comment below is obsolete)
   => deprecate or remove? */
/* tick_counter is incremented whenever the check_interval ticker
 * reaches zero. The purpose is to give a useful measure of the number
 * of interpreted bytecode instructions in a given thread.  This
 * extremely lightweight statistic collector may be of interest to
 * profilers (like psyco.jit()), although nothing in the core uses it.
 */
int tick_counter;

Antoine Pitrou added the XXX comment when he merged the "new GIL" of Python 3.2.

Can we now remove it?

--
messages: 199256
nosy: haypo, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
versions: Python 3.4

___
Python tracker 

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



[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2013-10-08 Thread Brecht Van Lommel

Brecht Van Lommel added the comment:

I tested the patch on Windows and can confirm it solves the problem for Blender.

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Augie Fackler

Augie Fackler added the comment:

On Tue, Oct 8, 2013 at 5:11 PM, Antoine Pitrou wrote:

>
> Antoine Pitrou added the comment:
>
> > > > Punting this to 3.5 basically means we'll have to either wait for
> > > > 3.5, or do something awful like use cffi to grab sprintf to port
> > > > Mercurial.
> > >
> > > Or write a pure Python implementation.
> >
> > Hah. Probably too slow for anything beyond a proof of concept, no?
>
> If it's only for the Mercurial test suite, that shouldn't be a problem?

It's not just the testsuite though: we do this _all over_ hg itself. For
example, status needs to do something like this:

sys.stdout.write('%(state)s %(path)s\n' % {'state': 'M', 'path':
'some/filesystem/path'})

except we don't know the encoding of the filesystem path (Hi unix!) so we
have to treat the whole thing as opaque bytes. It's even more fun for
'log', becase then it's got localized strings in it as well.

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> > > Punting this to 3.5 basically means we'll have to either wait for
> > > 3.5, or do something awful like use cffi to grab sprintf to port
> > > Mercurial.
> >
> > Or write a pure Python implementation.
> 
> Hah. Probably too slow for anything beyond a proof of concept, no?

If it's only for the Mercurial test suite, that shouldn't be a problem?

--

___
Python tracker 

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



[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think ValueError should generally be raised when calling fileno() on a closed 
file. However, this is not something we're gonna change in a bugfix release, so 
it would go in 3.4 at the earliest.

--
nosy: +pitrou

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Glyph Lefkowitz

Glyph Lefkowitz added the comment:

On Oct 8, 2013, at 8:10 AM, Augie Fackler  wrote:

> Hah. Probably too slow for anything beyond a proof of concept, no?

It should perform acceptably on PyPy ;-).

--

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Improve cross-references in cgi documentation, Improve 
cross-references in shlex documentation

___
Python tracker 

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



[issue18948] deliberately crashing tests should prevent core dumps

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Patch committed. Thanks to both of you!

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

___
Python tracker 

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



[issue18948] deliberately crashing tests should prevent core dumps

2013-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1cbd3d9f7d61 by Antoine Pitrou in branch 'default':
Issue #18948: improve SuppressCoreFiles to include Windows crash popup 
suppression, and use it in more tests.
http://hg.python.org/cpython/rev/1cbd3d9f7d61

--
nosy: +python-dev

___
Python tracker 

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



[issue19198] Improve cross-references in cgi documentation

2013-10-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a patch which fixes internal references in the documentation of the cgi 
module.

--
assignee: docs@python
components: Documentation
files: refs.cgi.patch
keywords: patch
messages: 199249
nosy: docs@python, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Improve cross-references in cgi documentation
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32006/refs.cgi.patch

___
Python tracker 

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



[issue19197] Improve cross-references in shlex documentation

2013-10-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a patch which fixes internal references in the documentation of the 
shlex module.

--
assignee: docs@python
components: Documentation
files: refs.shlex.patch
keywords: patch
messages: 199247
nosy: docs@python, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Improve cross-references in shlex documentation
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32005/refs.shlex.patch

___
Python tracker 

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +tim.peters

___
Python tracker 

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



[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Florent, for future reference, marking an issue for 2.7 says to us "I  want 
this fixed for 2.7".

I agree that having 3 different error indicators for 3 similar functions is 
nasty. But this is partly due to the difference between object that *has* a fd 
(socket) versus a object that *wraps such an object. The problem is that 
changing any of them could break code that just uses one of them. 

The select doc says that a 'waitable' object must have .fileno() that return a 
valid fd int. It says nothing about an allowed error return. This could be 
interpreted as meaning that not returning an fd int makes the object (such as a 
closed HTTPResponse) unwaitable. Or this could be interpreted as a deficiency 
in the select doc or code. In the module/selectmodule.c code, the various poll 
methods interpret -1 as the error return for a closed fd. I do not know how it 
deals with socket.fileno raising ValueError (or returning None?).

In the client doc, none of several examples of using HTTPResponses use select. 
They just use the various methods to retrieve data. I could interpret this to 
mean that they are not intended to work with select. The fact that they do not, 
reinforces that.

--

___
Python tracker 

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



[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

OK, I've looked at the docs and code, and as far as I can see this bug does not 
exist in Python3.  Or at least in 3.4, which is the only place I'd feel safe 
about making a change to the exception type.

To summarize: in 3.4 socket logic is based on RawIOBase, as is HTTPResponse.  
And RawIOBase checks to see if the file is closed and raises a ValueError if it 
is, when fileno is called on the 'fp' attribute of the HTTPResponse.  At least, 
that's what I think based on reading the code.

So, unless you can reproduce the error in 3.3 and/or 3.4, I think we should 
close this issue as out of date, since as Terry said there is a non-trivial 
danger of backward incompatibility if we were to change the exception type in 
2.7.

--

___
Python tracker 

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



[issue19196] Improve cross-references in distutils documentation

2013-10-08 Thread Georg Brandl

Changes by Georg Brandl :


--
title: Improve cross-references in pickle documentation -> Improve 
cross-references in distutils documentation

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Improve cross-references in C API

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Improve cross-references in pickle documentation

___
Python tracker 

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



[issue19196] Improve cross-references in pickle documentation

2013-10-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a patch which fixes internal references in distutils  documentation.

--
assignee: docs@python
components: Documentation
files: refs.distutils.patch
keywords: patch
messages: 199244
nosy: docs@python, eric.araujo, serhiy.storchaka, tarek
priority: normal
severity: normal
stage: patch review
status: open
title: Improve cross-references in pickle documentation
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32004/refs.distutils.patch

___
Python tracker 

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



[issue19195] Improve cross-references in C API

2013-10-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a patch which fixes internal references in C API and extension 
documentation.

--
assignee: docs@python
components: Documentation
files: refs.c-api.patch
keywords: patch
messages: 199243
nosy: docs@python, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Improve cross-references in C API
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32003/refs.c-api.patch

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Improve cross-references in fcntl documentation

___
Python tracker 

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



[issue19194] Improve cross-references in fcntl documentation

2013-10-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a patch which fixes internal references in the documentation of the 
fcntl package.

--
assignee: docs@python
components: Documentation
files: refs.fcntl.patch
keywords: patch
messages: 199242
nosy: docs@python, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Improve cross-references in fcntl documentation
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32002/refs.fcntl.patch

___
Python tracker 

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



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

I believe that's the correct usage, in which case there must be a bug in the 
process somewhere.  My guess would be that it is looking for a file in the 
"wrong" place when doing a cross compile, but that's just a guess.

--

___
Python tracker 

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



[issue19171] pow() improvement on longs

2013-10-08 Thread Benjamin Peterson

Benjamin Peterson added the comment:

In general, we like to touch 2.7 as little as possible. I'm not sure it's worth 
arguing about this (admittely small) change meets the bar.

--

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(of course, you can go ahead and commit your version)

--

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Antoine, how strongly do you feel about this?  I confess I don't get
> it.  Copy+paste code duplication doesn't help any of readability,
> correctness, or ease of future maintenance, so I guess it's some
> micro-efficiency concern.  Really?! ;-)

Not very strongly, admittedly. It's just that I find the double locking
a bit silly while we control both implementations :-)

--

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-08 Thread Tim Peters

Tim Peters added the comment:

Antoine, how strongly do you feel about this?  I confess I don't get it.  
Copy+paste code duplication doesn't help any of readability, correctness, or 
ease of future maintenance, so I guess it's some micro-efficiency concern.  
Really?! ;-)

Note that the patch doesn't _introduce_ calling the base class .release() - the 
code always did that.  All it does is put the pre-existing code in a `with:` 
block.  Minimal change.  Yes, the pre-existing code had to be indented, but no 
non-whitespace character changed.

Of course in this case it's trivial either way.  So if I have to duplicate the 
code to get your blessing, fine.  On the other hand, since it _is_ trivial 
either way, I'd rather not bother ;-)

--

___
Python tracker 

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



[issue11009] urllib.splituser is not documented

2013-10-08 Thread Georg Brandl

Changes by Georg Brandl :


--
status: open -> closed

___
Python tracker 

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



[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.

2013-10-08 Thread mpb

mpb added the comment:

No, I have not checked to see if it is a bug in the Windows version of SQLite.

How would I even test that?

I just tried running the command line version of SQLite (version 3.8.0.2 
2013-09-03) on Windows (XP SP2, in VirtualBox).

I manually ran the same statements from the Python script.  I turned on headers 
(.headers ON).  The headers did not contain the quotes around foo_id.

That's probably all the testing I can do easily, unless there is some other way 
to access the cursor description.  I don't have a C development environment 
installed on Windows, nor have I ever written C code that calls SQLite.

--

___
Python tracker 

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



[issue19171] pow() improvement on longs

2013-10-08 Thread Tim Peters

Tim Peters added the comment:

I'm glad you pointed it out, Mark!  You're right about unintended consequences, 
and I confess I didn't think at all about the exponent == 0 case.

I didn't remind myself that 2.7 was a bugfix branch either:  I read Armin's 
"(which can be applied on both trunk and 2.7)" and reflexively checked it in.

I'd _say_ I'd be more careful about that in the future, but since I still use 
2.7.5 for most of my private work I wouldn't believe me either ;-)

--

___
Python tracker 

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



[issue15863] Fine-grained info about Python versions which support changes introduced in micro releases

2013-10-08 Thread Georg Brandl

Georg Brandl added the comment:

I don't think this is necessary.

--
nosy: +georg.brandl
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue15455] index entries not showing up in glossary

2013-10-08 Thread Georg Brandl

Changes by Georg Brandl :


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

___
Python tracker 

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



[issue15264] PyErr_SetFromErrnoWithFilenameObject() undocumented

2013-10-08 Thread Georg Brandl

Georg Brandl added the comment:

Has been documented meanwhile.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue13867] misleading comment in weakrefobject.h

2013-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 39e5ab118602 by Georg Brandl in branch '2.7':
Closes #13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/39e5ab118602

--

___
Python tracker 

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



[issue13867] misleading comment in weakrefobject.h

2013-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1cd2fca12abf by Georg Brandl in branch '3.3':
Closes #13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/1cd2fca12abf

--

___
Python tracker 

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



[issue19171] pow() improvement on longs

2013-10-08 Thread Mark Dickinson

Mark Dickinson added the comment:

No need to revert.  The improvement seems like a good one; I was just a bit 
surprised to see it land in the maintenance branches as well as the default 
branch.  My understanding was that minor performance improvements aren't 
normally candidates for inclusion in 2.7.  Maybe Benjamin can clarify the 
policy here.

> I don't care if the trivial exponent == 0 case slows down [...]

Sure; I guess my point was that even the simplest change can have unexpected / 
unintended consequences, which is one of the reasons that it makes sense to me 
to avoid non-bugfix changes in 2.7 / 3.3.

(We're not totally without use-cases for special-casing pow(a, 0, b), by the 
way:  such a pow operation occurs any time you do 
`hash(Decimal(some_integer))`, though admittedly not with an oversized a.)

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue13867] misleading comment in weakrefobject.h

2013-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1800107873c0 by Georg Brandl in branch 'default':
Closes #13867: remove untrue comment about PyWeakref_Check().
http://hg.python.org/cpython/rev/1800107873c0

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

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Improve cross-references in tutorial

___
Python tracker 

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



[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-10-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Arfrever.

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

___
Python tracker 

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



[issue19193] Improve cross-references in tutorial

2013-10-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a patch which fixes internal references in the tutorial.

--
assignee: docs@python
components: Documentation
files: refs.tutorial.patch
keywords: patch
messages: 199228
nosy: docs@python, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Improve cross-references in tutorial
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32001/refs.tutorial.patch

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Improve cross-references in builtins documentation., Improve 
cross-references in pickle documentation.

___
Python tracker 

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



[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c498d1090970 by Serhiy Storchaka in branch '2.7':
Issue #18037: Do not escape '\u' and '\U' in raw strings.
http://hg.python.org/cpython/rev/c498d1090970

New changeset acb2dacd0d24 by Serhiy Storchaka in branch '3.3':
Issue #18037: Do not escape '\u' and '\U' in raw strings.
http://hg.python.org/cpython/rev/acb2dacd0d24

New changeset a49d313a28ae by Serhiy Storchaka in branch 'default':
Issue #18037: Do not escape '\u' and '\U' in raw strings.
http://hg.python.org/cpython/rev/a49d313a28ae

--

___
Python tracker 

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



[issue14224] packaging: path description of resources is mixed up

2013-10-08 Thread Georg Brandl

Georg Brandl added the comment:

Doc/packaging has been removed.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.

2013-10-08 Thread Kushal Das

Kushal Das added the comment:

Looking at the code, it seems to be a sqlite issue.

--
nosy: +kushaldas

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le mardi 08 octobre 2013 à 16:58 +, Tim Peters a écrit :
> Tim Peters added the comment:
> 
> This is the "right" way to do it:  the subclass wants to extend the
> behavior of the base class .release(), not to replace it.  Calling the
> base class .release() is the natural and obvious way to do that.

Well... IMOHO it would be "natural and obvious" if those were in
different modules written by different developers.
Here I think that "practicality beats purity", though.
(although I'm not sure the person who originally wrote that sentence can
really be trusted ;-))

> About acquire(), this is a bugfix - I'm not looking here to change
> code that isn't broken ;-)

Agreed. Just wanted to mention it before I'd totally forget about it.

--

___
Python tracker 

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



[issue13436] compile() doesn't work on ImportFrom with level=None

2013-10-08 Thread Georg Brandl

Changes by Georg Brandl :


--
components:  -Documentation
nosy:  -docs@python, python-dev

___
Python tracker 

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



[issue13436] compile() doesn't work on ImportFrom with level=None

2013-10-08 Thread Georg Brandl

Changes by Georg Brandl :


--
Removed message: http://bugs.python.org/msg148146

___
Python tracker 

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



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-08 Thread Trevor Bowen

Trevor Bowen added the comment:

I executed "make touch" between "configure" and "make", but the build process 
still created Parser/pgen and then tried to use it, which of course crashed the 
build, since pgen was compiled for the embedded host not the build system.  :(  
Was that the wrong usage?

--

___
Python tracker 

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



[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-08 Thread Florent Viard

Florent Viard added the comment:

R. David, what you say is correct, supporting "select" that would be nice but 
i'm also not sure that is supposed to, and in that case, maybe select as to be 
fixed for that.

But:
a) As urllib2 through httplib provide publicly a fileno, i was excepting so.
b) The real point of my issue is that i noticed that there is 3 different 
return values, for the similar fileno function in 3 different modules of 
python, when the file descriptor is closed or inexistant:
- in urllib2->httplib: AttributeError as "None" as no "fileno()" attribute.
- in socket : ValueError
- in fileinput: -1

And for the 2 firsts, one is finally using the fileno function of the other.

--

___
Python tracker 

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



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-08 Thread Trevor Bowen

Trevor Bowen added the comment:

Thanks, David!  I have no interest in running pgen on the target/host.  My only 
interest is building python and its various modules to run on my embedded host. 
 I do not want to develop Python on the embedded host.  Unfortunately, the 
build process requires Parser/pgen to build the grammar files, which are needed 
for several object files.  Here's the relevant snippet from the Makefile.pre.in:

$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
@$(MKDIR_P) Include
$(MAKE) $(PGEN)
$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
$(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
$(MAKE) $(GRAMMAR_H)
touch $(GRAMMAR_C)

$(PGEN):$(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)

Parser/grammar.o:   $(srcdir)/Parser/grammar.c \
$(srcdir)/Include/token.h \
$(srcdir)/Include/grammar.h
...
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)

If there is a way to eliminate the need for Parser/pgen to run on the build 
system to cross-compile the default "all" target, that would be great. ... I'll 
experiment with "make touch". ... Thanks!

--

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-08 Thread Tim Peters

Tim Peters added the comment:

This is the "right" way to do it:  the subclass wants to extend the behavior of 
the base class .release(), not to replace it.  Calling the base class 
.release() is the natural and obvious way to do that.  It's also utterly normal 
for a lock used by multiple methods to be acquired & released multiple times - 
that's what an RLock is for.  What's odd to my eyes is that Semaphore - before 
the patch - went out of its way to _not_ use an RLock in its condition variable 
(Conditions use an RLock by default, for good reasons).

About acquire(), this is a bugfix - I'm not looking here to change code that 
isn't broken ;-)

--

___
Python tracker 

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



[issue19192] Move test_current_time from test_xmlrpc_net to test_xmlrpc

2013-10-08 Thread Vajrasky Kok

New submission from Vajrasky Kok:

Currently, the test_current_time is idle because the server (time.xmlrpc.com) 
that it requires is dead (at the moment being and no end in sight).

The patch moved the test from Lib/test/test_xmlrpc_net.py to 
Lib/test/test_xmlrpc.py and simulate the time.xmlrpc.com server using 
http_server's TestInstanceClass.

--
components: Tests
files: move_current_time_test_from_xmlrpc_net_to_xmlrpc.patch
keywords: patch
messages: 199218
nosy: r.david.murray, vajrasky
priority: normal
severity: normal
status: open
title: Move test_current_time from test_xmlrpc_net to test_xmlrpc
versions: Python 3.4
Added file: 
http://bugs.python.org/file32000/move_current_time_test_from_xmlrpc_net_to_xmlrpc.patch

___
Python tracker 

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



[issue19171] pow() improvement on longs

2013-10-08 Thread Tim Peters

Tim Peters added the comment:

I'll revert the 2.7 change if people agree that's a good thing.  I'm fine with 
it as-is.  Armin pulled the idea from timing a Python public-key crypto project 
(see the original message in this report), where he found a 14% improvement.

I don't care if the trivial exponent == 0 case slows down - that's _truly_ 
unlikely ;-)  The time spent special-casing it would marginally slow down other 
cases without good reason.  For any exponent other than 0, reduction by the 
base must be done.

--

___
Python tracker 

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



[issue19168] pprint.pprint(..., compact=True) not implemented

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

FYI: the development documentation tracks the tip of the default branch, so it 
sometimes documents features that have not yet been released even in an alpha.  
When we hit the first beta, *then* if the code doesn't match the docs there is 
a bug :)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

There is a decent chance this is a bug in sqlite.  Have you checked?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

make touch avoids rebuilding "pgen and stuff", and just uses what was checked 
out or provided in the tarball.  The release tarballs are supposed to have the 
time stamps in the correct order so that the compiletime/boostrapping utilities 
don't get built/rebuilt.

So for cross compilation, you should be able to use the existing files to build 
the target python.  If you then also want pgen *on the target*, you will need 
to build it for the target.  Like I said, I don't have much experience with 
this stuff, but if I understand correctly, you only really the utilities if you 
want to be able to do development *of python* on the target.

So, if running make in cross-compile "mode" (whatever that looks like, I have 
no clue) tries to rebuild pgen in your scenario, then *that* is what needs to 
be fixed, I think.

Of course, I could be completely wrong, which is why I've been pretty tentative 
about handing out advice :)

--

___
Python tracker 

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



[issue19165] Change formatter warning to DeprecationWarning in 3.5

2013-10-08 Thread R. David Murray

New submission from R. David Murray:

You two may know what this is about, but I have no clue :)  A few more details 
would help if someone wants to try their hand at a patch.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue19187] Use a set for interned strings

2013-10-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

It seems to me that there is indeed an issue of some sort here, but its locus 
is (to me) unclear.  I haven't commented before this because I wanted to read 
the docs...but I haven't had time yet :)  

One question is, is it even expected that passing a Request to select will 
work?  If it *is* expected, then what is the API that req should be conforming 
to?  This API may be an implicit one that is not documented, or perhaps it is 
documented in select (I haven't checked).  If req is conforming to the explicit 
or implicit API, then the bug would be in select.  Otherwise it is in httplib.

Or, if this isn't something we've been supporting in the past, then as Terry 
says it is a new feature.

--

___
Python tracker 

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



[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

s/httplib/urllib/

--

___
Python tracker 

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



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

2013-10-08 Thread R. David Murray

R. David Murray added the comment:

Well, you could writing a streaming codec.  Even if it didn't get accepted for 
the stdlib, you could put it up on pypi.

--

___
Python tracker 

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



[issue19191] os.path.splitext in windows , a little question

2013-10-08 Thread Tim Golden

Changes by Tim Golden :


--
resolution:  -> wont fix
stage:  -> committed/rejected

___
Python tracker 

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



[issue19191] os.path.splitext in windows , a little question

2013-10-08 Thread Tim Golden

Tim Golden added the comment:

This was implemented after discussion in issue1115886:

  http://bugs.python.org/issue1115886

and python-dev:

  https://mail.python.org/pipermail/python-dev/2007-March/071557.html

In short, it could have gone either way and it went this way.

--
nosy: +tim.golden

___
Python tracker 

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



[issue19191] os.path.splitext in windows , a little question

2013-10-08 Thread xiaowei

New submission from xiaowei:

>>> print( os.path.splitext.__doc__ )
Split the extension from a pathname.

Extension is everything from the last dot to the end, ignoring
leading dots.  Returns "(root, ext)"; ext may be empty.
>>> os.path.splitext('.txt')
('.txt', '')

 
I think, in windows it should be ('','.txt'), because the first dot doesnot 
mean hiding. Actually, in windows file explorer , it will show a empty file 
name and hide the extension if the extension has been related a program except 
shell32.dll,just like the attachment show. So, in windows, the last dot , even 
it's the first character of the file name, it still means the start of the file 
extension name.

In this case, windows doesnot like linux, we donot have to make them same. 

If you agree, then
why we can talk ignoring leading dots or not ..
i mean
os.path.splitext('...ext')

Anyway, thank you , for your work, even you donot think so

--
components: Windows
files: fileext.JPG
messages: 199208
nosy: xiaowei.py
priority: normal
severity: normal
status: open
title: os.path.splitext in windows , a little question
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file31999/fileext.JPG

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Augie Fackler

Augie Fackler added the comment:

On Tue, Oct 8, 2013 at 11:08 AM, Antoine Pitrou wrote:

> > Is there any chance we could just have it work for bytes, ints, and
> > floats? That'd solve the immediate need, and it'd be obviously
> > correct how to have those behave.
>
> You mean "%s" and "%d"?
>

Basically, yes.

>
> > Punting this to 3.5 basically means we'll have to either wait for
> > 3.5, or do something awful like use cffi to grab sprintf to port
> > Mercurial.
>
> Or write a pure Python implementation.

Hah. Probably too slow for anything beyond a proof of concept, no?

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Is there any chance we could just have it work for bytes, ints, and
> floats? That'd solve the immediate need, and it'd be obviously
> correct how to have those behave.

You mean "%s" and "%d"? 

> Punting this to 3.5 basically means we'll have to either wait for
> 3.5, or do something awful like use cffi to grab sprintf to port
> Mercurial.

Or write a pure Python implementation.

--

___
Python tracker 

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



[issue13405] Add DTrace probes

2013-10-08 Thread Marc Abramowitz

Marc Abramowitz added the comment:

Nice to see this moving along as I helped Jesús a while back with some testing 
on OS X and FreeBSD. The buildbots in particular sound like a great asset.

Let me know if I can help again with testing, though it looks like the basics 
are pretty well-covered by the buildbots.

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Eric V. Smith

Eric V. Smith added the comment:

Also, with the PEP 393 changes, the implementation will be much more difficult. 
Sharing code with str (unicode) will likely be impossible, or require much 
refactoring of the existing code.

--

___
Python tracker 

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



[issue3982] support .format for bytes

2013-10-08 Thread Eric V. Smith

Eric V. Smith added the comment:

If you could write up a concrete proposal, including which format specifiers 
would be supported, that would be helpful.

Would it be extensible with something like __bformat__?

There's really quite a bit of work to be done to specify how this would work.

--

___
Python tracker 

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



[issue16817] test___all__ affects other tests by doing too much importing

2013-10-08 Thread Eli Bendersky

Eli Bendersky added the comment:

This is superceded by:

http://bugs.python.org/issue18906

--
superseder:  -> Create a way to always run tests in subprocesses within regrtest

___
Python tracker 

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



[issue14332] Better explain "junk" concept in difflib doc

2013-10-08 Thread Eli Bendersky

Eli Bendersky added the comment:

Tim, any suggestions?

--

___
Python tracker 

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



[issue9398] Unify sys.settrace and sys.setprofile tests

2013-10-08 Thread Eli Bendersky

Changes by Eli Bendersky :


--
nosy:  -eli.bendersky

___
Python tracker 

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



[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2013-10-08 Thread Eli Bendersky

Changes by Eli Bendersky :


--
nosy:  -eli.bendersky

___
Python tracker 

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



[issue9317] Incorrect coverage file from trace test_pickle.py

2013-10-08 Thread Eli Bendersky

Changes by Eli Bendersky :


--
nosy:  -eli.bendersky

___
Python tracker 

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



  1   2   >