[issue7436] Define 'object with assignable attributes'

2010-12-26 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue9196] Improve docs for string interpolation "%s" re Unicode strings

2010-12-26 Thread Craig McQueen
Craig McQueen added the comment: I should be able to attach my test code. But it is at my work, and I'm on holidays for 2 more weeks. Sorry 'bout that! I do assume that Python 3 greatly simplifies this. -- ___ Python tracker

[issue10769] ast: provide more useful range information

2010-12-26 Thread Sven Brauch
Sven Brauch added the comment: Hi, yeah Terry, that's exactly what most people whom I talked about this said (me too). Anyway, here's the patch which -- in my opinion -- fixes this behavior: --- python-orig/Python/ast.c 2010-10-19 03:22:07.0 +0200 +++ python-ast-fix/Python/ast.c 2010

[issue10576] Add a progress callback to gcmodule

2010-12-26 Thread Lukas Lueg
Lukas Lueg added the comment: Collection may re-occur at any time, there is no promise to the callback code. However, the callback can disable the gc, preventing further collection. I don't think we need the other callbacks to be informed. As the callbacks are worked down in the order they re

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

2010-12-26 Thread Felix Schwarz
Changes by Felix Schwarz : -- nosy: +Felix Schwarz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue10773] "Building C and C++ Extensions on Windows" documentation shows 2.x way of initializing module

2010-12-26 Thread Thorsten Behrens
New submission from Thorsten Behrens : The documentation titled "Building C and C++ Extensions on Windows" at http://docs.python.org/py3k/extending/windows.html shows a Python 2.x way of handling static type object initializers, to whit: >> If your module creates a new type, you may have troub

[issue6720] multiprocessing logging

2010-12-26 Thread Éric Araujo
Éric Araujo added the comment: This is either out of date (2.5 doesn’t get bugfixes any more) or invalid (concerns a backport of multiprocessing outside of the stdlib). -- nosy: +eric.araujo resolution: -> rejected stage: -> committed/rejected status: open -> closed type: crash -> be

[issue10774] test_logging leaks temp files

2010-12-26 Thread Éric Araujo
New submission from Éric Araujo : After a test_logging run in 3.2, I get stray files in $TMP. I think some test is not using the right mixin or addCleanup or tearDown. Less importantly, some recently added docstrings produce unwanted output on the console (the method name is clear enough, the

[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-26 Thread Éric Araujo
Éric Araujo added the comment: Looks good to me. I’d just move the raising function into the test method (no need to update the patch). -- nosy: +eric.araujo stage: -> patch review ___ Python tracker __

[issue10770] zipinfo - fix of a typo in the doc

2010-12-26 Thread Éric Araujo
Éric Araujo added the comment: Fixed, thanks. Note that Georg and I follow the docs mailing list, so there is no need to open a report for each message. -- nosy: +eric.araujo resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed __

[issue10774] test_logging leaves temp files

2010-12-26 Thread Georg Brandl
Changes by Georg Brandl : -- title: test_logging leaks temp files -> test_logging leaves temp files ___ Python tracker ___ ___ Python-

[issue5258] addpackage in site.py fails hard on badly formed .pth files

2010-12-26 Thread R. David Murray
R. David Murray added the comment: Here is a revised patch with tests. -- Added file: http://bugs.python.org/file20169/site_pth_exceptions.diff ___ Python tracker ___ ___

[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2010-12-26 Thread Georg Brandl
Georg Brandl added the comment: +1. -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue5258] addpackage in site.py fails hard on badly formed .pth files

2010-12-26 Thread Georg Brandl
Georg Brandl added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue10775] assertRaises as a context manager should accept a 'msg' keyword argument.

2010-12-26 Thread R. David Murray
New submission from R. David Murray : assertRaises used as a method can't take a msg keyword argument because all args and keywords are passed to the callable. But in context manager form it could, and this can be useful. See, for example, issue 3583. -- keywords: easy messages: 1246

[issue3583] test_urllibnet.test_bad_address() fails when using OpenDNS

2010-12-26 Thread R. David Murray
R. David Murray added the comment: I think the best we can do here is add a message explaining that the error may be due to a broken DNS server (one with a wildcard dns record for all non-existent top level domains). However, assertRaises, even in context manager form, doesn't take a msg arg

[issue6027] test_xmlrpc_net fails when the ISP returns "302 Found"

2010-12-26 Thread R. David Murray
R. David Murray added the comment: IMO there's no way to fix this. I suggest closing it as invalid, since the problem is a buggy ISP DNS server, and the problem only occurs when time.xmlrpc.com is down. The canonical fix to problems like this is to remove dependency on the external service,

[issue7198] Extraneous newlines with csv.writer on Windows

2010-12-26 Thread John Machin
John Machin added the comment: Skip, I'm WRITING, not reading.. Please read the 3.1 documentation for csv.writer. It does NOT mention newline='', and neither does the example. Please fix. Other problems with the examples: (1) They encourage a bad habit (open inside the call to reader/writer)

[issue10769] ast: provide more useful range information

2010-12-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: I suggest you mail python-dev or python-ideas. I find it more consistent as it stands now. -- ___ Python tracker ___ __

[issue10769] ast: provide more useful range information

2010-12-26 Thread Sven Brauch
Sven Brauch added the comment: Okay, thank you, I'm going to do that. :) Bye, Sven -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue5258] addpackage in site.py fails hard on badly formed .pth files

2010-12-26 Thread R. David Murray
R. David Murray added the comment: Committed to py3k in r87497, 3.1 in r87499, and 2.7 in r87500. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue7198] Extraneous newlines with csv.writer on Windows

