[issue10538] PyArg_ParseTuple("s*") does not always incref object

2010-11-26 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : The new "s*" code for PyArg_ParseTuple is used to fill a Py_buffer object from the arguments. This object must be relased using PyBuffer_Release() after use. However, if the object in the tuple does not support the new buffer interface, the old buf

[issue10538] PyArg_ParseTuple("s*") does not always incref object

2010-11-26 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson : -- versions: -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue2504] Add gettext.pgettext() and variants support

2010-11-26 Thread Wichert Akkerman
Wichert Akkerman added the comment: I can help test changes for python 2.x. The python 3.x ecosystem is at least a year away from becoming interesting for me I'm afraid. -- ___ Python tracker _

[issue10538] PyArg_ParseTuple("s*") does not always incref object

2010-11-26 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> pitrou nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10122] Documentation typo fix and a side question

2010-11-26 Thread Georg Brandl
Georg Brandl added the comment: I don't waste my time by merging every little typo fix to the maintenance branches immediately; I rather merge them all at once every now and then. You will certainly understand that nobody is harmed by a stray "d", even if it has a pointy tip. -- __

[issue10299] Add index with links section for built-in functions

2010-11-26 Thread Georg Brandl
Georg Brandl added the comment: Dividing the table in sections makes sense to me; it provides the kind of grouping that is helpful sometimes, but cannot be kept when sorting alphabetically. So when the table is grouped, the actual docs can remain alphabetized. -- __

[issue10526] Minor typo in What's New in Python 2.7

2010-11-26 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r86794. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue9312] Fix usage of :option: markup in stdlib ReST docs

2010-11-26 Thread Georg Brandl
Georg Brandl added the comment: Yes, you're right; you could have linked to the correct -c option by using this form: :option:`unittest -c` -- ___ Python tracker ___ __

[issue10420] Document of Bdb.effective is wrong.

2010-11-26 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r86798. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue10172] code block has no syntax coloring

2010-11-26 Thread Georg Brandl
Georg Brandl added the comment: This is because the Python used to render doesn't recognize the new-style exception catching; this will be fine once the system is upgraded to 2.6. -- nosy: +georg.brandl resolution: -> later status: open -> closed _

[issue5211] Fix complex type to avoid coercion in 2.7.

2010-11-26 Thread Mark Dickinson
Mark Dickinson added the comment: I think that's expected behaviour. Note that int vs float behaves in the same way as float vs complex: >>> class xint(int): ... def __radd__(self, other): ... print "__radd__" ... return 42 ... >>> 3 + xint(5) __radd__ 42 >>> 3.0 + xint(5

[issue10535] Enable warnings by default in unittest

2010-11-26 Thread Davide Rizzo
Changes by Davide Rizzo : -- nosy: +davide.rizzo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1059244] distutil bdist hardcodes the python location

2010-11-26 Thread anatoly techtonik
anatoly techtonik added the comment: As I can't reopen this issue, I'd like to ask for another opinion before closing this ticket. I think it's closed prematurely. For the bare minimum there should be a link to corresponding issue in distutils2 project. -- ___

[issue10510] distutils upload/register should use CRLF in HTTP requests

2010-11-26 Thread Brian Jones
Brian Jones added the comment: Sure. I'll create a patch in the next few days and submit it. Thanks for the link to the guidelines. :) -- ___ Python tracker ___ ___

[issue1059244] distutil bdist hardcodes the python location

2010-11-26 Thread Tarek Ziadé
Tarek Ziadé added the comment: I am +1 with what Eric said. I'd suggest that you send a mail to teh distutils2 development mailing list to make some proposals. -- ___ Python tracker

[issue10510] distutils upload/register should use CRLF in HTTP requests

2010-11-26 Thread Brian Jones
Brian Jones added the comment: So... have I missed a memo, or is it currently impossible to test the current svn version of distutils in the current svn version of Python? The tests for (at least) register and upload are written using Python 2.x syntax and modules. How are new features and fi

