[issue13298] Result type depends on order of operands for bytes and bytearray

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: > Note that .join() has a slightly different behaviour: > > >>> b"".join([bytearray(), b""]) > b'' > >>> bytearray().join([bytearray(), b""]) > bytearray(b'') > >>> b"".join([bytearray(), memoryview(b"")]) > Traceback (most recent call last): > File "", line

[issue13308] fix test_httpservers failures when run as root

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: > You should change "issue #" with the real issue number now that > there's an issue for this :) Done :-) -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ P

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: According to the man page, find -print0 and xargs -r are also GNU extensions. Even though they work on OpenBSD (do they?), they could still break on some platforms. As find -exec cmd {} ';' is already used for everything but __pycache__, I'd rather only chan

[issue13327] Update utime API to not require explicit None argument

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: +1 on making the second arg optional. -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bu

[issue13328] pdb shows code from wrong module

2011-11-03 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13298] Result type depends on order of operands for bytes and bytearray

2011-11-03 Thread Nick Coghlan
Nick Coghlan added the comment: We can just use this one - it was more in the nature of a question "is there anything we want to change about the status quo?" than a request for any specific change. I'm actually OK with buffer API based interoperability, but if we're going to offer that, we

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Remi Pointel
Remi Pointel added the comment: > According to the man page, find -print0 and xargs -r are also GNU extensions. > Even though they work on OpenBSD (do they?), they could still break on some > platforms. Yes, it works fine, but you're allright. > As find -exec cmd {} ';' is already used for e

[issue13308] fix test_httpservers failures when run as root

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: I mean that this should be enough to close this issue: - -find $(srcdir) -name '__pycache__' -exec rmdir {} '+' + -find $(srcdir) -name '__pycache__' -exec rmdir {} ';' That is, use ';' instead of the unportable '+' instead of changing all cleaning

[issue13308] fix test_httpservers failures when run as root

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: Whoops, posted the previous message to a totally wrong issue. Who was it thag introduced tabbed browsing? -- ___ Python tracker ___ __

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: I mean that this should be enough to close this issue: - -find $(srcdir) -name '__pycache__' -exec rmdir {} '+' + -find $(srcdir) -name '__pycache__' -exec rmdir {} ';' That is, use ';' instead of the unportable '+' instead of changing all cleaning

[issue13329] Runs normal as console script but falls as CGI

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: How are you running the CGI script? Are you sure that the PYTHONIOENCODING environment variable isn't set by the HTTP server? -- nosy: +petri.lehtinen ___ Python tracker

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Remi Pointel
Remi Pointel added the comment: Please see this: http://bugs.python.org/issue8665 http://hg.python.org/cpython/rev/5468f3aee4ae/ -- ___ Python tracker ___ _

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: Ah, I didn't think about that. How about using the -depth option then? It's in POSIX but does OpenBSD have it? The man page of GNU find says it has a -d option (that does the same as -depth) for compatibility with BSD. -- ___

