[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Caio Romão
Caio Romão added the comment: New patch, fixing issue pointed out by gutworth and some others that came up. I've used the following as a test input: -8<--8< #!/usr/bin/python def x(): """ This is a doc """ ''' Another doc.''' s = """line one line two line

[issue3353] make built-in tokenizer available via Python C API

2011-09-07 Thread Meador Inge
Meador Inge added the comment: It would be nice if this same C API was used to implement the 'tokenize' module. Issues like issue2180 will potentially require bug fixes in two places :-/ -- nosy: +meadori ___ Python tracker

[issue2180] tokenize: mishandles line joining

2011-09-07 Thread Meador Inge
Meador Inge added the comment: That syntax error is coming from the CPython parser and *not* the tokenizer. Both CPython and the 'tokenizer' modules produce the same tokenization: [meadori@motherbrain cpython]$ cat repro.py if 1: \ pass [meadori@motherbrain cpython]$ ./python tokenize.py

[issue12927] test_ctypes: segfault with suncc

2011-09-07 Thread Meador Inge
Changes by Meador Inge : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Caio Romão
Changes by Caio Romão : Removed file: http://bugs.python.org/file23117/caioromao-fix-12930.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Caio Romão
Caio Romão added the comment: This patch fixes the reported issue. First time contributor here, feel free to bash. -- keywords: +patch nosy: +caioromao Added file: http://bugs.python.org/file23117/caioromao-fix-12930.patch ___ Python tracker

[issue6560] socket sendmsg(), recvmsg() methods

2011-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: If Bill gets a chance to investigate this before the weekend, great, otherwise my plan to stop making noise in the buildbot results will be to: 1. Create a separate issue specifically for the errors reported by the Mac OS X buildbots (allowing the problem to be

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 92842e347d98 by Victor Stinner in branch 'default': Issue #12852: Set _POSIX_C_SOURCE to 200809 to get POSIX 2008 http://hg.python.org/cpython/rev/92842e347d98 -- ___ Python tracker

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: > I know, but I think it's better to be consistent an also bump > _POSIX_C_SOURCE to POSIX 2008 Oh, I missed AC_DEFINE(_POSIX_C_SOURCE, ...) after AC_DEFINE(_XOPEN_SOURCE, ...). Fixed. -- ___ Python tracker

[issue12659] Add tests for packaging.tests.support

2011-09-07 Thread Francisco Martín Brugué
Francisco Martín Brugué added the comment: I've updated the patch. From your review: the class 'Mixin' is still there as the idea was to imitate the use of 'TempdirManager' as is used in the rest of the tests and test what it's documentation says. Just let me know your preferences here. Thank

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 -- assignee: nadeem.vawda -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Remi Pointel
Remi Pointel added the comment: > @rpointel: Does the fix work for you? If yes, I will close the issue. Hi, yes it sounds good for me: $ hg pull -u $ ./configure && make $ ./python Lib/test/test_posix.py [...] test_fdlistdir (__main__.PosixTester) ... ok [...] Ran 79 tests in 0.097s OK (skippe

[issue1669349] make install fails if no previous Python installation

2011-09-07 Thread Chad Whitacre
Chad Whitacre added the comment: I am seeing this behavior with 2.7.1. -- nosy: +whit537 ___ Python tracker ___ ___ Python-bugs-lis

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Charles-François Natali
Charles-François Natali added the comment: > _POSIX_C_SOURCE value is set automatically depending on _XOPEN_SOURCE > value. I know, but I think it's better to be consistent an also bump _POSIX_C_SOURCE to POSIX 2008, and follow POSIX's recommandation (http://pubs.opengroup.org/onlinepubs/9699

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: > try with _POSIX_C_SOURCE set to 200809L and _XOPEN_SOURCE to 700 _POSIX_C_SOURCE value is set automatically depending on _XOPEN_SOURCE value. I chose to set _XOPEN_SOURCE to 700, instead of 600: it works on OpenBSD 5.0. I don't know if _XOPEN_SOURCE=700 is

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf66578d03d1 by Victor Stinner in branch 'default': Issue #12852: Set _XOPEN_SOURCE to 700 to get POSIX 2008 http://hg.python.org/cpython/rev/cf66578d03d1 -- nosy: +python-dev ___ Python tracker

[issue12926] tarfile tarinfo.extract*() broken with symlinks

2011-09-07 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Nadeem Vawda
Nadeem Vawda added the comment: > The 'Py_None' reference counting in test_long_as_size and > test_long_as_double looked a little odd at first glance Indeed, it is rather roundabout, so I added a comment to avoid confusion. > Anyway, those are just nitpicks; I leave it to you whether you want

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4a66a35da3fd by Nadeem Vawda in branch 'default': Issue #12909: Make PyLong_As* functions consistent in their use of exceptions. http://hg.python.org/cpython/rev/4a66a35da3fd -- nosy: +python-dev ___ Pyt

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-09-07 Thread Tom Christiansen
Tom Christiansen added the comment: Ezio Melotti wrote on Sat, 03 Sep 2011 00:28:03 -: > Ezio Melotti added the comment: > Or they are still called UTF-8 but used in combination with different error > handlers, like surrogateescape and surrogatepass. The "plain" UTF-* codecs > shoul

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Mark Dickinson
Mark Dickinson added the comment: Looks good to me. I'd prefer 'test_long_as_size' to be called 'test_long_as_size_t' (even though that's inaccurate for the ssize_t bits :-). The 'Py_None' reference counting in test_long_as_size and test_long_as_double looked a little odd at first glance---p

[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0

2011-09-07 Thread Charles-François Natali
Charles-François Natali added the comment: > this is the result of gcc -E on Modules/posixmodule.o, asked by haypo. And this confirms that __POSIX_VISIBLE < 200809 when is included, hence the missing prototype. > I suppose that there is a conflict between Python's _POSIX_C_SOURCE and > othe

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-07 Thread Charles-François Natali
Charles-François Natali added the comment: > Using SA_RESTART, read() is not interrupted. But if the program is linked to > pthread, read() is always interrupted: with sa_flags=0 or sa_flags=SA_RESTART. > Ouch... >> But OpenBSD's pthread implementation has severe limitations/bugs. > > rthread

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: "I guess it should use the configured encoding[1] (which is utf-8 by default) to do that, shouldn't it? Since that's the encoding that is used for the message body, too." The URI is only used in HTTP headers, not in the body. --

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread Wolfgang Schnerring
Wolfgang Schnerring added the comment: I guess it should use the configured encoding[1] (which is utf-8 by default) to do that, shouldn't it? Since that's the encoding that is used for the message body, too. [1] http://docs.python.org/library/xmlrpclib.html#xmlrpclib.ServerProxy --

[issue12870] Regex object should have introspection methods

2011-09-07 Thread Ezio Melotti
Ezio Melotti added the comment: If there is a generic introspection method like the pcre_fullinfo you mentioned, and if it's also useful and used with other languages/libraries, then it might be considered. -- ___ Python tracker

[issue12934] pysetup doesn’t work for the docutils project

2011-09-07 Thread Éric Araujo
New submission from Éric Araujo : I tried to run “pysetup metadata” in a docutils source directory but the program failed, because packaging tries to import docutils and it picks up the 2.x version in the local directory. The import chain is: pysetup → packaging.run → packaging.metadata → docu

[issue12933] Update or remove claims that distutils requires external programs

2011-09-07 Thread Éric Araujo
New submission from Éric Araujo : In the past, distutils could use either the zipfile/tarfile modules or the external programs tar, zip and friends. This is told in the documentation and checked in the tests. I suspect that the docs and tests are now outdated. For example, some tests will b

[issue12925] python setup.py upload_docs doesn't ask for login and password

2011-09-07 Thread Éric Araujo
Éric Araujo added the comment: There is no upload_docs command in distutils, I think you have found a setuptools bug. You should report it to these bug trackers: - http://bugs.python.org/setuptools/ - https://bitbucket.org/tarek/distribute/issues (there is a fork, that’s why there are two bu

[issue12932] dircmp does not allow non-shallow comparisons

2011-09-07 Thread Kevin Smith
New submission from Kevin Smith : While filecmp.cmp and filecmp.cmpfiles allow a shallow option to be specified to invoke a more involved comparison of files, filecmp.dircmp does not. It is limited to shallow-only comparisons. This could be solved quite easily by adding a shallow keyword op

[issue11805] package_data only allows one glob per-package

2011-09-07 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12927] test_ctypes: segfault with suncc

2011-09-07 Thread Stefan Krah
Stefan Krah added the comment: The segfault occurs both with CFUNCTYPE and PYFUNCTYPE in ffi_prep_incoming_args_SYSV(). I'm not very familiar with either suncc or the dbx debugger, and I can't get dbx to step into that function (compiled with -g, libffi is not stripped as far as I can see). Anyw

[issue1492704] distinct error type from shutil.move()

2011-09-07 Thread Éric Araujo
Éric Araujo added the comment: Thanks, looks good. There are a few minor cosmetic things I’ll change before committing. I assume you have tested it on Windows? -- ___ Python tracker __

[issue12870] Regex object should have introspection methods

2011-09-07 Thread Matt Chaput
Matt Chaput added the comment: Yes, it's an optimization of my code, not the regex, as I said. Believe me, it's not premature. I've listed two general use cases for the two methods. To me it seems obvious that having to test a large number of regexes against a string, and having to test a sin

[issue1492704] distinct error type from shutil.move()

2011-09-07 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Thanks for the comments! Here'a a new patch. -- Added file: http://bugs.python.org/file23115/new_patch.diff ___ Python tracker ___ _

[issue12779] Update packaging documentation

2011-09-07 Thread Ezio Melotti
Ezio Melotti added the comment: 1) sounds good; 2) would be fine too if it makes your life easier; 3) doesn't seem too useful. -- ___ Python tracker ___

[issue12922] StringIO and seek()

2011-09-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +IO stage: test needed -> needs patch type: behavior -> feature request ___ Python tracker ___

[issue12870] Regex object should have introspection methods

2011-09-07 Thread Éric Araujo
Éric Araujo added the comment: I tend to agree with Ezio. Matt, maybe you could ask for other opinions on python-ideas? -- nosy: +eric.araujo ___ Python tracker ___ __

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread Stefan Krah
Stefan Krah added the comment: Yes, the warning is gone. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: Ok, thanks for the report. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: New patch using ISO-8859-1 instead of the default encoding (ASCII). -- keywords: +patch Added file: http://bugs.python.org/file23114/xmlrpclib_unicode_host-2.patch ___ Python tracker

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: > (thus failing, as #7093 tells, which I personally wouldn't have > closed wontfix). I don't know the right encoding to encode a HTTP header. In Python 3, http.client.HTTPConnection.putheader() encodes header name to ASCII and header values to ISO-8859-1. --

[issue12870] Regex object should have introspection methods

2011-09-07 Thread Ezio Melotti
Ezio Melotti added the comment: Limiting the number of calls to re.match sounds like an optimization to me, and I still think that the methods you proposed are too specific. -- ___ Python tracker

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread Wolfgang Schnerring
New submission from Wolfgang Schnerring : This is a similar issue to http://bugs.python.org/issue7093, but more insiduous: This works: xmlrpclib.ServerProxy(u'http://localhost:8080').foo(dict(baz=u'bär')) While this fails with a UnicodeDecodeError (note the trailing slash in the URI): xmlrpcl

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Dima Tisnek
New submission from Dima Tisnek : Given this as input: #!/usr/bin/python def x(): s = """line one line two line three""" return s reindent.py changes it to: #!/usr/bin/python def x(): s = """line one line two line three""" return s Which means that I cannot use reindent.py on a

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: Does my commit fixed the warning? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset e91ad9669c08 by Victor Stinner in branch 'default': Issue #12929: faulthandler now uses char* for arithmetic on pointers http://hg.python.org/cpython/rev/e91ad9669c08 -- nosy: +python-dev ___ Python trac

[issue12912] xmlrpclib.__version__ not bumped with updates

2011-09-07 Thread Éric Araujo
Éric Araujo added the comment: > Unfortunately that update changed the interface of > Transport.make_connection(), breaking any code that overrode or > extended it. That’s a bad thing. Can you open a bug report about that? We need at least a documentation update. -- ___

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread Stefan Krah
New submission from Stefan Krah : Hi, suncc detected pointer arithmetic with a pointer to void: "./Modules/faulthandler.c", line 910: warning: pointer to void or function used in arithmetic "./Modules/faulthandler.c", line 911: warning: pointer to void or function used in arithmetic "./Modules

[issue12895] In MSI/EXE installer, allow installing Python modules in free path

2011-09-07 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12922] StringIO and seek()

2011-09-07 Thread Pierre Quentel
Changes by Pierre Quentel : -- nosy: +quentel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
simon added the comment: Can't get this one working: import unittest class MyTest(unittest.TestCase): def test_a(self): b = 1 exec(compile("a = b + 1", '', 'single')) assert a == 2 if __name__ == '__main__': unittest.main() -- __

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
simon added the comment: seems i need to use exec(compile("a = 1", '', 'single'), globals()) -- ___ Python tracker ___ ___ Python-bu

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
New submission from simon : works in 2.6, fails in 3.2.2 import unittest class MyTest(unittest.TestCase): def test_a(self): exec(compile("a = 1", '', 'single')) assert a == 1 if __name__ == '__main__': unittest.main() -- components: Library (Lib) messages: 143672

[issue12927] test_ctypes: segfault with suncc

2011-09-07 Thread STINNER Victor
STINNER Victor added the comment: Code of the test: from ctypes import * def test_ignore_retval(self): # Test if the return value of a callback is ignored # if restype is None proto = CFUNCTYPE(None) def func(): return (1, "abc", None)

[issue12927] test_ctypes: segfault with suncc

2011-09-07 Thread Stefan Krah
New submission from Stefan Krah : stefan@opensolaris:~/hg/cpython$ ./python -m test -uall -v test_ctypes == CPython 3.3.0a0 (default:5c8b6e03ebfe, Sep 7 2011, 13:41:08) [C] == Solaris-2.11-i86pc-i386-32bit little-endian == /export/home/stefan/hg/cpython/build/test_python_28849 Testing with fl

[issue12911] Expose a private accumulator C API

2011-09-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm -1 on this approach; I don't think yet another container type is > the right solution, given that we have already plenty of them. It's not a container type, just a small C struct that gets allocated on the stack. Think of it as a library, like stringlib.

[issue12919] Control what module is imported first

2011-09-07 Thread Thomas Wouters
Thomas Wouters added the comment: Here's the patch implementing this, which I'd attached to Issue11561 (although I noticed 'hg diff' omitted the empty stdlib_landmark.py file.) -- keywords: +patch nosy: +twouters Added file: http://bugs.python.org/file23113/stdlib_landmark.diff __

[issue12926] tarfile tarinfo.extract*() broken with symlinks

2011-09-07 Thread Fabio Erculiani
New submission from Fabio Erculiani : TarFile.makelink() is plain broken. Test file: http://git.sabayon.org/entropy.git/tree/libraries/tests/packages/amarok-2.2.2.90.tbz2 _extract_member calls makelink which does os.symlink() and then falls to the else branch and calls back _extract_member(),

[issue12925] python setup.py upload_docs doesn't ask for login and password

2011-09-07 Thread Sergei Stolyarov
New submission from Sergei Stolyarov : python setup.py upload_docs doesn't ask for login and password instead it prints Upload failed (401): You must be identified to edit package information Works only with valid ~/.pypirc -- assignee: tarek components: Distutils messages: 143666 no

[issue1043134] Add preferred extensions for MIME types

2011-09-07 Thread Leo Shklovskii
Leo Shklovskii added the comment: I'm running into a similar issue with this function. My bug is that get_type('foo.png') returns image/x-png. This occurs on windows because there are mappings to both image/png and image/x-png in the registry (as there should be, since that key is actually a