[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

[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 ___ __

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

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

[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://mai

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

[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

[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

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

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

[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

[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

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

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

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

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

[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

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

[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, ". -- assign

[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

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

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

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

[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

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

[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://m

[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

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

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

[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 ___ _

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

<    1   2