[issue10510] distutils upload/register should use CRLF in HTTP requests

2010-11-26 Thread Tarek Ziadé
Tarek Ziadé added the comment: If you can make your server work with the current implementation, I'd rather not change this in distutils but in distutils2. Distutils is frozen and we make only bug fixes. By bug fix I mean anything that is a bug. A non-strict implementation of the EOLs is not

[issue10538] PyArg_ParseTuple("s*") does not always incref object

2010-11-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue6983] Add specific get_platform() for freebsd

2010-11-26 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- components: +Distutils2, Library (Lib) -Distutils ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue10510] distutils upload/register should use CRLF in HTTP requests

2010-11-26 Thread Brian Jones
Brian Jones added the comment: If it's not a bug in distutils1, I imagine it will not be a bug in distutils2, since that will also presumably work with PyPI, and PyPI will be the single solitary supported implementation of the service? I also don't see distutils2 in this list http://svn.pyth

[issue10510] distutils upload/register should use CRLF in HTTP requests

2010-11-26 Thread Tarek Ziadé
Tarek Ziadé added the comment: > If it's not a bug in distutils1, I imagine it will not be a bug in distutils2 Yes that would be a feature request. we would be happy to add. e.g. make the commands works with server X ou server Y. > I also don't see distutils2 in this list http://svn.python.o

[issue10539] Regular expression not checking 'range' element on 1st char in string.

2010-11-26 Thread Jamie Murray
New submission from Jamie Murray : The first char in a word is omitted from being checked against the 'range' element of the 1st part of this expression. The second char is properly checked to see if it's in range # Desired safe string to expect goodString = "f42e6be1-29bf-4f3c-ba58-1ae1d9ca

[issue10540] test_shutil fails on Windows after r86733

2010-11-26 Thread Brian Curtin
New submission from Brian Curtin : My build slave shows a test failure at test_dont_copy_file_onto_link_to_itself. This happens because the implementation of _samefile in Lib/shutil.py (line 70) doesn't work for Windows hard links. Patch on the way. -- assignee: brian.curtin component

[issue10541] regrtest.py -T broken

2010-11-26 Thread Walter Dörwald
New submission from Walter Dörwald : Running regrtest.py with coverage option seems to be broken for the py3k branch at the moment. Run the following commands on the shell: wget http://svn.python.org/snapshots/python3k.tar.bz2 tar xjf python3k.tar.bz2 cd python ./configure --enable-unicode=ucs4

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : As discussed in issue 10521 and the sprawling "len(chr(i)) = 2?" thread [1] on python-dev, many functions in python library behave differently on narrow and wide builds. While there are unavoidable differences such as the length of strings with non-B

[issue9200] str.isprintable() is always False for large code points

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: AFAICT, all ctype methods (isalpha, isdigit, etc.) have the same problem. I posted a patch at issue10542 that introduces a Py_UNICODE_NEXT() macro that can help fixing all these methods. I am adding #10542 as a dependency and if there are no objection

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +haypo, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue10540] test_shutil fails on Windows after r86733

2010-11-26 Thread Brian Curtin
Brian Curtin added the comment: Here is a patch. os.path.samefile and hard links don't work for Windows the same way they do for Mac/Linux. In the case where we are on Windows and a link comes into the _samefile function, check that it's a link and then use os.path.sameopenfile. If it's not

[issue10543] Test discovery (unittest) does not work with jython

2010-11-26 Thread Michael Foord
New submission from Michael Foord : This is because jython creates bytecode files with names like "tests/testwith$py.class". unittest test discovery splits the extension off __file__ to compare module.__file__ to the expected path. -- messages: 122467 nosy: michael.foord priority: norm

[issue10543] Test discovery (unittest) does not work with jython

2010-11-26 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord components: +Library (Lib) type: -> behavior versions: +Python 2.7, Python 3.2 ___ Python tracker ___ _

[issue9509] argparse FileType raises ugly exception for missing file