2010-12-26 Thread R. David Murray
R. David Murray added the comment: OK, I'm reopening this as a doc issue, since currently the Python3 writer docs do not mention newline='', and it is indeed required on Windows. John, would you care to suggest a doc patch? I agree with Skip that "where it makes a difference" is more precise

[issue10296] ctypes catches BreakPoint error on windows 32

2010-12-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: With a release build of python, I have a similar behavior on both 2.5 and 2.7; the messages are different though: 2.5: WindowsError: [Error -2147483645] One or more arguments are invalid. 2.7: WindowsError: exception: breakpoint encountered And with both

[issue10776] os.utime returns an error on NTFS-3G partition

2010-12-26 Thread Aaron Masover
New submission from Aaron Masover : I'm working with Anki (http://ankisrs.net/) on a linux NTFS-3G partition. Anki requires access to modification times in order to handle its backup files. This works fine on my ext3 partition, but on an NTFS partition accessed with NTFS-3G an error is returne

[issue9709] test_distutils warning: initfunc exported twice on Windows

2010-12-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: Thorsten: my recommendation is to ignore this issue in your software. It's just a warning. -- ___ Python tracker ___ _

[issue10757] zipfile.write, arcname should be bytestring

2010-12-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: > So, in reverse of issue 4871, it appears that in this case the API should > reject bytes input with an appropriate error message. -1. It is quite common to produce ill-formed zipfiles, and other ziptools are interpreting them in violation of the format spec

[issue10776] os.utime returns an error on NTFS-3G partition

2010-12-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: Why do you think this is a bug in Python? -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-

[issue10777] xml.etree.register_namespace dictionary changed size during iteration

2010-12-26 Thread Peter
New submission from Peter : The following was found testing the Biopython unit tests (latest code from git) against Python 3.2 beta 2 (compiled from source on 64 bit Linux Ubuntu). Reduced test case: $ python3.2 Python 3.2b2 (r32b2:87398, Dec 26 2010, 19:01:30) [GCC 4.4.3] on linux2 Type "hel

[issue10776] os.utime returns an error on NTFS-3G partition

2010-12-26 Thread Aaron Masover
Aaron Masover added the comment: The Anki author suggested that it was a python bug. However, that example command works on a drive set with different permissions, so this looks more like an NTFS-3G bug. -- status: open -> closed ___ Python tracker

[issue10757] zipfile.write, arcname should be allowed to be a byte string

2010-12-26 Thread R. David Murray
R. David Murray added the comment: Well, this is the same treat-strings-and-byte-strings-equivalently-in-the-same-API problem that we've had elsewhere. It'll require a bit of refactoring to make it work. On read zipfile decodes filenames using cp437 if the utf-8 flag isn't set. Logically,

[issue10764] sysconfig and alternative implementations

2010-12-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: PyPy has exactly the same issue. PyPy's workaround is to have a custom version of sysconfig.py, but this is really a hack. If these config_vars are really determined at compile time, IMO they should be built in the interpreter (in a _sysconfig module?).

[issue9738] Document the encoding of functions bytes arguments of the C API

2010-12-26 Thread STINNER Victor
STINNER Victor added the comment: r87504 documents encodings of error functions. r87505 documents encodings of unicode functions. r87506 documents encodings of AST, compiler, parser and PyRun functions. -- ___ Python tracker

[issue10778] decoding_fgets() (tokenizer.c) decodes the filename from the wrong encoding

