[issue11974] Class definition gotcha.. should this be documented somewhere?

2011-05-01 Thread Ezio Melotti
Ezio Melotti added the comment: A good place where to add it would be http://docs.python.org/tutorial/classes.html. It might even get a small "Differences between class and instance attribute" section. -- nosy: +ezio.melotti ___ Python tracker

[issue11887] unittest fails on comparing str with bytes if python has the -bb option

2011-05-01 Thread Ezio Melotti
Ezio Melotti added the comment: I thought some more about this and I'm -0.5. The reasons are: * the patch introduces code/complexity in _baseAssertEqual and other places, using catch_warnings to change and restore the warning filters at every call; * this is needed only when Python is run w

[issue11270] logging: RotatingFileHandler crash when opening the Logfile in an Texteditor

2011-05-01 Thread Vinay Sajip
Vinay Sajip added the comment: There have been no widespread reports of rotating file handlers being unusable under Windows. This is a Windows limitation that generally needs to be worked around, it's not limited to logging applications only. It's possible to copy a set of rotated files to an

[issue6501] Fatal error on startup with invalid PYTHONIOENCODING

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: > On a Western Windows, I suggest >PYTHONIOENCODING=cp1252:backslashreplace Why using this very small charset whereas a web server can use UTF-8? I don't think that using backslashreplace on stdout is a good idea. > But >PYTHONIOENCODING=mbcs > is al