2010-11-26 Thread SilentGhost
Changes by SilentGhost : Removed file: http://bugs.python.org/file19815/test_argparse.py.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue9509] argparse FileType raises ugly exception for missing file

2010-11-26 Thread SilentGhost
SilentGhost added the comment: On windows proposed changes to Lib/test/test_argparse.py cause it to enter an infinite loop in TempDirMixin.tearDown method. As it seemed exclusively Windows issue, this new patch replaces while loop with the ignore_errors parameter for shutil.rmtree. Now all t

[issue10543] Test discovery (unittest) does not work with jython

2010-11-26 Thread Michael Foord
Michael Foord added the comment: Won't need fixing in 3.2. The __pycache__ changes mean that the module.__file__ no longer points to the compiled bytecode file. -- versions: -Python 3.2 ___ Python tracker __

[issue10535] Enable warnings by default in unittest

2010-11-26 Thread Michael Foord
Michael Foord added the comment: "I'm also thinking that it might be better to include the name of the deprecated method in the message and use three filters for fail* methods, assert* methods, and the assert*Regexp* methods that will be deprecated." That sounds good, well - it sounds *essent

[issue10539] Regular expression not checking 'range' element on 1st char in string.

2010-11-26 Thread Eric Smith
Eric Smith added the comment: I'm not sure I understand. The output I get is: f42e6be1-29bf-4f3c-ba58-1ae1d9ca5f88 g42e6be1-29bf-4f3c-ba58-1ae1d9ca5f88 False The first string matches. The second string matches because the leading "g" is being matched by "\w". The third string does not match b

[issue5211] Fix complex type to avoid coercion in 2.7.

2010-11-26 Thread Blair
Blair added the comment: I see your point Mark, however it does not seem to be the right way to do this. Are you aware that Python has formally specified this behaviour somewhere? I could not find an explicit reference in the documentation. The problem that has been fixed is covered in the doc

[issue10539] Regular expression not checking 'range' element on 1st char in string.

2010-11-26 Thread Georg Brandl
Georg Brandl added the comment: I don't think so; closing as invalid. -- nosy: +georg.brandl resolution: -> invalid status: open -> closed ___ Python tracker ___ __

[issue10539] Regular expression not checking 'range' element on 1st char in string.

2010-11-26 Thread Jamie Murray
Jamie Murray added the comment: Apologies, sincere and most humble apolgies doh! On 26 Nov 2010 18:51, "Georg Brandl" wrote: > > Georg Brandl added the comment: > > I don't think so; closing as invalid. > > -- > nosy: +georg.brandl > resolution: -> invalid > status: open -> closed > >

[issue10544] yield expression inside generator expression does nothing

2010-11-26 Thread Inyeol Lee
New submission from Inyeol Lee : Simple coroutine with for loop works: >>> def pack_a(): while True: L = [] for i in range(2): L.append((yield)) print(L) >>> pa = pack_a() >>> next(pa) >>> pa.send(1) >>> pa.send(2) [1, 2] >>> If using

[issue10532] A bug related to matching the empty string

2010-11-26 Thread Ned Deily
Ned Deily added the comment: Closing this issue since it appears to not be a bug. -- nosy: +ned.deily resolution: -> invalid status: open -> closed ___ Python tracker ___ _

[issue10545] remove or rewrite "Using Backslash to Continue Statements" anti-idiom

2010-11-26 Thread rurpy the second
New submission from rurpy the second : The Python HOWTOs->Idioms and Anti-Idioms has a section "Using Backslash to Continue Statements". It says that line continuation is "dangerous" and gives two reasons. 1. Hard to see a space after the backslash. This is not "dangerous" as it cause an impos

[issue10537] OS X IDLE 2.7rc1 from 64-bit installer hangs when you paste something.

