[issue12911] Expose a private accumulator C API

2011-09-07 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de 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. If you want to avoid creating large lists, then the StringIO type should already provide that. So I wonder

[issue12924] Missing call to quote_plus() in test_urllib.test_default_quoting()

2011-09-07 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12924 ___

[issue1043134] Add preferred extensions for MIME types

2011-09-07 Thread Leo Shklovskii
Leo Shklovskii l...@thermopylae.net 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

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

2011-09-07 Thread Sergei Stolyarov
New submission from Sergei Stolyarov ser...@regolit.com: 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

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

2011-09-07 Thread Fabio Erculiani
New submission from Fabio Erculiani lx...@sabayonlinux.org: 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

[issue12919] Control what module is imported first

2011-09-07 Thread Thomas Wouters
Thomas Wouters tho...@python.org 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:

[issue12911] Expose a private accumulator C API

2011-09-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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,

[issue12927] test_ctypes: segfault with suncc

2011-09-07 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: 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 ==

[issue12927] test_ctypes: segfault with suncc

2011-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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():

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
New submission from simon ext-simon.stei...@nokia.com: 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:

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
simon ext-simon.stei...@nokia.com added the comment: seems i need to use exec(compile(a = 1, '', 'single'), globals()) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12928 ___

[issue12928] exec not woking in unittest

2011-09-07 Thread simon
simon ext-simon.stei...@nokia.com 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() --

[issue12922] StringIO and seek()

2011-09-07 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: -- nosy: +quentel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12922 ___ ___ Python-bugs-list

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

2011-09-07 Thread Jeremy Kloth
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12895 ___ ___

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: 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

[issue12912] xmlrpclib.__version__ not bumped with updates

2011-09-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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 Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Does my commit fixed the warning? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12929 ___

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Dima Tisnek
New submission from Dima Tisnek dim...@gmail.com: 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

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread Wolfgang Schnerring
New submission from Wolfgang Schnerring wosc+pyt...@wosc.de: 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

[issue12870] Regex object should have introspection methods

2011-09-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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 rep...@bugs.python.org

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ok, thanks for the report. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12929

[issue12929] faulthandler: void pointer used in arithmetic

2011-09-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Yes, the warning is gone. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12929 ___ ___

[issue12870] Regex object should have introspection methods

2011-09-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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 rep...@bugs.python.org http://bugs.python.org/issue12870

[issue12922] StringIO and seek()

2011-09-07 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +IO stage: test needed - needs patch type: behavior - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12922 ___

[issue12779] Update packaging documentation

2011-09-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue12779

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

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

[issue12870] Regex object should have introspection methods

2011-09-07 Thread Matt Chaput
Matt Chaput m...@whoosh.ca 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

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

2011-09-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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 rep...@bugs.python.org

[issue12927] test_ctypes: segfault with suncc

2011-09-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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

[issue11805] package_data only allows one glob per-package

2011-09-07 Thread Jeremy Kloth
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11805 ___ ___

[issue12932] dircmp does not allow non-shallow comparisons

2011-09-07 Thread Kevin Smith
New submission from Kevin Smith kevin.sm...@sixquickrun.com: 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

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

2011-09-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

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

2011-09-07 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: 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,

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

2011-09-07 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: 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 →

[issue12870] Regex object should have introspection methods

2011-09-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread Wolfgang Schnerring
Wolfgang Schnerring wosc+pyt...@wosc.de 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]

[issue12931] xmlrpclib confuses unicode and string

2011-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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.

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-07 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr 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.

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

2011-09-07 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr 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 dirent.h is included, hence the missing prototype. I suppose that there is a conflict between Python's

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

2011-09-07 Thread Tom Christiansen
Tom Christiansen tchr...@perl.com added the comment: Ezio Melotti rep...@bugs.python.org wrote on Sat, 03 Sep 2011 00:28:03 -: Ezio Melotti ezio.melo...@gmail.com added the comment: Or they are still called UTF-8 but used in combination with different error handlers, like

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com 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

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___

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

2011-09-07 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12926 ___ ___ Python-bugs-list mailing

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

2011-09-07 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

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

2011-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2011-09-07 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr 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

[issue1669349] make install fails if no previous Python installation

2011-09-07 Thread Chad Whitacre
Chad Whitacre c...@zetaweb.com added the comment: I am seeing this behavior with 2.7.1. -- nosy: +whit537 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1669349 ___

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

2011-09-07 Thread Remi Pointel
Remi Pointel pyt...@xiri.fr 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

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

2011-09-07 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: +1 -- assignee: nadeem.vawda - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___

[issue12659] Add tests for packaging.tests.support

2011-09-07 Thread Francisco Martín Brugué
Francisco Martín Brugué franci...@email.de 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

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

2011-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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. --

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

2011-09-07 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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 -- ___

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

2011-09-07 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com 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

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Caio Romão
Caio Romão caioro...@gmail.com 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 ___

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Caio Romão
Changes by Caio Romão caioro...@gmail.com: Removed file: http://bugs.python.org/file23117/caioromao-fix-12930.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12930 ___

[issue12927] test_ctypes: segfault with suncc

2011-09-07 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12927 ___ ___ Python-bugs-list

[issue2180] tokenize: mishandles line joining

2011-09-07 Thread Meador Inge
Meador Inge mead...@gmail.com 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]$

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

2011-09-07 Thread Meador Inge
Meador Inge mead...@gmail.com 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

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Caio Romão
Caio Romão caioro...@gmail.com 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