[issue6501] Fatal error on startup with invalid PYTHONIOENCODING

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: > Fatal Python error: Py_Initialize: can't initialize sys standard streams > LookupError: unknown encoding: cp0 That's a bug in os.device_encoding(): os.device_encoding(sys.stdout.fileno()) should return None if the application has no console (if sys.stdout is

[issue11888] Add C99's log2() function to the math library

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: Oh... math.log() has an optional second argument: base. math.log(x, 2). But it is equivalent as math.log(x) / math.log(2) in Python. math.log(x, 2) is implemented as: num=math.log(x) den=math.log(2) return num / den where num and den are Python floats (6

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: I am not able to check the fix, but the buildbots are :-) What should be done for Python 2.7? In Python 2.7, zlib.crc32() stores the buffer length into an int (so the maximum length is INT_MAX), and so test_zlib doesn't test a (sparse) file of 4 GB (ChecksumB

[issue8808] imaplib should support SSL contexts

2011-05-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch. Comments: - the keyfile / certfile pair and the context parameter should be mutually exclusive (see e.g. the POP3_SSL constructor in Lib/poplib.py) - I don't think the remote test server used in test_imaplib supports client certificates,

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb464f8fb3a1 by Victor Stinner in branch '3.1': Issue #11277: mmap calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get around a http://hg.python.org/cpython/rev/cb464f8fb3a1 New changeset e9d298376dde by Victor Stinner in branch '3.2': (Merge 3.1) Issu

[issue10922] Unexpected exception when calling function_proxy.__class__.__call__(function_proxy)

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: > I think this is a duplicate of issue #9756 Yes it is and the issue is now fixed. The example now fails with the correct exception: Traceback (most recent call last): File " x.py", line 12, in p.__class__.__call__(p) TypeError: descriptor '__call__' r

[issue11927] SMTP_SSL doesn't use port 465 by default

2011-05-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Should we add a unit test for this as well? True, a simple test could be added to test_smtpnet. -- ___ Python tracker ___ __

[issue11859] test_interrupted_write_text() of test_io failed of Python 3.3 on FreeBSD 7.2

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: The issue is race condition and was rare (I only saw it once on FreeBSD 7.2 3.x buildbot). I suppose that it is fixed, I'm unable to check (I am unable to reproduce the bug in my FreeBSD 8 VM). Reopen the issue if it is not fixed yet. -- dependencies:

[issue11977] Document int.conjugate, .denominator, ...

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc65d1b99dff by Benjamin Peterson in branch '3.1': note abcs of int and float (closes #11977) http://hg.python.org/cpython/rev/dc65d1b99dff New changeset 5b315145e525 by Benjamin Peterson in branch '2.7': note abcs of int and float (closes #11977)

[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-05-01 Thread Éric Araujo
Éric Araujo added the comment: is not commited yet, > and we have now a duplicate issue (and 3 patches for a single bug) :-) Feel free to close duplicate issues. Looks like you’re not following PyCon reports, or Tarek’s mails to python-dev. distutils2 has been ported to 3.3 under the name “pac

[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-05-01 Thread Éric Araujo
Éric Araujo added the comment: > Apparently setuptools.command.easy_install.get_script_header() imports > distutils.command.build_scripts.first_line_re and checks if this regex > matches a str object, which results in TypeError. If breaking > compatibility is not acceptable, then the surrogatees

[issue11361] suggestion for os.kill(pid,CTRL_C_EVENT) in tests

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: Oh, if the process is able to handle CTRL+c on Windows, it means that faulthandler.register() could be used on Windows. While developing the faulthandler module, I tried all signals but I was only able to handle SIGSEGV, SIGABRT, SIGBUS and SIGILL on Windows.

[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: Hey, I had already this bug and I also wrote a patch: copy_script-2.patch attached to #6011. It is very similar to build_scripts-binary_mode.patch (read the file in binary mode to avoid the encode/decode dance). But it checks also that the path to Python prog

[issue11930] Remove time.accept2dyear

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: Le mardi 26 avril 2011 à 22:20 +, Alexander Belopolsky a écrit : > Alexander Belopolsky added the comment: > > On Tue, Apr 26, 2011 at 6:09 PM, STINNER Victor > wrote: > .. > > > > timemodule.c: > > > > PyDoc_STRVAR(module_doc, > > "... > > The tuple ite

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: > Ok, I'm sure that I have hardware issues, but I am also sure that the > patch introduces random crashes, especially in > test_descr.test_wrapper_segfault(). Forget my last messages: my Ubuntu box has serious memory issues. memtest86+ found 41 errors. -- I

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0db11682ea45 by Victor Stinner in branch '3.1': Issue #9756: credit the author, Andreas Stührk (Trundle) http://hg.python.org/cpython/rev/0db11682ea45 New changeset a17f5c787cc0 by Victor Stinner in branch '3.2': (Merge 3.1) Issue #9756: credit the

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 109687cc2c1e by Victor Stinner in branch '2.7': (Merge 3.1) Issue #9756: When calling a method descriptor or a slot wrapper http://hg.python.org/cpython/rev/109687cc2c1e -- ___ Python tracker

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset c5e6f997730e by Victor Stinner in branch '3.1': Issue #9756: When calling a method descriptor or a slot wrapper descriptor, the http://hg.python.org/cpython/rev/c5e6f997730e New changeset 4fc04f6a0731 by Victor Stinner in branch '3.2': (Merge 3.1)

[issue11974] Class definition gotcha.. should this be documented somewhere?

2011-05-01 Thread Georg Brandl
Georg Brandl added the comment: Reclassifying as documentation issue. I was certain we had something about this in the tutorial, but couldn't find it with a quick look. It is in the FAQ ("how do I create static class data"), but that's not an obvious place to look. -- assignee: ->

[issue11976] Provide proper documentation for list data type

2011-05-01 Thread Georg Brandl
Georg Brandl added the comment: I'd go as far and say it is a duplicate. :) -- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> Fix intersphinx-ing of built-in types (list, int, ...) ___ Python tracker

[issue11977] Document int.conjugate, .denominator, ...

2011-05-01 Thread Jonas H.
New submission from Jonas H. : Various `int` attributes and methods seem undocumented (at least it does not work to intersphinx them): * .conjugate * .denominator * .imag * .numerator * .real -- assignee: docs@python components: Documentation messages: 134926 nosy: docs@python, jonash

[issue11682] PEP 380 reference implementation for 3.3

2011-05-01 Thread Renaud Blanch
Renaud Blanch added the comment: As nick said, the repo only host a patch queue. the patch itself is visible here: https://bitbucket.org/rndblnch/cpython-pep380/qseries?apply=t&qs_apply=pep380 Or it can be download here in raw text: https://bitbucket.org/rndblnch/cpython-pep380/raw/tip/pep380

[issue11976] Provide proper documentation for list data type

2011-05-01 Thread Jonas H.
New submission from Jonas H. : Provide a proper `list` method reference (like the one for `dict`, http://docs.python.org/library/stdtypes.html#dict). Right now, documentation about lists is spread over multiple topics (.rst files) and methods are documented in footnotes. Also, intersphinx-ing

[issue11975] Fix intersphinx-ing of built-in types (list, int, ...)

2011-05-01 Thread Jonas H.
New submission from Jonas H. : Intersphinx-ing of int, list, float, ... should work with ":class:`int`" (list, float, ...). Also, intersphinx-ing list methods, e.g. ":meth:`list.insert`", should work. -- assignee: docs@python components: Documentation messages: 134923 nosy: docs@python

[issue11962] FreeBSD-AMD64 bot sporadic hanging

2011-05-01 Thread Ned Deily
Ned Deily added the comment: That might be another instance of this: http://thread.gmane.org/gmane.comp.python.devel/123698 You might want to bring this up on python-dev. -- nosy: +ned.deily ___ Python tracker

[issue11965] Simplify context manager in os.popen

2011-05-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Have you seen the comment on top of it? It says "Helper for popen() -- a proxy for a file whose close waits for the process". -- nosy: +pitrou ___ Python tracker

[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2011-05-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch. Some preliminary comments: - the OpenSSL functions you are using (SSL_get_srp_username etc.) don't seem documented on openssl.org; this makes it harder to do a proper review - no need to fill Misc/ACKS and Misc/NEWS by yourself, we can ta

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2011-05-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ned.deily, ronaldoussoren stage: -> patch review versions: -Python 2.5, Python 2.6, Python 3.4 ___ Python tracker ___

[issue11974] Class definition gotcha.. should this be documented somewhere?

2011-05-01 Thread Cal Leeming
New submission from Cal Leeming : So, when you create a class like this: class Obj: children = [] The 'children' object essentially becomes shared across all instances of Obj. To get around this, you have to use: class Obj: children = None def __init__(self): children = []

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2011-05-01 Thread David Naylor
New submission from David Naylor : kevent does not accept all legitimate parameters, such as KQ_NOTE_EXIT. For example: >> from select import * >> kevent(0, KQ_FILTER_PROC, KQ_EV_ADD | KQ_EV_ENABLE, KQ_NOTE_EXIT) OverflowError: signed integer is greater than maximum While the following C code

[issue11967] Left shift and Right shift for floats

2011-05-01 Thread Mark Dickinson
Mark Dickinson added the comment: > The only way to do that now is t=frexp(x) and y=ldexp(t[0],t[1]+2). What's wrong with the more direct ldexp(x, 2)? N.B. There *are* edge cases where Martin's suggested alternative won't work. E.g., to compute 1e-300 * 2**1500: >>> ldexp(1e-300, 1500) 3.5

[issue11967] Left shift and Right shift for floats

2011-05-01 Thread Mark Dickinson
Mark Dickinson added the comment: Would you want x >> 2 to be equivalent to x / 4.0 or x // 4.0? -- ___ Python tracker ___ ___ Python

[issue11971] Wrong parameter -O0 instead of -OO in manpage

2011-05-01 Thread R. David Murray
R. David Murray added the comment: Thanks for catching that, and for the patch. -- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker

[issue11971] Wrong parameter -O0 instead of -OO in manpage

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset d70b0137902b by R David Murray in branch '2.7': #11971: fix man page; it's -OO not -O0 http://hg.python.org/cpython/rev/d70b0137902b New changeset c57fdce01eb8 by R David Murray in branch '3.1': #11971: fix man page; it's -OO not -O0 http://hg.pyth

[issue11972] input does not strip a trailing newline correctly on Windows

2011-05-01 Thread Brian Curtin
Brian Curtin added the comment: Duplicate of #11642, #11272, and #11278. This is fixed. It'll be released in 3.2.1 -- nosy: +brian.curtin resolution: -> duplicate stage: -> committed/rejected ___ Python tracker

[issue11972] input does not strip a trailing newline correctly on Windows

2011-05-01 Thread Andreas Stührk
Andreas Stührk added the comment: See issue #11272. -- nosy: +Trundle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue11972] input does not strip a trailing newline correctly on Windows

2011-05-01 Thread Michal Molhanec
New submission from Michal Molhanec : input() returns string including trailing '\r'. IMHO the problem is not directly in the input() function which just expects that the input string was read in text mode so all of the platform specific newlines were normalized into single '\n'. -- c

[issue11959] smtpd cannot be used without affecting global state

2011-05-01 Thread Vinay Sajip
Vinay Sajip added the comment: I've made a patch. See https://bitbucket.org/vinay.sajip/cpython-smtpd/compare/default..mirror/cpython -- ___ Python tracker ___

[issue11971] Wrong parameter -O0 instead of -OO in manpage

2011-05-01 Thread Lars Michelsen
New submission from Lars Michelsen : Hello Devs, digging around in the python manpage and playing with the parameters I found a wrong parameter specification in the python manpage. The -OO parameter for discarding docstrings is written as -O0 (the 2nd is a zero). A patch is attached. Regards

[issue11970] distutils command 'upload' crashes when --show-response is selected

2011-05-01 Thread Chris Rose
New submission from Chris Rose : When running distutils like so: .tox/py27/bin/python setup.py -v bdist_egg upload --show-response Eventually, after everything else spools by, this pops up: Using PyPI login from /Users/offline/.pypirc Submitting dist/PyHamcrest-1.5-py2.7.egg to http://pypi.p

[issue11969] Can't launch Process on built-in static method

2011-05-01 Thread Ram Rachum
New submission from Ram Rachum : Hello, I found this bit in my inbox, I forgot why I cared about it, but it raises an exception (at least on Windows): >>> import multiprocessing >>> p = multiprocessing.Process(target=bytes.maketrans, args=(b'abc', b'xyz')) >>> p.start() Traceback (most recent

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: Le dimanche 01 mai 2011 à 03:19 +, STINNER Victor a écrit : > The test suite crashs randomly with issue9756.patch on my Ubuntu 11.04 > (AMD64 with 4 cores, 4 GB of memory, Linux 2.6.38). I use "./python > -bb Lib/test/regrtest.py -r" to reproduce the crash.

[issue11270] logging: RotatingFileHandler crash when opening the Logfile in an Texteditor

2011-05-01 Thread Alexander Vrchoticky
Alexander Vrchoticky added the comment: I hit that problem too (Python 2.6.5). We have a Windows service application (daemon, in Unix parlance). This is written in Python and uses RotatingFileHandler to rotate files when they exceed 1MB. We look at the files for debugging. For a live view of

[issue11967] Left shift and Right shift for floats

2011-05-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: "The only way ..." That's not true. y=x*(1< ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bug

[issue11912] PaX triggers a segfault in dlopen

2011-05-01 Thread Charles-François Natali
Charles-François Natali added the comment: > Is there any reason not to close this as a CPython issue? No, it's definitely not a CPython issue. I'm closing as invalid. -- resolution: -> invalid status: open -> closed title: Python shouldn't use the mprotect() system call -> PaX trigg

[issue11967] Left shift and Right shift for floats

2011-05-01 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue11873] test_regexp() of test_compileall failure on "x86 OpenIndiana 3.x"

2011-05-01 Thread Stefan Krah
Stefan Krah added the comment: R. David Murray wrote: > The failing test is launching a subprocess to compile python code, waiting > for the subprocess to exit, and then checking to see if the file was > created. So the timing issue would appear to be that the file created by > the subprocess

[issue11967] Left shift and Right shift for floats

2011-05-01 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o