[issue9195] Link in docs from "String Formatting Operations" to "Template Strings"

2010-07-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue9195] Link in docs from "String Formatting Operations" to "Template Strings"

2010-07-07 Thread Craig McQueen
New submission from Craig McQueen : I stumbled across "Template Strings" of PEP 292 by accident recently. I'd never heard of it before. I'm familiar with the "string interpolation" aka "String Formatting Operations", and I know to find that in the docs under "Standard Types", i.e. http://docs.

[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Be sure to consider the impact on the peephole optimizer. Also consider that adding volume inside the ceval.c loop may have unintended slowing effects on various compilers -- supposedly, this has been a serious issue in that past and there has been concer

[issue9189] Improve CFLAGS handling

2010-07-07 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-07 Thread Ezio Melotti
Ezio Melotti added the comment: Given that '\U0001'.isprintable() returns True, I would say yes. If someone needs to print this char and has an appropriate font to do it, I don't see why it shouldn't work. -- ___ Python tracker

[issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop

2010-07-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Extension Modules, Windows nosy: +brian.curtin stage: -> unit test needed type: -> behavior ___ Python tracker ___

[issue9189] Improve CFLAGS handling

2010-07-07 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: > Passing in user values to CFLAGS on configure should already work > without the patch. Since the user's CFLAGS settings are overridden by Python's OPT settings, it doesn't already work without the patch. > I'm not sure why you'd want to modify CFLAGS on Mak

[issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop

2010-07-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The comment before fixupMultiSZ and countString states: ** Note that fixupMultiSZ and countString have both had changes ** made to support "incorrect strings". The registry specification ** calls for strings to be terminated with 2 null bytes. It seems **

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-07-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/op

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-07-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/op

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: C code changes eliminating round-trips between timdelta and int offsets committed in r82642 and Python code changes committed to sandbox in r82641. Now the requested behavior change is easy and I am about +0.5 on relaxing the offset checks to allow seco

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Now I wonder whether it's reasonable to consider this character U+1 (LINEAR B SYLLABLE B008 A) as printable with repr(). Yes, its category is "Lo", but is there a font which can display it? -- ___ Pyt

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue5288a.diff addressed comments from Rietveld. -- stage: unit test needed -> commit review Added file: http://bugs.python.org/file17897/issue5288a.diff ___ Python tracker

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-07-07 Thread Vlastimil Brom
Vlastimil Brom added the comment: I guess, I am not supposed to post to python-dev - not being a python developer, hopefully it is appropriate to add a comment here - only based on my current usage of (a modified) difflib.SequenceMatcher. It seems, the mentions of text comparison in that threa

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-07-07 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- assignee: -> amaury.forgeotdarc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue9189] Improve CFLAGS handling

2010-07-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Jeffrey Yasskin wrote: > > New submission from Jeffrey Yasskin : > > Patch at http://codereview.appspot.com/1749042. > > The idea here is to let the user set CFLAGS on either configure or make (or > both), and have later settings appear later in the $CC

[issue4928] Problem with tempfile.NamedTemporaryFile

2010-07-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Where does it say that they are supposed to be deleted when the process > is > killed, Well, it is more of a "natural expectation" I guess. > and what mechanism specifically is supposed to actually perform the > deletion? That's not the kind of questions u

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Uploaded issue5288.diff to Rietveld: http://codereview.appspot.com/1698050 -- nosy: +benjamin.peterson ___ Python tracker ___ _

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2010-07-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: structseq now does subclass tuple, so if there's any interest in adding namedtuple APIs, now it should be easier. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: This was a fantastic check-in. Thanks Benjamin. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Éric Araujo
Changes by Éric Araujo : -- stage: unit test needed -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: I would suggest to document changed behavior of string interpolation with sys.version_info and sys.getwindowsversion() in "What’s New in Python 2.7" page and maybe "What’s New In Python 3.1" page. -- _

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Applied in r82636. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pyt

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks great. I love the patches where few '+'s are drowning in a sea of '-'s! A gratuitous nitpick (feel free to ignore). In +val = PyStructSequence_GET_ITEM(obj, i); if (cname == NULL || val == NULL) { The null check for val is now r

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: (New patch addresses review.) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Jul 7, 2010 at 4:19 PM, Benjamin Peterson wrote: >>  - PyStructSequence_New does not fill ob_item array with NULLs. > > I'm not sure it really matters, since the fields should always be > filled in, but I suppose it can't hurt... The following p

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : Added file: http://bugs.python.org/file17896/structseq-inheritance2.patch ___ Python tracker ___ ___ Python-bugs

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/7/7 Alexander Belopolsky : > > Alexander Belopolsky added the comment: > > This is definitely the right way to do it.  I expect that I will have only > minor nit-picks as I go through the patch. > > 1. You can probably just do > > #define PyStructSeque

[issue9193] Versioned .so files

2010-07-07 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue9189] Improve CFLAGS handling

2010-07-07 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue8413] String interpolation doesn't work with sys.version_info

2010-07-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is definitely the right way to do it. I expect that I will have only minor nit-picks as I go through the patch. 1. You can probably just do #define PyStructSequence_SET_ITEM PyTuple_SET_ITEM #define PyStructSequence_GET_ITEM PyTuple_GET_ITEM ther

[issue9189] Improve CFLAGS handling

2010-07-07 Thread Brett Cannon
Brett Cannon added the comment: Just to say what I said in my Rietveld review of the patch: I support the approach Jeffrey is taking and the patch looks good. -- ___ Python tracker

[issue5907] repr of time.struct_time type does not eval

2010-07-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +String interpolation doesn't work with sys.version_info ___ Python tracker ___ ___

[issue4928] Problem with tempfile.NamedTemporaryFile

2010-07-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I can't think of any way that you might be able to implement the behavior > being requested here. Thanks for the confirmation; lowering the priority then. It would, of course, be possible to improve quality by registering an atexit handler. Which, of cour

[issue4928] Problem with tempfile.NamedTemporaryFile

2010-07-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I can't think of any way that you might be able to implement the behavior being requested here. Instead, if you don't want to leave files lying around, use TemporaryFile instead of NamedTemporaryFile. Perhaps the documentation for NamedTemporary file co

[issue4928] Problem with tempfile.NamedTemporaryFile

2010-07-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: Unfortunately, I typically don't have time to consider the priority of issues. However, in the specific case, I also fail to see the bug. Where does it say that they are supposed to be deleted when the process is killed, and what mechanism specifically is su

[issue9193] Versioned .so files

2010-07-07 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue9193] Versioned .so files