2010-11-26 Thread Ned Deily
Ned Deily added the comment: This appears to be another variant of the IDLE, OS X 10.6, 64-bit, Apple-supplied Tk 8.5 problems. As a workaround, you can re-install 2.7rc1 using the 32-bit-only installer; IDLE there does not exhibit these problems. -- assignee: -> ned.deily component

[issue10546] UTF-16-LE and UTF-16-BE support non-BMP characters

2010-11-26 Thread STINNER Victor
New submission from STINNER Victor : Python3 doc tells that UTF-16-LE and UTF-16-BE only support BMP characters. What? I think that it is wrong. It was maybe wrong with Python2 and narrow build (unichr() only supports BMP characters), but it is no more true in Python3. -- assignee: d.

[issue1178] IDLE - add "paste code" functionality

2010-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I would really like something like this -- for 3.2b1 next week. I am constantly running posted interactive code and the lack of this is a major nuisance. There seems to be a glitch in how the editor deals with '>>> ' when trying to delete it. However, as well

[issue1178] IDLE - add "paste code" functionality

2010-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: An alternative approach would be to leave pasting alone but add a 'Convert interactive code' option to the format menu, with keycode alt-v (not currently used as far as I can see). -- ___ Python tracker

[issue5150] IDLE to support reindent.py

2010-11-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: fixed -> stage: committed/rejected -> commit review versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker ___ __

[issue2504] Add gettext.pgettext() and variants support

2010-11-26 Thread Éric Araujo
Éric Araujo added the comment: New features don’t go into stable branches. The patch is also reviewable at http://codereview.appspot.com/3340041 -- ___ Python tracker ___ __

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: As a practical matter, I think that for at least the next decade, people are at least as likely to want to fill with a composed, multi-BMP-codepoint 'char' (grapheme) as with a non-BMP char. So to me, failure with the latter is no worse than failure with the

[issue10537] OS X IDLE 2.7rc1 from 64-bit installer hangs when you paste something.

2010-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is this a duplicate of other issues (close?)? Is this an Apple problem beyond our control (close?)? -- nosy: +terry.reedy ___ Python tracker __

[issue9312] Fix usage of :option: markup in stdlib ReST docs

2010-11-26 Thread Éric Araujo
Éric Araujo added the comment: Great, thanks! New markup committed as r86823, long lines rewrapped in r86824 (along with a few minor touch-ups). I think we’re good now, I’ll backport shortly. -- ___ Python tracker

[issue1059244] distutil bdist hardcodes the python location

2010-11-26 Thread Éric Araujo
Éric Araujo added the comment: Distutils2 bugs are tracked here (bugs.python.org), feel free to open a feature request for the Distutils2 component. -- ___ Python tracker ___

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 6:37 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > As a practical matter, I think that for at least the next decade, people are > at least as likely to > want to fill with a composed, multi-BMP-codepoint 'ch

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-26 Thread Eric Smith
Eric Smith added the comment: I think these macros would be a reasonable approach. I think str.center, etc. should support non-BMP chars, because to not do so can raise an exception. Supporting composed graphemes seems like another problem altogether. And while we could fix that, it's clearly

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Eric Smith
Eric Smith added the comment: In addition to the proposed Py_UNICODE_NEXT and Py_UNICODE_PUT_NEXT, str.__format__ would also need a function that tells it how many Py_UNICODEs are needed to store a given Py_UCS4. -- ___ Python tracker

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 7:27 PM, Eric Smith wrote: .. > > In addition to the proposed Py_UNICODE_NEXT and Py_UNICODE_PUT_NEXT, > > str.__format__ would also need a function that tells it how many Py_UNICODEs > are needed to store a given Py_UCS4. Yes, t

[issue9264] trace.py documentation is incomplete

2010-11-26 Thread Éric Araujo
Éric Araujo added the comment: > Divided command-line options logically into sub-sections and improved > their explanations Using the program/cmdoption combo may be a good idea here. -- nosy: +eric.araujo ___ Python tracker

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Eric Smith
Eric Smith added the comment: I'd need access to this without having to build a PyUnicodeObject, for efficiency. But it sounds like it does have the basic functionality I need. For my use I'd really need it to take the result of Py_UNICODE_NEXT. Something like: Py_ssize_t Py_UNICODE_NUM_NEEDE

