[issue10827] Functions in time module should support year < 1900 when accept2dyear = 0

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: I tried time.asctime() on Windows 32 bits (compiled with Visual Studio) with accept2dyear=False: it accepts years in [-2^31; 2^31-1], cool. -- ___ Python tracker

[issue8844] Condition.wait() doesn't raise KeyboardInterrupt

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: The test fails on FreeBSD 6.2 (x86 FreeBSD py3k buildbot) since r87292 => #10720. I reopen the issue. -- nosy: +haypo resolution: fixed -> status: closed -> open ___ Python tracker

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2011-01-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed Matt's patch in r87835 (3.2), r87836 (3.1) and r87837 (2.7). Thank you for contributing! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 2.6 ___

[issue10858] Make source code links less prominent

2011-01-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jan 7, 2011 at 4:32 PM, Éric Araujo wrote: .. > 3: Not all modules are good examples (see threading for some unelegant code), > so I support ad-hoc selection. The problem with ad-hoc selection is that it adds maintenance burden (someone has to m

[issue10174] multiprocessing expects sys.stdout to have a fileno/close method.

2011-01-07 Thread Mher Movsisyan
Mher Movsisyan added the comment: The reported error is only reproducible in 2.6 Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> import multiprocessing >>> c

[issue8844] Condition.wait() doesn't raise KeyboardInterrupt

2011-01-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, since #10720 exists, while do you reopen this one? -- ___ Python tracker ___ ___ Python-bugs-l

[issue10174] multiprocessing expects sys.stdout to have a fileno/close method.

2011-01-07 Thread Mher Movsisyan
Mher Movsisyan added the comment: This bug was fixed in #5313 --- a/multiprocessing/process.py +++ b/multiprocessing/process.py @@ -225,7 +225,8 @@ class Process(object): self._children = set() self._counter = itertools.count(1) try: -os.cl

[issue10851] further extend ssl SNI and ciphers API

2011-01-07 Thread Daniel Black
Daniel Black added the comment: acknowledged. Makes sense. -- resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: > PyBytes_FromFormatV() has the same issue. Oh no, it's ok, the function works as expected. -- ___ Python tracker ___

[issue6284] C/API PyErr_AsUnicode()

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: + PyErr_Fetch(&error_type, &error_value, &error_traceback); + + PyErr_Clear(); I think that the call to PyErr_Clear() is useless, PyErr_Fetch() already cleared the exception. + /* clear the error */ + PyErr_Restore(error_type, e

[issue6284] C/API PyErr_AsUnicode()

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: /* Returns the exception string as a new PyUnicode object or NULL if the conversion failed */ NULL is not very useful to analyze the error :-/ Why don't keep errors if the conversion failed? The caller will be responsible to use the new error, or to clear

[issue1777412] datetime.strftime dislikes years before 1900

2011-01-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: After r87829 (see issue10827), the insane Y2K behavior of time module functions does not extend beyond year 999. Hopefully in Python 3.3, accept2dyear will be removed completely and datetime.strftime() will be able to support the full intersection of p

[issue6284] C/API PyErr_AsUnicode()

2011-01-07 Thread Andreas Stührk
Andreas Stührk added the comment: There should also be a call to `PyErr_NormalizeException()`, as `PyErr_Fetch()` can return unnormalized exceptions (see e.g. issue #10756). -- nosy: +Trundle ___ Python tracker __

[issue10854] Output DLL name in error message of ImportError when DLL is missing

2011-01-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: Closing this as "won't fix". Python is not going to reimplement depends.exe. -- nosy: +loewis resolution: -> wont fix status: open -> closed ___ Python tracker _

[issue10686] email.Generator should use unknown-8bit encoded words for headers with 8 bit data

2011-01-07 Thread R. David Murray
R. David Murray added the comment: Committed a revised version of the patch, including doc updates, in r87840. While I haven't documented the way to alter what encoding name is used for the unknown bytes, I did make it possible to do so (set charset.UNKNOWN8BIT to the desired string). -

[issue10812] Add some posix functions

2011-01-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: > According to the spec for gethostname(), the hostname that it returns > is null-terminated so it won't support embedded NUL bytes. Should we > still add it anyway? Oops, I misread the spec. No, gethostname should then not be duplicated. Putting sethostname i

[issue10812] Add some posix functions

2011-01-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: > According to the spec, gethostid does not set errno - it now checks anyway. Sorry, I misread that also. Leaving the check is fine; reverting it to the previous code would be fine as well. -- ___ Python tracker <

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-07 Thread Nadeem Vawda
Nadeem Vawda added the comment: Sorry, scratch that - I misunderstood the semantics of SocketIO.close(). I hadn't realized that the underlying socket is supposed to stay open until it itself is also explicitly closed (as well as all SocketIO objects referring to it). I've been able to get ri

[issue10834] Python 2.7 x86 IDLE fails to run in Windows 7

2011-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Changed title based on 'command line works fine'. You might try running test suite, 'python -m test.regrtest' from Command Window in python27 directory on both this and other system. (It takes about 20 min, so minimize and do something else.) test_tcl, text_t

[issue10860] Handle empty port after port delimiter in httplib

2011-01-07 Thread Shawn Ligocki
Shawn Ligocki added the comment: Here's a patch for 2.7 (from the hg checkout http://code.python.org/hg/branches/release2.7-maint/) How does it look? Apparently there was already a testcase for "www.python.org:" failing! -- keywords: +patch Added file: http://bugs.python.org/file2030

[issue10838] subprocess __all__ is incomplete

2011-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: My understanding is much like Toshio's: ambiguous (typically, undocumented or omitted from __all__) non-underscored names should be resolved, with the three possible outcomes listed, on a case-by-case basis. -- nosy: +terry.reedy

[issue1372770] email.Header should preserve original FWS

2011-01-07 Thread Nathan Herring
Nathan Herring added the comment: You are certainly correct about (some, perhaps many) e-mail generators using tabs when folding, which is AFAICT, much more likely an incorrect implementation of RFC 2822 rather than an intentional transformation of the user's specified Subject line. Some*, ho

[issue1777412] datetime.strftime dislikes years before 1900

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch removing the arbitrary datetime.strftime() limit on year: it adds an option "accept2dyear" to time.strftime() and datetime just sets this option to False. -- Added file: http://bugs.python.org/file20309/datetime_strftime_nolimit.diff

[issue10849] Backport test/__main__

2011-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: The possible downside, as with any new feature, is that code using the new feature will not run on on previous micro (x.y.z) releases. In this case, one can run the tests using the new feature. >>> from test import __main__ == CPython 3.2b2 (r32b2:87398, Dec

[issue1777412] datetime.strftime dislikes years before 1900

2011-01-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jan 7, 2011 at 7:26 PM, STINNER Victor wrote: .. > Here is a patch removing the arbitrary datetime.strftime() limit on year: it > adds an > option "accept2dyear" to time.strftime() and datetime just sets this option > to False. > The idea of ad

[issue10828] Cannot use nonascii utf8 in names of files imported from

2011-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: (Ingemar: one can easily test import statements without pyqt, let alone qt ;-) With 3.2b2 on our Win7, 64 bit machine, files with a Japanese name run but apparently cannot be imported. a.py: print('something') ^|.py: print('other') # ^| == imitation of kataka

[issue1372770] email.Header should preserve original FWS

2011-01-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue1777412] datetime.strftime dislikes years before 1900

2011-01-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: -- --Guido van Rossum (python.org/~guido) """ -- http://mail.python.org/pipermail/python-dev/2011-January/107246.html ^^^ the last lines of msg125738 cut by roundup ^^^ -- ___ Python tracker

[issue1777412] datetime.strftime dislikes years before 1900

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: strftime_1_.patch: replace 1900 <= year limit by 1 <= year or 1 <= year <= (if compiled with Visual Studio). With more tests on years. -- Added file: http://bugs.python.org/file20310/strftime_1_.patch _

[issue1777412] datetime.strftime dislikes years before 1900

2011-01-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I like strftime_1_.patch, but it really belongs to #10827. Please leave a note there once you commit and mention the issue in commit log. -- ___ Python tracker _

[issue1777412] datetime.strftime dislikes years before 1900

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: r87845+r87846 sets time.strftime() minimum year to 1 instead of 1900. If Python is compiled with Visual Studio, it sets also the maximum year to . -- ___ Python tracker ___

[issue10864] time.strftime("%Y"): limitation of 4 digits on OpenIndiana (Solaris)

2011-01-07 Thread STINNER Victor
New submission from STINNER Victor : The following example displays '2345' instead of '12345': import time t = (12345,) + (0,)*8 print(repr(time.strftime("%Y", t))) time.strftime() should raise a ValueError if the year is bigger than , as it is done with Visual Studio for year outside [1;

[issue10828] Cannot use nonascii utf8 in names of files imported from

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: > With 3.2b2 on our Win7, 64 bit machine, files with a Japanese name... What is your ANSI code page? If it is not a japanese code page, it is the issue #3080. On Windows, #8611 (and #9425) permit to use non-ASCII characters in the module path... but only cha

[issue2650] re.escape should not escape underscore

2011-01-07 Thread James Y Knight
James Y Knight added the comment: I just ran into the impl of escape after being surprised that '/' was being escaped, and then was completely amazed that it wasn't just implemented as a one-line re.subn. Come on, a loop for string replacement? This is *in* the freaking re module for pete's s

[issue10864] time.strftime("%Y"): limitation of 4 digits on OpenIndiana (Solaris)

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: Oh, it's more funny with negative numbers: -1 is formatted '000/'. Let's try r87850. I'm now waiting for the buildbot. -- ___ Python tracker _

[issue1777412] datetime.strftime dislikes years before 1900

2011-01-07 Thread STINNER Victor
STINNER Victor added the comment: > r87845+r87846 sets time.strftime() minimum year to 1 instead of 1900. > If Python is compiled with Visual Studio, it sets also the maximum > year to . r87848 removes all limits on the year field; r87850 (Issue #10864) limits year to [1; ] on Solaris

[issue10812] Add some posix functions

2011-01-07 Thread Ross Lagerwall
Ross Lagerwall added the comment: This patch takes out sethostname() and gethostname(). I'll open up a new issue to add sethostname() to the socket module. -- Added file: http://bugs.python.org/file20311/10812_v5.patch ___ Python tracker

[issue10850] inconsistent behavior concerning multiprocessing.manager.BaseManager._Server

2011-01-07 Thread Ned Deily
Changes by Ned Deily : -- nosy: +asksol, jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue10855] wave.Wave_read.close() doesn't release file

2011-01-07 Thread Ned Deily
Ned Deily added the comment: Thanks for the report and analysis. Would you care to submit a patch to fix it? -- nosy: +ned.deily stage: -> unit test needed ___ Python tracker

[issue10855] wave.Wave_read.close() doesn't release file

2011-01-07 Thread Ned Deily
Ned Deily added the comment: (Presumably this is also a problem for Python 3, as well). -- versions: +Python 3.2 ___ Python tracker ___ _

[issue10837] Issue catching KeyboardInterrupt while reading stdin

2011-01-07 Thread Ned Deily
Changes by Ned Deily : -- nosy: +brian.curtin, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue1475397] time.asctime_tz, time.strftime %z %C

2011-01-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> rejected stage: unit test needed -> committed/rejected status: open -> pending superseder: -> Add aware local time support to datetime module ___ Python tracker

[issue3080] Full unicode import system

2011-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: If I edit a file with IDLE, save it, and successfully run it (perhaps to test it), then when I edit a second file that imports the first, I expect the import to work. It does not always (see #10828). Import is part of the core definition of the language. Unic

[issue10828] Cannot use nonascii utf8 in names of files imported from

2011-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: ANSI code page? I have no idea how to find out and many would not even know what such a thing exists. It is an HP laptop sold in the US. I think bugs in core syntax should have high priority. I appreciate your work toward fixing it. -- versions: +P

[issue10828] Cannot use nonascii utf8 in names of files imported from

2011-01-07 Thread ingemar
ingemar added the comment: Terry: Thanks for the hint In a pure ascii path I created files very similar to yours with Swedish "ä" instead of your katakana character. I also got the same result. a.py: print ('something') ä.py: print ('other') c.py: # -*- coding: utf-8 -*- import a import ä I

[issue10859] Is GeneratorContextManager public?

2011-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: I'd like to leave the door open to some tweaks in the GCM implementation for 3.3, so making it officially private (by adding the leading underscore) sounds good to me. -- keywords: +easy ___ Python tracker

[issue10865] chroot-ing breaks encodings.idna

2011-01-07 Thread ulidtko
New submission from ulidtko : Consider the following test script: import os import urllib.request os.chroot("/tmp") urllib.request.urlopen("http://localhost";) When executed with enough privileges, the script terminates with the following traceback: Traceback (most recent call last): Fil

[issue10042] total_ordering stack overflow

2011-01-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the report and patch. Fixed. rSee 87853. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue10042] total_ordering stack overflow

2011-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg125757 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue10042] total_ordering stack overflow

2011-01-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the report and patch. Fixed. See r87853. -- ___ Python tracker ___ ___ Python-bugs-

<    1   2