[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2011-11-03 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- components: +Library (Lib) keywords: +needs review stage: -> patch review type: -> feature request versions: +Python 3.3 -Python 3.4 ___ Python tracker _

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Remi Pointel
Remi Pointel added the comment: > How about using the -depth option then? It's in POSIX but does OpenBSD have > it? The man page of GNU find says it has a -d option (that does the same as > -depth) for compatibility with BSD. Yes, we have this option: -depth This primary always evaluates to

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: By the way, removing *.pyc and *.pyo is useless: Python 3.3 only generates such files in __pycache__: + -find $(srcdir) -name '*.py[co]' -print0 | xargs -0r rm -f + -find $(srcdir) -name '__pycache__' -print0 | xargs -0r rmdir can be simplified to

[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file

2011-11-03 Thread Miguel Hernández Martos
Miguel Hernández Martos added the comment: I think it's a dup of http://bugs.python.org/issue9720 That issue has a patch that allows the generation of zip files with >2GB files. -- nosy: +enlavin ___ Python tracker

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: > + -find $(srcdir) -name '__pycache__' -print0 | xargs -0r rm -rf I'd still do it like this for portability's sake: + -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';' -- ___ Python tracker

[issue10570] curses.tigetstr() returns bytes, but curses.tparm() expects a string

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: It seems that putp() should also accept only bytes, because it's used to output terminal commands. It's currently expecting a str. -- resolution: fixed -> stage: patch review -> committed/rejected status: closed -> open __

[issue1469629] __dict__ = self in subclass of dict causes a memory leak?

2011-11-03 Thread Boris FELD
Changes by Boris FELD : -- nosy: +Boris.FELD ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue3067] setlocale error message is confusing

2011-11-03 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue13327] Update utime API to not require explicit None argument

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The `delta` keyword would actually be better than `places`, especially > on the slower buildbots. delta=10 would allow up to 10 seconds between > those utime calls. Is that being too permissive? I think it's ok. We don't have to test the system's utime implem

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'd still do it like this for portability's sake: > > + -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';' Then you'd probably reintroduce issue8665. -- ___ Python tracker

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: > Then you'd probably reintroduce issue8665. No, the -depth argument avoids that. -- ___ Python tracker ___ __

[issue13331] Packaging cannot install resource directory trees specified in setup.cfg

