[issue5953] Add to "whats new": range(n) != range(n)

2009-05-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please don't post html. For whatever reason, it displayed as hard-to-read marked-up html text when emailed (and my reader does usually display html messages properly). Perhaps the email mime-type was wrong even though it looks ok in Firefox. -- _

[issue5966] unnecessary hardlink

2009-05-08 Thread Senthil
Changes by Senthil : -- resolution: invalid -> wont fix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue5966] unnecessary hardlink

2009-05-08 Thread Senthil
Changes by Senthil : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue5966] unnecessary hardlink

2009-05-08 Thread Senthil
Changes by Senthil : -- resolution: -> invalid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue5966] unnecessary hardlink

2009-05-08 Thread Senthil
Senthil added the comment: python3.1 or python2.6 has always been a "hardlink" to the python in the same directory. You will see that $(LN) python$(VERSION)$(EXE) $(PYTHON) The one you find as 'softlink' for python2.5 is perhaps ubuntu way of doing it. Python installation from source for (Pyth

[issue2660] Py3k fails to parse a file with an iso-8859-1 string

2009-05-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r72491. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pytho

[issue5967] PyList_GetSlice does not indicate negative ranges dont work as in python.

2009-05-08 Thread Campbell Barton
Campbell Barton added the comment: added to setslice too, fixed spelling error. -- Added file: http://bugs.python.org/file13938/slice.diff ___ Python tracker ___

[issue5967] PyList_GetSlice does not indicate negative ranges dont work as in python.

2009-05-08 Thread Campbell Barton
Changes by Campbell Barton : Removed file: http://bugs.python.org/file13922/slice.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue5974] unicode decode error due to improperly entered text "Martin v. Löwis"

2009-05-08 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- keywords: +patch Added file: http://bugs.python.org/file13937/issue5974.patch ___ Python tracker ___ ___

[issue5975] csv unix file format ('\n' line terminator)

2009-05-08 Thread Jay Talbot
New submission from Jay Talbot : I was having issues importing a csv file generated by the csv.write class with the following: load data infile 'file.csv' replace into table en fields terminated by ',' enclosed by '"' lines terminated by '\r\n'; To help prevent this from happening again, I woul

[issue5954] PyFrame_GetLineNumber

2009-05-08 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Documented and committed as r72488. This should be forward-ported to 3.x also, but since we've already started the betas for 3.1, it should probably wait for 3.2. -- keywords: -needs review ___ Python tracker

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Even if that patch would fix this issue (and I'm pretty sure it does) I don't think it's a good idea handling all those errors (EBADF, ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED) in readwrite() function. Although those error codes unmistakably remark a di

[issue5974] unicode decode error due to improperly entered text "Martin v. Löwis"

2009-05-08 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar : $ python3.1 -Wi -tt -O /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/compileall.py -x badsyntax -x site-packages -x test /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/command/ Listing /Library/Frameworks/Python

[issue5959] PyCode_NewEmpty

2009-05-08 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Documented, tested, and committed to 2.7 as r72487. This should be forward-ported to 3.x also, but since we've already started the betas for 3.1, it should probably wait for 3.2. -- keywords: -needs review ___ Pyt

[issue3992] removed custom log from distutils

2009-05-08 Thread Antonio Cavallo
Antonio Cavallo added the comment: Actually I think the problem (see the attached file susebuild.log) is in the module time.so: during the build the python interpreter has not access to it (it is dynamically loaded) and it fails. If that works is because an already python is set in the system

[issue5973] re-usable generators / generator expressions should return iterables

2009-05-08 Thread Sven Rahmann
New submission from Sven Rahmann : The syntax of generator expressions suggests that they can be used similarly to lists (at least when iterated over). However, as was pointed out to me, the resulting generators are iterators and can be used only once. This is inconvenient in situations where som

[issue5972] Failing test_signal.py on Redhat 4.1.2-44

2009-05-08 Thread Denise Mauldin
New submission from Denise Mauldin : Building python 2.6.2 on red hat linux 4.1.2-44 fails test_signal.py cat /proc/version Linux version 2.6.18-128.1.6.el5 (mockbu...@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Wed Apr 1 09:10:25 EDT 2009 Failed when running ma

[issue5933] fix gcc -Wextra warnings (compare signed/unsigned)

2009-05-08 Thread Mark Dickinson
Mark Dickinson added the comment: Applied in r72479, r72481, r72482, r72483. As a side note, I'm not 100% convinced of the correctness of the resource_setrlimit code. If rlim_t is smaller than an unsigned long then input values might be wrapped to a smaller value (by the implicit long -> rl

[issue5971] logging.Handler.handlerError() may raise IOError in traceback.print_exception()

2009-05-08 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> vsajip nosy: +vsajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue5961] Missing labelside option for Tix option menu (fix included)

2009-05-08 Thread Cary R.
Changes by Cary R. : -- versions: +Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Josiah Carlson
Josiah Carlson added the comment: Here's an option that doesn't use .connected, which some people have expressed distaste for. def readwrite(obj, flags): try: if flags & select.POLLIN: obj.handle_read_event() if flags & select.POLLOUT: obj.handle_wri

[issue5971] logging.Handler.handlerError() may raise IOError in traceback.print_exception()

2009-05-08 Thread Ryan Leslie
New submission from Ryan Leslie : When using the logging package, if a StreamHandler is configured with stderr and stderr is redirected to a pipe which no longer has readers, then StreamHandler.emit() will result in an IOError for "Broken pipe". The exception will be handled in logging.Handler.ha

[issue5238] ssl makefile never closes socket

2009-05-08 Thread Constantine Sapuntzakis
Constantine Sapuntzakis added the comment: Here is the workaround I'm using until the code gets fixed: import ssl # Work around python bug #5328 def SSLSocket_makefile_fixed(self, mode='r', bufsize=-1): from socket import _fileobject self._makefile_refs += 1 return _fileobject(sel

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Mark Dickinson
Mark Dickinson added the comment: asyncore_fix_mac_2.patch fixes all test_failures for me, on both trunk and py3k. -- ___ Python tracker ___

[issue5238] ssl makefile never closes socket

2009-05-08 Thread Jonathan Hayward
Jonathan Hayward added the comment: Is there a workaround to close a TLS socket and its underlying socket? I was making something to use https for a simple operation, and it the browser acted as if the socket never closed. If I followed the close of the ssl socket by a close of the underlying s

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Josiah Carlson
Changes by Josiah Carlson : Removed file: http://bugs.python.org/file13918/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Josiah Carlson
Changes by Josiah Carlson : Removed file: http://bugs.python.org/file13915/asyncore_fix_mac.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Josiah Carlson
Josiah Carlson added the comment: Ok, so I was running "test_asyncore" and not "test_asynchat". The issue on OS X is that when a new socket is connecting, select.poll() shows the socket as being writable when it first connects, but using my variant, .connected is False while it's waiting for

[issue5953] Add to "whats new": range(n) != range(n)

2009-05-08 Thread Mitchell Model
Mitchell Model added the comment: Yes, that's why I was surprised. It's rare (isn't it?) to have str(a) == str(b) but a != b. a not is b, sure, but a != b? Note also that list(range(n)) == list(range(n)). If the lists are equal and the strings are equal it's hard to see why the objects would

[issue1483545] Wave.py support for ulaw and alaw audio

2009-05-08 Thread Eric Woudenberg
Eric Woudenberg added the comment: Patch applied to Python 2.5 wave.py -- Added file: http://bugs.python.org/file13932/wave25.py ___ Python tracker ___ ___

[issue1483545] Wave.py support for ulaw and alaw audio

2009-05-08 Thread Eric Woudenberg
Eric Woudenberg added the comment: Patch applied to Python 2.4 wave.py -- Added file: http://bugs.python.org/file13931/wave24.py ___ Python tracker ___ ___

[issue5809] "No such file or directory" with framework build under MacOS 10.4.11

2009-05-08 Thread Michael J. Fromberger
Michael J. Fromberger added the comment: Ned Deily writes: > --enable-framework and --enable-shared are mutually exclusive options. Aha, I did not realize that, though I suppose in retrospect it should have been obvious. Removing "--enable-shared" from my build configuration does enable me

[issue5968] Generator expression bug?

2009-05-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Questions and discussions like this should be directed to the python-list, mirrored on newsgroups comp.lang.python and gmane.comp.python.general (or possibly other forums). I will say this much but *only* this much here: 1. Generators are iterators; by definiti

[issue1542677] compile(): IDLE shell gives different len() of unicode strings compared to Python shell

2009-05-08 Thread Daniel Diniz
Changes by Daniel Diniz : -- dependencies: +built-in compile() should take encoding option. ___ Python tracker ___ ___ Python-bugs-l

[issue5911] built-in compile() should take encoding option.

2009-05-08 Thread Daniel Diniz
Changes by Daniel Diniz : -- components: +Interpreter Core, Unicode -None priority: -> normal stage: -> test needed versions: -Python 2.6 ___ Python tracker ___ ___

[issue5895] socketmodule.c on HPUX ia64 without _XOPEN_SOURCE_EXTENDED compiles incorrectly

2009-05-08 Thread Daniel Diniz
Daniel Diniz added the comment: Naoyuki, Is the API a mix of size_t and int? Does the attached patch help? If you could confirm that building with _XOPEN_SOURCE_EXTENDED doesn't need a change, the #ifdef should check for that too. -- components: +Build keywords: +patch nosy: +ajaksu2 p

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Mark Dickinson
Mark Dickinson added the comment: With Giampaolo's suggested change, all tests pass. My understanding of what asyncore/asynchat is intended to do and how it might be used in practice is weak, so I don't feel qualified to comment on the correctness of the change. > One of the issues with usi

[issue5953] Add to "whats new": range(n) != range(n)

2009-05-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Alternatively, range objects could have a .__eq__ method that compares the (hidden) start, stop, and step attributes used to print the representations. As a workaround, str(r1)==str(rs) will work as expected. -- nosy: +tjreedy

[issue5957] Possible mistake regarding writeback in documentation of shelve.open()

2009-05-08 Thread Mitchell Model
Mitchell Model added the comment: >http://bugs.python.org/file13925/issue5957.doc.patch I just spent some time attempting a rewrite, and while I liked what I ended up with it wasn't all that different from the patch. I'm happy with the patch. -- -- --- Mitchell -- title:

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Mark Dickinson
Mark Dickinson added the comment: With Josiah's patch, on trunk (r72475), test_asyncore passes, but test_asynchat is still hanging in the test: test_close_when_done (__main__.TestAsynchat_WithPoll) ... The hang occurs at the line "data = conn.recv(1)" in the run method of the echo_server clas

[issue5970] sys.exc_info leaks into a generator

2009-05-08 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: I think we should _not_ backport any fix for this bug to the 2.6 series, since any changes to user behavior would be pretty subtle. To prevent that backport, I'd like to apply exc_info_26.patch to the 2.6 branch, with Barry's approval. -- assignee: ->

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Josiah Carlson
Josiah Carlson added the comment: One of the issues with using the method that Giampaolo describes, which I explained to him, is that generally if someone sends you data, you want to receive it. You can get both data and the signal that someone disconnected, in particular, with asynchat's .c

[issue5970] sys.exc_info leaks into a generator

2009-05-08 Thread Jeffrey Yasskin
New submission from Jeffrey Yasskin : There's an obscure bug in sys.exc_info after a yield statement. def test(): def raising_generator(): try: raise IndexError("inner exception") except IndexError: yield 3 # Here, sys.exc_inf

[issue5968] Generator expression bug?

2009-05-08 Thread Sven Rahmann
Sven Rahmann added the comment: I complete agree that by x = (z for z in y) I create and assign a generator object to x. I'm afraid I disagree about "not a doc bug". The documentation for "for" reads: === for_stmt ::= "for" target_list "in" expression_list ":" suite ["else" ":"

[issue5442] test_importlib fails on Mac OSX 10.5.6 w/ case-sensitive file system

2009-05-08 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the quick reply, Ismail! I will look into the last failure this weekend, but off the top of my head I am not sure why that test would be failing since everything to do with that test should be a mock and thus not touching the file system. -- _

[issue5957] Possible mistake regarding writeback in documentation of shelve.open()

2009-05-08 Thread R. David Murray
R. David Murray added the comment: I remember being confused by that paragraph. Attached is a suggested doc fix. Do you think it makes it clear enough? (I'm not happy with the redundancy of saying mutation can't be detected twice in the same paragraph, but it seems better to be redundant than

[issue5918] test_parser crashes when run after some other tests

2009-05-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Great! The patch seems to fix it (although it's difficult to say for sure since the crashes were intermittent). I apologize for incriminating distutils. -- ___ Python tracker _

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Jean Brouwers
Jean Brouwers added the comment: Indeed, the unmodified test_asynchat.py now passes in Python 3.1b1. The readwrite function in asyncore looks like this now: def readwrite(obj, flags): try: if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL): obj.handle_close

[issue4066] smtplib SMTP_SSL._get_socket doesn't return a value

2009-05-08 Thread fanda.vacek
Changes by fanda.vacek : -- nosy: +fanda.vacek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1298813] sysmodule.c: realpath() is unsafe

2009-05-08 Thread Mihai Ibanescu
Mihai Ibanescu added the comment: Disclaimer: this bug is more than 3 years old, I don't remember all the details. Victor, solely reading the patch I see: +#ifdef HAVE_CANONICALIZE_FILE_NAME + free(argv0); +#endif /* HAVE_CANONICALIZE_FILE_NAME */ so argv0 (the string where the

[issue5965] Format Specs: doc 's' and implicit conversions

2009-05-08 Thread Eric Smith
Eric Smith added the comment: I'll look at it. The comma stuff needs to be added for 2.7 and 3.1, too. -- ___ Python tracker ___ ___ P

[issue5798] test_asynchat fails on Mac OSX

2009-05-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Has anyone already tried to modify readwrite() as I was suggesting here? http://bugs.python.org/issue1161031#msg84892 -- ___ Python tracker _

[issue5968] Generator expression bug?

2009-05-08 Thread R. David Murray
R. David Murray added the comment: This is not a bug. It's not even a doc bug, IMO. When you do num1 = [x for x in range(0, 6)] it is not that you are assigning a list comprehension to num1, what you are doing is running a list comprehension to create an actual list, which is what gets ass

[issue5969] setup build with Platform SDK, finding vcvarsall.bat

2009-05-08 Thread Marc Schoenefeld
New submission from Marc Schoenefeld : Hi, I have the M$ Platform SDK installed, which is a free (as don't pay) alternative to VisualStudio. in order to achieve a successful compile with setup.py build on the Platform SDK I had to add the following change in distutils/msvc9compiler.py:

[issue5958] Typo in documentation of shelve.sync

2009-05-08 Thread Mitchell Model
Mitchell Model added the comment: Sorry. Careless again. -- -- --- Mitchell -- Added file: http://bugs.python.org/file13924/unnamed ___ Python tracker ___ "multiline value" 2 -->"multiline value" With the patch: C:\Python30>python.exe c:\minidom_test.py

[issue5752] xml.dom.minidom does not handle newline characters in attribute values

2009-05-08 Thread Tomalak
Tomalak added the comment: Attaching a patch that fixes the problem. -- keywords: +patch Added file: http://bugs.python.org/file13919/minidom.patch ___ Python tracker ___ ___

[issue5963] Doc error: integer precision in formats

2009-05-08 Thread Eric Smith
Eric Smith added the comment: "integer presentation types" is still not exactly correct, because there are presentation types that work across value types. Specifically, 'n' works on integers and floats. Precision is allowed for floats, but not ints: >>> format(10.0, '.4n') '10' >>> format(10,

[issue5752] xml.dom.minidom does not handle newline characters in attribute values

2009-05-08 Thread Tomalak
Tomalak added the comment: Hmm... I thought toxml() is the part that needs to be fixed, not the parsing/reading. I mentioned the reading only to outline the data loss that occurs eventually. My point is: The toxml() (i.e. _write_data) *actually writes* the newline to the output. And within para

[issue5966] unnecessary hardlink

2009-05-08 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre : Hello! After installing py3k:72466 I found that python3 is hardlink to python3.1: $ ls -lai python* 34614 -rwxr-xr-x 2 root root 3625145 2009-05-08 11:10 python3 34614 -rwxr-xr-x 2 root root 3625145 2009-05-08 11:10 python3.1 38299 -rwxr-xr-x 1 root