2010-12-26 Thread STINNER Victor
New submission from STINNER Victor : decoding_fgets() decodes the input filename from UTF-8 whereas the filename is encoded to the filesystem encoding. PyUnicode_DecodeFSDefault() should be used. decoding_fgets() raises a SyntaxError("Non-UTF-8 code starting with '\xHH' in file xxx on line xxx

[issue10779] Change filename encoding to FS encoding in PyErr_WarnExplicit()

2010-12-26 Thread STINNER Victor
New submission from STINNER Victor : PyErr_WarnExplicit() expects a filename encoded to UTF-8. This function is only called twice in the Python interpreter: compiler_assert() (with "assertion is always true, perhaps remove parentheses?") and symtable_warn() (eg. with "name 'xxx' is assigned to

[issue10778] decoding_fgets() (tokenizer.c) decodes the filename from the wrong encoding

2010-12-26 Thread STINNER Victor
STINNER Victor added the comment: See also issue #10779 (Change filename encoding to FS encoding in PyErr_WarnExplicit()). -- ___ Python tracker ___ ___

[issue9738] Document the encoding of functions bytes arguments of the C API

2010-12-26 Thread STINNER Victor
STINNER Victor added the comment: While documenting encodings, I found two issues: #10778 and #10779. -- ___ Python tracker ___ ___ Py

[issue10780] Fix filename encoding in PyErr_SetFromWindowsErrWithFilename() (and PyErr_SetExcFromWindowsErrWithFilename())

2010-12-26 Thread STINNER Victor
New submission from STINNER Victor : PyErr_SetFromWindowsErrWithFilename() expects a filename encoded to UTF-8. It is called by win32_error() function of the nt (posix) module, and win32_error() is called on an error in the bytes implementation of a function (if the argument is a byte string,

[issue10576] Add a progress callback to gcmodule

2010-12-26 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: 1) what I mean is that if a callback rejects GC, the GC algorithm may find its condition for invoking GC in the first place to be still valid immediately afterwards, so doing a GC will be immediately retried. I have to check, but it could mean that m

[issue10780] Fix filename encoding in PyErr_SetFromWindowsErrWithFilename() (and PyErr_SetExcFromWindowsErrWithFilename())

2010-12-26 Thread STINNER Victor
STINNER Victor added the comment: issue10780.patch fixes this issue. -- keywords: +patch Added file: http://bugs.python.org/file20171/issue10780.patch ___ Python tracker ___ ___

[issue10296] ctypes catches BreakPoint error on windows 32

2010-12-26 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I _think_ that in our old 2.5 python (which had a backported ctypes from 2.6 to support 64 bits) we always got the JIT debugger i.e. with _ctypes.pyd and _ctypes_d.pyd. This api, "DebugBreak" always invokes the JIT debugger, however the program was c

[issue10780] Fix filename encoding in PyErr_SetFromWindowsErrWithFilename() (and PyErr_SetExcFromWindowsErrWithFilename())

2010-12-26 Thread STINNER Victor
STINNER Victor added the comment: issue10780_mbcs_ignore.patch is a safer but more complex fix: use mbcs decoder with the ignore error handler. Even if issue10780.patch might raise a UnicodeDecodeError, I prefer it because it's shorter, simpler and so easier to maintain the code. --

[issue5871] email.header.Header too lax with embeded newlines

2010-12-26 Thread R. David Murray
R. David Murray added the comment: I've considered this a bit more deeply, and it turns out to be simpler to fix than I originally thought, assuming the fix is acceptable. When a message is parsed we obviously wind up with headers that don't have any embedding issues. So, if we check for emb

[issue10778] decoding_fgets() (tokenizer.c) decodes the filename from the wrong encoding

2010-12-26 Thread STINNER Victor
STINNER Victor added the comment: Oh, ignore "indenterror() (inconsistent use of tabs and spaces in indentation) and", I forgot to remove it. indenterror() is correct. -- ___ Python tracker __

[issue10573] Consistency in unittest assert methods: order of actual, expected

2010-12-26 Thread Ron Adam
Ron Adam added the comment: The issue10573.diff file with the time stamp 20:03 has a lot of document changes that don't have corresponding code changes? -- nosy: +ron_adam ___ Python tracker _

[issue10576] Add a progress callback to gcmodule

2010-12-26 Thread Lukas Lueg
Lukas Lueg added the comment: Agreed, let's have the simple callback first. To solve 2) later on, we could have the callback proposed here be the 'execution'-callback. It neither has nor will have the capability to prevent garbage-collection. We can introduce another 'prepare'-callback later