2011-11-03 Thread Vinay Sajip
New submission from Vinay Sajip : If setup.cfg contains a line such as [files] resources = mydata/** = {purelib} and the project contains a directory tree more than one level deep under mydata, e.g. mydata | +-mydata1 | | | +-data1.dat | +-mydata2 | +-data2.dat then t

[issue13332] execfile fixer produces code that does not close the file

2011-11-03 Thread Sven Marnach
New submission from Sven Marnach : The execfile fixer of the 2to3 script replaces the 2.x code execfile("a.py") by exec(compile(open("a.py").read(), "a.py", 'exec')) The new code does not explicitly close the file. This is not usually a problem in CPython, but 1. the code will thr

[issue13333] utf-7 inconsistent with surrogates

2011-11-03 Thread Antoine Pitrou
New submission from Antoine Pitrou : The utf-7 codec happily encodes lone surrogates, but it won't decode them: >>> "\ud801".encode("utf-7") b'+2AE-' >>> "\ud801\ud801".encode("utf-7") b'+2AHYAQ-' >>> "\ud801".encode("utf-7").decode("utf-7") Traceback (most recent call last): File "", line 1,

[issue13327] Update utime API to not require explicit None argument

2011-11-03 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: +1 to the optional parameter. -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > No, the -depth argument avoids that. Ah, you are right, my bad. -- ___ Python tracker ___ ___ Py

[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file

2011-11-03 Thread Nadeem Vawda
Nadeem Vawda added the comment: Marking as duplicate. -- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> zipfile writes incorrect local file header for large files in zip64 type: crash -> behavior __

[issue9720] zipfile writes incorrect local file header for large files in zip64

2011-11-03 Thread Nadeem Vawda
Nadeem Vawda added the comment: Issue 6434 was marked as a duplicate of this issue. -- nosy: +Paul, amaury.forgeotdarc, enlavin, lambacck, nadeem.vawda, segfault42 stage: -> needs patch versions: +Python 3.3 -Python 3.1 ___ Python tracker

[issue13333] utf-7 inconsistent with surrogates

2011-11-03 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13332] execfile fixer produces code that does not close the file

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: Sounds reasonable to me. Is it easy to generate unique identifier names in 2to3 fixers? -- nosy: +petri.lehtinen ___ Python tracker ___ __

[issue13332] execfile fixer produces code that does not close the file

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Be aware that execfile() is a simple function call and can be used in any expression. -- nosy: +benjamin.peterson, pitrou ___ Python tracker _

[issue13315] tarfile extract fails on OS X system python due to chown of gid=-1

2011-11-03 Thread Dave Flogeras
Dave Flogeras added the comment: Thank you sirs. I've already got a workaround for this situation, and personally don't care to waste my time with apple. I'm satisfied that Python is handling bugs seriously and it will hopefully get into an apple release in the future. -- status: o

[issue13334] Erroneous Size check in

2011-11-03 Thread david
New submission from david : The _PyString_Resize function in stringobject.c[0] takes in a PyObject ** and a Py_ssize_t newsize. Where Py_ssize_t is often a typedef for ssize_t(a signed version of size_t). As such the newsize parameter could be negative. The code checks for when the newsize is

[issue13335] Service application hang in python25.dll

2011-11-03 Thread Chandra Sekhar Reddy
New submission from Chandra Sekhar Reddy : Service application hanged in python25.dll, below are the environment details. Operating System : Windows server 2008 R2 (Virtual Machine) Application Type : Service Application We have got the process dump from the customer environment and after anal

[issue13334] Erroneous Size check in

2011-11-03 Thread david
Changes by david : -- components: +None versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue13334] Erroneous Size check in _PyString_Resize

2011-11-03 Thread david
Changes by david : -- title: Erroneous Size check in -> Erroneous Size check in _PyString_Resize ___ Python tracker ___ ___ Python-bug

[issue13334] Erroneous Size check in _PyString_Resize

2011-11-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Let's take an example: on a 32bit system, call _PyString_Resize(&s, 0x7ff8) Then PyStringObject_SIZE + newsize is something like -0x7ff8 (yes, it wraps around and is a negative number) But when cast to an unsigned size_t (because that's what Py

[issue13335] Service application hang in python25.dll

2011-11-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This information is far too incomplete, but as a first step, did you check the memory usage of the process? Is the computer constantly swapping memory to disk? -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue13332] execfile fixer produces code that does not close the file

2011-11-03 Thread Sven Marnach
Sven Marnach added the comment: @Petri: Yes, that's what the BaseFix.new_name() method is for. @Antoine: I thought about this, though I don't think it is very common to call execfile() as part of an expression. The whole statement containing the function call would need to be wrapped. --

[issue13334] Erroneous Size check in _PyString_Resize

2011-11-03 Thread david
david added the comment: Yes my bad :-) I got my C test case wrong. -- status: pending -> open ___ Python tracker ___ ___ Python-bugs

[issue13334] Erroneous Size check in _PyString_Resize

2011-11-03 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > When the remote end disconnects, handle_close is only called if recv > is called (from handle_read). Actually this isn't true; handle_close() is also called in send(): http://hg.python.org/cpython/file/eb2991f7cdc8/Lib/asyncore.py#l364 I'd say your patch

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Petri Lehtinen
Petri Lehtinen added the comment: The issue exists only in 3.2 and 3.3, as 2.7 doesn't have __pycache__ (PEP 3147). In 3.2 and 3.3, all *.py[co] files are in __pycache__ directories, so the pycremoval make target can only remove the __pycache__ directories, using the -depth option of find to

[issue13285] signal module ignores external signal changes

2011-11-03 Thread Vilya Harvey
Vilya Harvey added the comment: Petri: yes, that what I was suggesting. Charles-François: I'm certainly open to alternatives. Unless I've overlooked something though, the problem is that no workaround is possible at the moment. BTW this came up in the context of a customer script for the soft

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> deferred blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-03 Thread sbt
sbt added the comment: Wierdly, it looks like BlockingIO is not raised anywhere in the code for the C implementation of io. Even more wierdly, in the Python implementation of io, BlockingIOError is only ever raised by except clauses which have already caught BlockingIOError. So, of course,

[issue13307] bdist_rpm: INSTALLED_FILES does not use __pycache__

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: I wrote the same fix this night :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue13224] Change str(class) to return only the class name

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: > Please also see the proposed PEP 3155 I’ve seen it and like it. I assume you’re telling that we should consider str(cls/mod/func) to return the qname instead of the name? I think it could be good. My patch can wait for your PEP, or go in first and be updated

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-11-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset ea926dff958f by Éric Araujo in branch '3.2': More fixes for PEP 3147 compliance in distutils (#11254) http://hg.python.org/cpython/rev/ea926dff958f New changeset 60ede940089f by Éric Araujo in branch 'default': Merge follow-up for #11254 and other

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Wierdly, it looks like BlockingIO is not raised anywhere in the code > for the C implementation of io. That would explain why it isn't raised :) This is a hairy issue: read(n) is documented as returning either n bytes or nothing. But what if less than n byt

[issue13331] Packaging cannot install resource directory trees specified in setup.cfg

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: Should be easy to add a test to reproduce this. -- assignee: tarek -> eric.araujo keywords: +easy priority: high -> normal stage: -> needs patch type: -> behavior versions: +3rd party ___ Python tracker

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-11-03 Thread Éric Araujo
Changes by Éric Araujo : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue12120] test_packaging failure

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: I have improved packaging to be independent of -B/-O in http://hg.python.org/cpython/rev/dad02a080bbc. See commit message for rationale. -- assignee: tarek -> eric.araujo stage: -> committed/rejected versions: +3rd party __

[issue12119] test_distutils failure

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: I have changed packaging in dad02a080bbc to work even under -O or -B. packaging gives control over the creation of pyc and/or pyo files to the user with its own explicit options (--compile/--no-compile and --optimize 0/1/2), and the behavior should not change if

[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: Hello and thanks for the report. > We need build_ext before build_py. Otherwise, when 2to3 is called (in > build_py), > it will not find ext modules, Why is 2to3 interested in extension modules? 2to3 converts Python code, extension modules are written in C or C

[issue13316] build_py_2to3 does not convert when there was an error in the last run

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: > When I use build_py_2to3 and there is an error while converting a > file with 2to3, convert is skipped on the next run. I think build should stop with an error message if 2to3 fails. Do you agree? -- assignee: -> tarek components: +Distutils, Distutil

[issue13314] ImportError ImportError: Import by filename, should be deferred until sys.meta_path hooks are processed

2011-11-03 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: Attached is a new patch following the code review. After rewriting the asyncore test to check that the data has been successfully received by the client, the test fails when using poll() and a data size of 4096 bytes. The reason is that when TestHandler closes

[issue11805] package_data only allows one glob per-package

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: > As far as I've been able to tell there is no proposed syntax in the docs > specifically for > package_data. Right. I’ve only found an example in d2’s own setup.cfg: package_data = distutils2._backport = sysconfig.cfg distutils2.command = wininst*.exe

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I'd say your patch can be useful only in case the dispatcher subclass > doesn't send() neither recv() any data, in which case the connection > is supposed to remain open forever. There are some cases where it is important to detect that the remote end is disc

[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: > I’m not sure yet whether this is a bug or a new feature, but when python runs > from an > uninstalled build, I would like paths to refer to the source directory, not > the default > configure prefix. I need this fixed for packaging and it may affect venv too,

[issue5875] test_distutils failing on OpenSUSE 10.3, Py3k

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: Buildbot passes, certainly thanks to the fix for #13307. -- assignee: tarek -> eric.araujo resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue13333] utf-7 inconsistent with surrogates

2011-11-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: RFC 2152 talks about encoding 16-bit unicode, and clarifies Surrogate pairs (UTF-16) are converted by treating each half of the pair as a separate 16 bit quantity (i.e., no special treatment). So lone surrogates clearly should be supported. This text cou

[issue5875] test_distutils failing on OpenSUSE 10.3, Py3k

2011-11-03 Thread Éric Araujo
Éric Araujo added the comment: Hm, did I close this too hastily? The original report was not about the buildbot; does the buildbot run as a non-root user with the same version that was reported in the first message? If no, can someone try to reproduce the issue in the same conditions as the

[issue13332] execfile fixer produces code that does not close the file

2011-11-03 Thread Sven Marnach
Sven Marnach added the comment: Getting the general case right seems a bit too difficult. Examples like [execfile(n) for n in names if condition(n)] execfile(execfile(n1) or n2) try: 1 / 0 except execfile(n) or ZeroDivisionError: pass would require rather complex transformat

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: > The attached patch adds a call to recv in handle_read, updates the > documentation and adds a test case. In this kind of situation, it is perfectly legitimate for the client to perform a half-duplex close (shutdown(SHUT_WR)), since it does not inten

[issue5875] test_distutils failing on OpenSUSE 10.3, Py3k

2011-11-03 Thread Stefan Krah
Stefan Krah added the comment: The buildbot runs as non-root, so it should reproduce this issue (but it's green). The original report was for 2.6/3.1, so I think closing this as out-of-date is reasonable. -- ___ Python tracker

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: > The reason is that when TestHandler closes the connection after > writing the output buffer, the client receives a POLLHUP which > prevents it to receive the data since POLLHUP is triggering a call to > handle_close. Yes, that's the problem it not

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, josiahcarlson, stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13336] packaging.command.Command.copy_file doesn't implement preserve_mode and preserve_times

2011-11-03 Thread Vinay Sajip
New submission from Vinay Sajip : The packaging.command.Command.copy_file method does not honour the preserve_mode and preserve_times keyword arguments. Likewise, packaging.command.Command.copy_tree does not honour the preserve_mode, preserve_times and preserve_symlinks keyword arguments. ---

[issue12998] Memory leak with CTypes Structure

2011-11-03 Thread Stefan Krah
Changes by Stefan Krah : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Follow my comments about half_duplex_close.diff (current latest patch). +def handle_close(self): +if not self._closing: +self._closing = True +# try to drain the output buffer +while self.writable() and self.in

[issue13284] email.utils.formatdate function does not handle timezones correctly.

2011-11-03 Thread Vitja Makarov
Vitja Makarov added the comment: We have the same issue in Russia (MSK timezone). It seems to be related to recent changes in timezone info. It looks like time.timezone is calculated incorrectly. You can test that with attached script: $ TZ=Europe/Moscow python /tmp/test_tz.py -10800 -14400

[issue11805] package_data only allows one glob per-package

2011-11-03 Thread Erik Bray
Erik Bray added the comment: > When run from an uninstalled checkout, for example when developing, the > file will be found in the checkout. When run after being installed on > a Debian system, the file will be found in /usr/local/share > /spam/templates/log.txt. Each Python installation can

[issue13337] IGNORE_CASE doctest option flag

2011-11-03 Thread Gerald Dalley
New submission from Gerald Dalley : It would be helpful to have a doctest flag that makes the test case insensitive. Use case: nan values are printed as "nan" with typical Linux implementations, but as "NaN" on other operating systems like Solaris. In a naive implementation, the core change to

[issue13337] IGNORE_CASE doctest option flag

2011-11-03 Thread Gerald Dalley
Changes by Gerald Dalley : -- type: -> feature request ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-11-03 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch using the '.tmp' suffix. I also updated test_import. Note that the current test_import.test_execute_bit_not_copied is a no-op: """ fname = TESTFN + os.extsep + "py" create_empty_file(fname)

[issue10570] curses.tigetstr() returns bytes, but curses.tparm() expects a string

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: > It seems that putp() should also accept only bytes, > because it's used to output terminal commands. Ok, here is another fix for Python 3.2 and 3.3. I'm closing the issue again. -- resolution: -> fixed status: open -> closed ___

[issue10570] curses.tigetstr() returns bytes, but curses.tparm() expects a string

2011-11-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 38f4a251608f by Victor Stinner in branch '3.2': Issue #10570: curses.putp() is now expecting a byte string, instead of a http://hg.python.org/cpython/rev/38f4a251608f New changeset 08f44eb760a6 by Victor Stinner in branch 'default': (Merge 3.2) Iss

[issue13311] asyncore handle_read should call recv

2011-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: > In this kind of situation, it is perfectly legitimate for the client > to perform a half-duplex close (shutdown(SHUT_WR)), since it does > not intend to send data (which is implied by the fact that the sever > doesn't implement an handle_read() method). > Wit

[issue12342] characters with ord above 65535 fail to display in IDLE

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: Here is the patch as a .patch file. -- keywords: +patch Added file: http://bugs.python.org/file23607/tcl_unicode_range.patch ___ Python tracker ___

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: Did your commit fix the issue or not? -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue11812] transient socket failure to connect to 'localhost'

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: > Sure, if you have access to a machine on which you can > reliably reproduce the problem, it'll be much easier. I explain a reliable method to reproduce this issue on Linux (it may work on other OSes) in msg138882. -- ___

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: A patch similar to input_stdout_encoding.patch has been applied to 3.2 and 3.3 for the issue #6697: see changeset 846866aa0eb6. -- ___ Python tracker _

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I think the best would be to not handle POLLHUP events while POLLIN > is set, so that the handlers can have a chance to drain the input > socket buffer. Ok. > But it's a separate issue, could you create a new one? The test case fails if the data has not be

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: Follow my comments about half_duplex_close.diff (current latest patch). +def handle_close(self): +if not self._closing: +self._closing = True +# try to drain the output buffer +while self.writable() and self.initi

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2011-11-03 Thread Florent Xicluna
Florent Xicluna added the comment: I understand that the issue is because the C standard does not specify the length of the string returned by '%Y'. The changeset 230f0956aaa3 adds a test to verify that either '%Y' or '%4Y' returns a 4-digits value usable to produce ISO-8601 representations.

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: input_stdout_none_encoding.patch uses UTF-8 if sys.stdout.encoding is None. -- Added file: http://bugs.python.org/file23608/input_stdout_none_encoding.patch ___ Python tracker

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: > this is the handling of a half-duplex disconnection on the remote > side ? Actually this is not the handling of a half-duplex disconnection on the remote side, but we need a half-duplex disconnection to test it. -- __

[issue13316] build_py_2to3 does not convert when there was an error in the last run

2011-11-03 Thread simohe
simohe added the comment: It does stop with an error message. But when I reinvoke the command, converting is skipped (because the file is already copied). No error message is raised and the build continues with the remaining jobs (build_*). It should reexecute at least the failing conversion a

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2011-11-03 Thread STINNER Victor
STINNER Victor added the comment: Since the changeset 55a3b563f0dbed04af317f632f7f3c0f6abe175b, test_strptime is failing on "AMD64 Gentoo Wide 3.x" buildbot: == FAIL: test_strptime (test.test_time.TimeTestCase) ---

[issue13332] execfile fixer produces code that does not close the file

2011-11-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: Or you could just explicitly write out the exec(compile()) in your 2.x code. -- ___ Python tracker ___ _

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2011-11-03 Thread Florent Xicluna
Florent Xicluna added the comment: other test_time related errors are followed with issue 13309, issue 13312 and issue 13313 -- ___ Python tracker ___ _

[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2011-11-03 Thread simohe
simohe added the comment: fix_imports rewrites the import statements to local or global. When a python module loads a local extension module, this import statement should be converted to a local import (from . import extensionmodule). But when the extension module is not built yet, fix_import

[issue13314] ImportError ImportError: Import by filename, should be deferred until sys.meta_path hooks are processed

2011-11-03 Thread Brett Cannon
Brett Cannon added the comment: This is working as intended. Importers on sys.meta_path should be able to rely on the assumption that the names they are given are syntactically proper module names and not just any random string. You could perform a transform from module name to random string

[issue13323] urllib2 does not correctly handle multiple www-authenticate headers in an HTTP response

2011-11-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: Would you like to provide a patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue13314] ImportError ImportError: Import by filename, should be deferred until sys.meta_path hooks are processed

2011-11-03 Thread Rob Bairos
Rob Bairos added the comment: Why is a module name syntactically improper simply because it contains a slash? That seems an arbitrary definition, that serves no purpose, except to discourage accidentally specifying a filename. Module with unusual characters all reach the meta_path stage, eg:

  1   2   >