2010-07-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Attaching patch from live branch living here: https://code.edge.launchpad.net/~barry/python/sovers -- Added file: http://bugs.python.org/file17895/preview.diff ___ Python tracker

[issue9193] Versioned .so files

2010-07-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue9193] Versioned .so files

2010-07-07 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : As described in the thread started here: http://mail.python.org/pipermail/python-dev/2010-June/100998.html this bug requests that a new configure option called --with-so-abi-tag be added to Python 3.2 to support sharing of .so files for different versions

[issue9192] Add a a way to determine float format

2010-07-07 Thread Benjamin Peterson
New submission from Benjamin Peterson : At the moment, the only way is float.__getformat__() which is unpleasant and unofficial. Perhaps we could add a member to sys.float_info. -- components: Interpreter Core messages: 109488 nosy: benjamin.peterson, mark.dickinson priority: low severi

[issue9188] test_gdb fails for UCS2 builds with UCS2 gdb

2010-07-07 Thread Dave Malcolm
Dave Malcolm added the comment: The traceback is Traceback (most recent call last): File "/home/antoine/cpython/27/python-gdb.py", line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File "/home/antoine/cpython/27/python-gdb.py", line 183, in get_truncated_repr sel

[issue9191] winreg.c:Reg2Py() may leak memory (in unusual circumstances)

2010-07-07 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue9191] winreg.c:Reg2Py() may leak memory (in unusual circumstances)

2010-07-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : In Reg2Py() in winreg.c, in the REG_MULTI_SZ case, there's the following: wchar_t **str = (wchar_t **)malloc(sizeof(wchar_t *)*s); if (str == NULL) return PyErr_NoMemory(); However, not all of the return

[issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib"

2010-07-07 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks. The relevant code in setup.py is all wrapped with --pydebug: if COMPILED_WITH_PYDEBUG or not have_usable_openssl: All of my testing had been --with-pydebug. Rebuilding without --with-pydebug leads to some interesting failures; as you say, if Op

[issue876421] logging handlers raise exception on level

2010-07-07 Thread Mickey Killianey
Mickey Killianey added the comment: Would you be willing to consider supporting the level keyword as a convenience for the most simple/common Handlers? (For example, maybe just StreamHandler and FileHandler?) -- nosy: +Mickey.Killianey ___ Python

[issue9190] Undefined behaviour in _PyFloat_Pack4

2010-07-07 Thread Mark Dickinson
New submission from Mark Dickinson : _PyFloat_Pack4 does a double-to-float cast, without first checking that the value being converted is within the range of a float. According to C99 6.3.1.5p2, this results in undefined behaviour. It should be fixed (probably via comparison with FLT_MAX bef

[issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError

2010-07-07 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed in py3k in r82626. I'm going to leave this as a 'won't fix' for the maintenance branches, on the basis that the risk of breaking code by changing the exception type exceeds the benefit from the fix. -- resolution: -> fixed stage: patch review

[issue9189] Improve CFLAGS handling

2010-07-07 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9189] Improve CFLAGS handling

2010-07-07 Thread Jeffrey Yasskin
New submission from Jeffrey Yasskin : Patch at http://codereview.appspot.com/1749042. The idea here is to let the user set CFLAGS on either configure or make (or both), and have later settings appear later in the $CC command line. I left OPT, BASECFLAGS, and EXTRA_CFLAGS around in case people

[issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X

2010-07-07 Thread Tarek Ziadé
Tarek Ziadé added the comment: Since there will be no standalone release of this code, no worries -- ___ Python tracker ___ ___ Python

[issue4928] Problem with tempfile.NamedTemporaryFile

2010-07-07 Thread Stefan Krah
Changes by Stefan Krah : -- title: Problem with tempfile.NamedTemporaryFile on Solaris 10 -> Problem with tempfile.NamedTemporaryFile ___ Python tracker ___ _

[issue4928] Problem with tempfile.NamedTemporaryFile on Solaris 10

2010-07-07 Thread Stefan Krah
Stefan Krah added the comment: I can reproduce this on Ubuntu with Python 2.7 and 3.2. -- nosy: +skrah ___ Python tracker ___ ___ Pyth

[issue8605] test_gdb can fail with compiler opts

2010-07-07 Thread Dave Malcolm
Dave Malcolm added the comment: Oops, my bad. Patch looks good as is. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue4928] Problem with tempfile.NamedTemporaryFile on Solaris 10

2010-07-07 Thread Mark Lawrence
Mark Lawrence added the comment: Shouldn't this get looked at as it's high priority, albeit over a year old? -- nosy: +BreamoreBoy versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker __

[issue4724] setting f_exc_traceback aborts in debug builds

2010-07-07 Thread Mark Lawrence
Mark Lawrence added the comment: Anybody willing and able to run with this? -- nosy: +BreamoreBoy stage: -> needs patch type: -> crash versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker

[issue2744] Fix test_cProfile

2010-07-07 Thread Mark Lawrence
Mark Lawrence added the comment: Is there anybody who can run with this as it's been in limbo for over two years? -- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.2 ___ Python tracker _

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-07 Thread Georg Brandl
Georg Brandl added the comment: Mark, __dir__ as a special method only works when defined on types, so you'd have to use a module subclass for the "regex" module :) As I already suggested, it is probably best to move most of the private stuff into a separate module, and only import the really

[issue9188] test_gdb fails on narrow unicode builds

2010-07-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : == FAIL: test_unicode (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of unicode values -- Traceback (most recen

[issue8605] test_gdb can fail with compiler opts

2010-07-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Minor nit: given that final_opt is set to "" at the start of the loop, > the > first conditional in: > if final_opt and final_opt != '-O0': > appears to be redundant. I don't think it is (the empty string is false, but "" != "-O0" is true). -- n

[issue9187] Can't find file "vcvars64.bat"

2010-07-07 Thread Stefan Krah
Stefan Krah added the comment: > There error info is same as Issue7511. Yes. Issue 7511 will be fixed at some point in distutils2. Closing this as a duplicate. -- nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> msvc9compiler.p

[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X

2010-07-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Note that this does not just affect MacOSX, this even affects Linux (although the behaviour on the default filesystems is different). On Linux the default is case-sensitive filesystems, but you can use network filesystems that have case-insensitive behavior,

[issue9187] Can't find file "vcvars64.bat"

2010-07-07 Thread Lloyd Sheng
New submission from Lloyd Sheng : While I install Pymongo,Error shows that: running install running bdist_egg running egg_info writing pymongo.egg-info\PKG-INFO writing top-level names to pymongo.egg-info\top_level.txt writing dependency_links to pymongo.egg-info\dependency_links.txt reading man

[issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError

2010-07-07 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError

2010-07-07 Thread Mark Dickinson
New submission from Mark Dickinson : >>> from math import log1p >>> log1p(-1.0) Traceback (most recent call last): File "", line 1, in OverflowError: math range error This should be a ValueError instead. (Thanks Benjamin for noticing this.) -- assignee: mark.dickinson components: Ex

[issue8400] zipimporter find_module fullname mis-documented

2010-07-07 Thread Ryan Kelly
Ryan Kelly added the comment: Was also just bitten by this, trying to muck with PEP-302-style import hooks. Note that the documented behaviour of zipimporter is also the behaviour required by PEP 302, i.e. full dotted module name. -- nosy: +rfk __

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-07 Thread Stefan Krah
Stefan Krah added the comment: I agree that there should be a workaround. In py3k the function is implemented like you suggest. -- stage: -> needs patch ___ Python tracker ___ _

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-07 Thread Zsolt Cserna
Zsolt Cserna added the comment: You are right, but this bug could be easily avoided by using one of the suggested solutions. In my experience a fix sized buffer (whose size is MAXLPATHLEN - or 1024 if not defined) is usually passed to getcwd and the errno is propagated back to the caller if t

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-07 Thread Stefan Krah
Stefan Krah added the comment: I've encountered this a while ago on OpenSolaris. According to the man page http://docs.sun.com/app/docs/doc/816-5168/getcwd-3c?a=view this would be a bug in getcwd(): ERANGE The size argument is greater than 0 and less than the length of the pathname plus 1

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-07 Thread Mark Summerfield
Mark Summerfield added the comment: I was wrong about r"(?.*)". It is valid in the new engine. And the PyPI docs do say so immediately _following_ the example. I've tried all the examples in "Programming in Python 3 second edition" using "import regex as re" and they all worked. --

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-07 Thread Zsolt Cserna
Zsolt Cserna added the comment: There would be also a solution to allocate a fix buffer with MAXLPATHLEN size and call the getcwd function only one time - if MAXLPATHLEN is available. -- ___ Python tracker __

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-07 Thread Mark Summerfield
Mark Summerfield added the comment: If you do: >>> import regex as re >>> dir(re) you get over 160 items, many of which begin with an underscore and so are private. Couldn't __dir__ be reimplemented to eliminate them. (I know that the current re module's dir() also returns private items, but

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-07 Thread Mark Summerfield
Mark Summerfield added the comment: On the PyPI page: http://pypi.python.org/pypi/regex/0.1.20100706.1 in the "Subscripting for groups" bullet it gives this pattern: r"(?.*?)(?\\d+)(?.*)" Shouldn't this be: r"(?P.*?)(?P\\d+)(?P.*)" Or has a new syntax been introduced? -- __

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-07 Thread Zsolt Cserna
New submission from Zsolt Cserna : os.getcwd() causes infinite loop on solaris10 when the length of the current directory is greater than 1024 (them limit of the maximum absolute path). os.getcwd is implemented by a while loop in python, see the function posix_getcwd in posixmodule.c. That whi

[issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X

2010-07-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: sorted() and set() were introduced in Python 2.4. If your code will not run in Python 2.3 anyway, then using those should be fine. The only other place currently using set() is the MSVC9 compiler code. sorted() is not used at all in distutils. list.sort()