[issue10299] Add index with links section for built-in functions

2010-11-26 Thread Éric Araujo
Éric Araujo added the comment: Possible groups: Types constructors: bool, bytearray, bytes, complex, dict, float, frozenset, int, list, memoryview, object, range, set, slice, str, tuple Mathematical functions: abs, bin, divmod, hex, oct, pow, round Working with sequences: all, any, enumerate

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 7:45 PM, Eric Smith wrote: .. > For my use I'd really need it to take the result of Py_UNICODE_NEXT. > Something like: > Py_ssize_t > Py_UNICODE_NUM_NEEDED(Py_UCS4 c) > and it would always return 1 or 2. Always 1 for a wide build,

[issue10541] regrtest.py -T broken

2010-11-26 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread STINNER Victor
STINNER Victor added the comment: I don't like macro having a result and using multiple instructions using the evil magic trick (the ","). It's harder to maintain the code and harder to debug than a classical function. Don't you think that modern compilers are able to inline the code? (If not

[issue10507] Check well-formedness of reST markup within "make patchcheck"

2010-11-26 Thread Éric Araujo
Éric Araujo added the comment: Have a look at Doc/tools/rstlint.py -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Eric Smith
Eric Smith added the comment: The code will basically be: Py_UCS4 fill; parse_format_string(fmt, ..., &fill, ...); /* lots more code */ if (fill_needed) { /* compute how many characters to reserve */ space_needed = Py_UNICODE_NUM_NEEDED(fill) * number_of

[issue5211] Fix complex type to avoid coercion in 2.7.

2010-11-26 Thread Blair
Blair added the comment: I'd like to add a few more observations to the mix. I have run the following in both 2.6.6 and in 2.7 class xfloat(float): def __new__(cls,x): return float.__new__(cls,x) def __radd__(self,lhs): print "__radd__ got: %s" % type(lhs) if i

[issue9200] str.isprintable() is always False for large code points

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch fixes isprintable and other ctype-like methods. I left isspace() out for now because I could not find a test character outside of BMP to test with, but I think we should fix that for completeness as well. At this point the goal is mostly

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 8:41 PM, STINNER Victor wrote: .. > I don't like macro having a result and using multiple instructions using the > evil > magic trick (the ","). It's harder to maintain the code and harder to debug > than > a classical function.

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Eric Smith
Eric Smith added the comment: The compiler's decision to inline something should not be related to its ability to put variables in a register. But I definitely agree that we should get the abstraction right first and worry about the implementation later. -- _

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 26, 2010 at 9:22 PM, Eric Smith wrote: .. > But I definitely agree that we should get the abstraction right first and > worry about > the implementation later. I am fairly happy with Py_UNICODE_NEXT() abstraction. It's semantics should be n

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Raymond, I wonder if you would like to comment on the iterator analogy and/or on adding public names to C API. -- nosy: +rhettinger ___ Python tracker

[issue8600] test_gdb failures

2010-11-26 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-11-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mark, can you opine on this? -- assignee: belopolsky -> lemburg ___ Python tracker ___ ___ Pytho

[issue10537] OS X IDLE 2.7rc1 from 64-bit installer hangs when you paste something.

2010-11-26 Thread Ronald Oussoren
Ronald Oussoren added the comment: On 27 Nov, 2010, at 0:42, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Is this a duplicate of other issues (close?)? I don't know yet. > Is this an Apple problem beyond our control (close?)? This might be fixable. There is a patch that

[issue10537] OS X IDLE 2.7rc1 from 64-bit installer hangs when you paste something.

2010-11-26 Thread Ned Deily
Ned Deily added the comment: Ronald, which patch are you thinking of? Issue6075? -- ___ Python tracker ___ ___ Python-bugs-list mail