[issue14907] SSL module cannot handle unicode filenames

2012-05-24 Thread Marc Schlaich
New submission from Marc Schlaich : Here is a short example to reproduce the error: >>> import socket, ssl >>> sock = socket.socket() >>> sock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=u'ä.crt') >>> sock.connect((None, None)) Traceback (most recent call last): File "", line

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-24 Thread Benoît Bryon
Benoît Bryon added the comment: I didn't provided the patch because the work is still at early stage. I planned to provide a patch when the development branch is quite mature. I created the issue early so that other people can contribute. But I maybe I'd better read PEP 1 again... because it l

[issue14889] PyBytes_FromObject(bytes_object) creates a new object

2012-05-24 Thread Larry Hastings
Changes by Larry Hastings : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue14889] PyBytes_FromObject(bytes_object) creates a new object

2012-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8cd75e8a1d6 by Larry Hastings in branch 'default': Issue #14889: PyBytes_FromObject(bytes) now just increfs and returns. http://hg.python.org/cpython/rev/f8cd75e8a1d6 -- nosy: +python-dev ___ Python tra

[issue14889] PyBytes_FromObject(bytes_object) creates a new object

2012-05-24 Thread Larry Hastings
Larry Hastings added the comment: Changing the name of the report to accurately reflect reality. If you passed in a bytes object, PyBytes_FromObject would create a new object, when all it really needed to do was incref and return. My checkin in a minute will add that shortcut. -- t

[issue14893] Tutorial: Add function annotation example to function tutorial

2012-05-24 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the patch. I made some comments on the code review tool, which should have sent you a mail. -- ___ Python tracker ___ ___

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-24 Thread Éric Araujo
Changes by Éric Araujo : -- keywords: +patch Added file: http://bugs.python.org/file25701/4b311ce6624b.diff ___ Python tracker ___ ___

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-24 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. You are confusing Python packages and the distributable things that are also called packages (not by most of the distutils docs though where they are named distributions). PEP 8 covers conventions for naming modules (including packages);

[issue14810] Bug in tarfile

2012-05-24 Thread David Ibarra
David Ibarra added the comment: I too cannot reproduce this, tarfile seems to recognizes that it isn't a valid tar file (tested on OS X): Davids-MacBook-Air:Workspace dibarra$ ls -l total 8 -rw-r--r-- 1 dibarra staff 0 May 30 1956 testfile Davids-MacBook-Air:Workspace dibarra$ tar -cvf

[issue13208] Problems with urllib on windows

2012-05-24 Thread Steve Holden
Steve Holden added the comment: Oops, sorry, meant to close this issue. Hope that's OK. -- status: open -> closed ___ Python tracker ___

[issue14906] rotatingHandler WindowsError

2012-05-24 Thread Curu Wong
New submission from Curu Wong : I setup and use rotatingHandler this way: = #create logger logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) #create rotate handler rotatefh = logging.handlers.RotatingFileHandler(filename=log

[issue952953] execve rejects empty argument list

2012-05-24 Thread Tim Newsham
Tim Newsham added the comment: This still crashes in newer builds such as: Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 >>> import os >>> os.execve("/bin/ls", [], {}) Segmentation fault 0 __strrchr_sse42 () at ../sysdeps/x86_64/multiarch/strrchr.S:134 #1 0x000

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2012-05-24 Thread Eric V. Smith
Eric V. Smith added the comment: For a (very) brief discussion on the strategy to implement this, see: http://mail.python.org/pipermail/import-sig/2012-May/000528.html -- ___ Python tracker __

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2012-05-24 Thread Eric V. Smith
New submission from Eric V. Smith : If a zip file contains "pkg/foo.py" but no "pkg/" entry, it will not be possible for "pkg" to be a namespace package portion. -- components: Extension Modules messages: 161543 nosy: eric.smith priority: normal severity: normal stage: needs patch statu

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-05-24 Thread Eric V. Smith
Eric V. Smith added the comment: I'm closing this issue. I'll open new issues as needed. -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 702009f3c0b1 by Eric V. Smith in branch 'default': issue 14660: Implement PEP 420, namespace packages. http://hg.python.org/cpython/rev/702009f3c0b1 -- nosy: +python-dev ___ Python tracker

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-05-24 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- nosy: -srid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14886] json C vs pure-python implementation difference

2012-05-24 Thread Марк Коренберг
Марк Коренберг added the comment: Inconsistency is bother me. If I specify indent in dumps(), I will have one semantics, else other ones. Why not to fix pure-python implementation using "type(o) in (list, tuple)" ? This is faster too (as I think). --

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-05-24 Thread Brian Curtin
Brian Curtin added the comment: I'm strongly opposed to enabling this by default at least for 3.3, but does anyone think something like this dialog http://i.imgur.com/18zPD.png be helpful? After choosing the directory to install to and before choosing the features, it's a simple dialog explai

[issue14886] json C vs pure-python implementation difference

2012-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Well, __class_ = list is my problem, but python's problem is that it > uses different approaches in C and python implementation. Well, by construction a C accelerator will use the fastest method available within what the API's specification allows. The json A

[issue12014] str.format parses replacement field incorrectly

2012-05-24 Thread Ben Wolfson
Ben Wolfson added the comment: Here's a patch that works against the current unicode_format.h and implements what Petri suggested. -- Added file: http://bugs.python.org/file25699/strformat-no-braces.diff ___ Python tracker

[issue14886] json C vs pure-python implementation difference

2012-05-24 Thread Марк Коренберг
Марк Коренберг added the comment: Well, __class_ = list is my problem, but python's problem is that it uses different approaches in C and python implementation. P.S. I don't want to subclass list, as I don't want things like this: x = pseudo_list(iter(xrange(10)) x.append('test') print len(x)

[issue14904] test_unicode_repr_oflw (in test_bigmem) crashes

2012-05-24 Thread Antoine Pitrou
New submission from Antoine Pitrou : Someone needs to debug this (someone with enough RAM). http://www.python.org/dev/buildbot/all/builders/AMD64%20Ubuntu%20LTS%20bigmem%202.7/builds/6/steps/test/logs/stdio My intuition is that the crash is on the eval(), since test_unicode_repr above passes.

[issue14901] Python Windows FAQ is Very Outdated

2012-05-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> docs@python components: +Documentation nosy: +brian.curtin, docs@python, ezio.melotti, tim.golden stage: -> needs patch type: -> enhancement versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker

[issue14901] Python Windows FAQ is Very Outdated

2012-05-24 Thread Daniel Swanson
Daniel Swanson added the comment: I agree that Such things are most outdated and I think that if any Python users are still using platforms that old, that they are an extreme minority and also wonder what on (or off) Earth a Freeze is. -- nosy: +weirdink13 ___

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-05-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > 2. Yes, only the installation directory, because that's the only > directory we create. Scripts is created by distutils/packaging, but > perhaps we could add it since it is widely used. Anyone have an > opinion? Fine with me. To create an empty directo

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-05-24 Thread Nick Coghlan
Nick Coghlan added the comment: For 3, installing the PEP 397 launcher will be the long term "on-by-default" solution. For 2, adding the Scripts subdirectory seems reasonable. FWIW, Window used to have *very* severe restrictions on the maximum length of PATH, as well as gratuitously long nam

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-05-24 Thread Pekka Klärck
Pekka Klärck added the comment: Being on by default would just be easier. If it's off, we still need to separately instruct users to turn it on. That's obviously a lot easier than instruction them to change environment variables, so I don't feel too strongly about it. Not adding Scripts into

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-05-24 Thread Brian Curtin
Brian Curtin added the comment: 2. Yes, only the installation directory, because that's the only directory we create. Scripts is created by distutils/packaging, but perhaps we could add it since it is widely used. Anyone have an opinion? 3. Do you have a reason? Many tools that offer path man

[issue14903] dictobject infinite loop on 2.6.5 on 32-bit x86

2012-05-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Can you reproduce on current 2.7.3 or 3.2.3 or even 3.3.0 (which has changed dict implementation)? Or can you upload a short program that exhibits the problem, so someone else can try? 2.6 gets security fixes only and I do not believe this qualifies. If not a

[issue14903] dictobject infinite loop on 2.6.5 on 32-bit x86

2012-05-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-05-24 Thread Pekka Klärck
Pekka Klärck added the comment: I found about this enhancement via Python Insider blog post [1] that also asked adding comments to this issue. Here are mine: 1) Great to see that this is finally done! 2) Is only Python installation directory added into PATH? Why not also Scripts directory un

[issue14903] dictobject infinite loop on 2.6.5 on 32-bit x86

2012-05-24 Thread Daniel Farina
New submission from Daniel Farina : I seem to be encountering somewhat rare an infinite loop in hash table probing while importing _socket, as triggered by init_socket.c in Python 2.6, as seen/patched shipped with Ubuntu 10.04 LTS. The problem only reproduces on 32 bit machines, on both -O2 and

[issue3244] multipart/form-data encoding

2012-05-24 Thread R. David Murray
R. David Murray added the comment: Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue14863] Update docs of os.fdopen()

2012-05-24 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue14863] Update docs of os.fdopen()

2012-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9ef2cb56926d by Petri Lehtinen in branch '3.2': #14863: Update the documentation of os.fdopen() http://hg.python.org/cpython/rev/9ef2cb56926d New changeset f27e098a774a by Petri Lehtinen in branch 'default': #14863: Update the documentation of os.f

[issue14902] test_logging failed

2012-05-24 Thread Yuriy Syrovetskiy
Yuriy Syrovetskiy added the comment: My local timezone is Europe/Moscow, UTC+4, no daylight saving since 2011. -- ___ Python tracker ___

[issue14902] test_logging failed

2012-05-24 Thread Yuriy Syrovetskiy
New submission from Yuriy Syrovetskiy : rev 152c78b94e41 test test_logging failed -- Traceback (most recent call last): File "/home/cblp/my/cpython_default/Lib/test/test_logging.py", line 2903, in test_time self.assertEqual(f.formatTime(r), '1993-04-21 08:03:00,123') AssertionError: '1993

[issue3244] multipart/form-data encoding

2012-05-24 Thread Forest Bond
Forest Bond added the comment: Okay, Contributor Agreement sent. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2012-05-24 Thread Panos Christeas
Panos Christeas added the comment: I'm reopening the bug, as your last comment does not cover the initial report. We are not talking about invalid UTF8 here, but legal low-ASCII values. -- resolution: wont fix -> status: closed -> open ___ Python t

[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2012-05-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: This has nothing to do with XML 1.1 (so closing this report as "won't fix"). The UTF-8 text that you present works very well: >>> p=xml.parsers.expat.ParserCreate(encoding="utf-8") >>> p.Parse("\xc3\x87>> p=xml.parsers.expat.ParserCreate(encoding="utf-8") >>>

[issue14901] Python Windows FAQ is Very Outdated

2012-05-24 Thread Michael Driscoll
Changes by Michael Driscoll : -- components: +Windows versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___ __

[issue14901] Python Windows FAQ is Very Outdated

2012-05-24 Thread Michael Driscoll
New submission from Michael Driscoll : I was reading through http://docs.python.org/faq/windows.html and noticed that its examples are based on Python 2.2-2.3 and it only really covers up to Windows 2000 with just a couple mentions of XP. There are also sections in there that I'm not even sur

[issue13208] Problems with urllib on windows

2012-05-24 Thread Steve Holden
Steve Holden added the comment: I have just tested this against the 2.7.1 release on Windows 7 and it runs fine. I suspect there may have been some transient error with the reporter's system or network, but if this still fails for him then reopening will be appropriate with more information a

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 24, 2012, at 03:03 PM, Éric Araujo wrote: >> But if 'a' is invalid, then LooseVersion should refuse to accept it in its >> constructor, right? >It’s complicated. The doc does not say much, the docstring however clearly >states that versions should sta

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Éric Araujo
Éric Araujo added the comment: About Barry’s reply: > But if 'a' is invalid, then LooseVersion should refuse to accept it in its > constructor, right? It’s complicated. The doc does not say much, the docstring however clearly states that versions should start with a digit, but a ton of proje

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Éric Araujo
Éric Araujo added the comment: > Hello, as a GSoC student, I'm working on PyPI to Debian repository converter. Great! I hope you’re aware of previous efforts like stdeb (unfortunately requires setuptools) and py2rpm (for rpm systems but some parts can be inspiration, like the download code).

[issue14653] Improve mktime_tz to use calendar.timegm instead of time.mktime

2012-05-24 Thread R. David Murray
Changes by R. David Murray : -- assignee: r.david.murray -> components: +email -Library (Lib) nosy: +barry ___ Python tracker ___ ___

[issue14734] Use binascii.b2a_qp/a2b_qp in email package header handling?

2012-05-24 Thread R. David Murray
Changes by R. David Murray : -- assignee: r.david.murray -> components: +email nosy: +barry ___ Python tracker ___ ___ Python-bugs-li

[issue14645] Generator does not translate linesep characters in certain circumstances

2012-05-24 Thread R. David Murray
Changes by R. David Murray : -- assignee: r.david.murray -> components: +email nosy: +barry ___ Python tracker ___ ___ Python-bugs-li

[issue7304] email.message.Message.set_payload and as_string given charset 'us-ascii' plus 8bit data produces invalid message

2012-05-24 Thread R. David Murray
Changes by R. David Murray : -- assignee: r.david.murray -> components: +email -Library (Lib) ___ Python tracker ___ ___ Python-bugs-l

[issue12553] Add support for using a default CTE of '8bit' to MIMEText

2012-05-24 Thread R. David Murray
R. David Murray added the comment: I've changed my approach. The policy option is now 'cte_type', but moreover the default policy is now a backwards compatibility policy to which this issue doesn't apply. The new provisional policy should get this support, but that's a somewhat bigger proje

[issue12641] Remove -mno-cygwin from distutils

2012-05-24 Thread Phillip J. Eby
Phillip J. Eby added the comment: Just adding a data point: I use the "mingw32" compiler setting with the Cygwin GCC installation, to compile extensions for standard Windows Python (*not* Cygwin Python). It would be good if any change doesn't break this scenario -- assuming it's not already

[issue634412] RFC 2112 in email package

2012-05-24 Thread R. David Murray
Changes by R. David Murray : -- assignee: r.david.murray -> components: +email -Library (Lib) stage: test needed -> needs patch ___ Python tracker ___ _

[issue12553] Add support for using a default CTE of '8bit' to MIMEText

2012-05-24 Thread R. David Murray
Changes by R. David Murray : -- components: +email -Library (Lib) nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue1467619] Header.decode_header eats up spaces

2012-05-24 Thread R. David Murray
Changes by R. David Murray : -- assignee: r.david.murray -> components: +email -Library (Lib) ___ Python tracker ___ ___ Python-bug

[issue3244] multipart/form-data encoding

2012-05-24 Thread Forest Bond
Forest Bond added the comment: Sure thing. I'll send it via e-mail later today. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue3244] multipart/form-data encoding

2012-05-24 Thread R. David Murray
R. David Murray added the comment: Forest, could you please submit a contributor agreement? http://www.python.org/psf/contrib/ Life caught up with me and I haven't made enough progress to do anything with this yet, but I still want to. -- assignee: r.david.murray -> components: +ema

[issue13060] allow other rounding modes in round()

2012-05-24 Thread Arne Babenhauserheide
Arne Babenhauserheide added the comment: I also think that rounding half away from zero would be the most obvious choice, as it does not introduce a bias for random numbers distributed around 0 while being close to what I would expect from school mathematics. The case of n*(random() - 0.5) wh

[issue12515] email modifies the message structure when the parsed email is invalid without registering defects

2012-05-24 Thread R. David Murray
R. David Murray added the comment: Thanks for the patch. I haven't forgotten about it, but it will probably still be a while yet before I get to it. Hopefully before 3.3 is released, though. -- assignee: r.david.murray -> components: +email -Library (Lib) nosy: +barry title: email m

[issue14900] cProfile does not take its result headers as sort arguments

2012-05-24 Thread Arne Babenhauserheide
Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file25698/3.2-1-headings-sortable.diff ___ Python tracker ___ ___ Python

[issue14900] cProfile does not take its result headers as sort arguments

2012-05-24 Thread Arne Babenhauserheide
Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file25697/3.2-0-pcalls.diff ___ Python tracker ___ ___ Python-bugs-list

[issue14900] cProfile does not take its result headers as sort arguments

2012-05-24 Thread Arne Babenhauserheide
Changes by Arne Babenhauserheide : Added file: http://bugs.python.org/file25696/2.7-1-headings-sortable.diff ___ Python tracker ___ ___ Python

[issue14900] cProfile does not take its result headers as sort arguments

2012-05-24 Thread Arne Babenhauserheide
New submission from Arne Babenhauserheide : cProfile reports the profiling result in a table with the headers ncalls tottime percall cumtime percall filename:lineno(function) The respective arguments are calls time -cumulative - nfl Since I had to lookup these diffe

[issue14036] urlparse insufficient port property validation

2012-05-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is taken care. I was not really convinced on the need as likely seemed a non issue from "urlparse" standpoint, But still there is no harm in returning valid port as semantically the attribute stands for a port. Thanks! -- assignee: -> orsenthi

[issue14036] urlparse insufficient port property validation

2012-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 988903cf24c5 by Senthil Kumaran in branch '2.7': Issue #14036: return None when port in urlparse cross 65535 http://hg.python.org/cpython/rev/988903cf24c5 New changeset d769e64aed79 by Senthil Kumaran in branch '3.2': Issue #14036: return None when

[issue5767] xmlrpclib loads invalid documents

2012-05-24 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- title: xmlrpclib expat -> xmlrpclib loads invalid documents ___ Python tracker ___ ___ Python-bugs

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-24 Thread Benoît Bryon
Benoît Bryon added the comment: See Martin Aspeli's article at http://www.martinaspeli.net/articles/the-naming-of-things-package-names-and-namespaces -- ___ Python tracker ___

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-24 Thread Benoît Bryon
Benoît Bryon added the comment: Use branch ""doc-package-names" (not only conventions) instead. -- ___ Python tracker ___ ___ Python-

[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2012-05-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Yes, but where does this data come from? how did you feed it to the parser? And this does not relate to xml 1.1. BTW, I found this page about XML 1.1: http://www.cafeconleche.org/books/effectivexml/chapters/03.html """ Everything you need to know about

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-24 Thread Benoît Bryon
New submission from Benoît Bryon : Scope: * Python documentation lacks conventions, or at least guidelines, to choose a name for a package. * Python has tools to create and distribute packages. Not covered by this issue. * Python has tools to create namespace packages. Not covered by thi

[issue14821] _ctypes and other modules not built with msbuild on vs2010 solution

2012-05-24 Thread Jason R. Coombs
Jason R. Coombs added the comment: Excellent! The latest tip now builds nicely using msbuild. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue14822] Build unusable when compiled for Win 64-bit release

2012-05-24 Thread Jason R. Coombs
Jason R. Coombs added the comment: I tested against the latest tip and the issue no longer exists. -- resolution: -> works for me status: open -> closed ___ Python tracker ___

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
Sasha B added the comment: Ahh, I see. You are correct. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report. Yes, this is expected. Dictionary membership is based on equality of keys. Since True and 1 are equal, only one of them can be present in a dictionary at a time (and a key lookup works with either). >>> x = {0: 'bar'} >>> x[0] 'bar'

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
Changes by Sasha B : -- components: +Build type: -> behavior versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
New submission from Sasha B : Not sure if this is predicted behaviour, but if I make a dict like: >>> x = {0: 'bar', True: 'foo'} and modify True with 1, or 0 with False: >>> x[False] = 'boo' >>> x[1] = 'far' the modifications happen: >>> x {0: 'boo', True: 'far'} Is this expected behaviour?

[issue14886] json C vs pure-python implementation difference

2012-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > class pseudo_list(object): > __class__ = list # fake isinstance Why not inherit from list directly? Setting __class__ to something else isn't widely supported in the Python code base. It may work or may not work, depending on the API, but it's not someth

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-05-24 Thread Hynek Schlawack
Hynek Schlawack added the comment: Here is a patch with some more pep8-wankery + some dead code removal. Feel free to add only what you like, no hard feelings. :) -- Added file: http://bugs.python.org/file25694/ipaddress-pep8-and-dead-code.diff ___

[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-24 Thread STINNER Victor
STINNER Victor added the comment: >> For Python 3.3, _PyUnicodeWriter API is faster than the Py_UCS4 buffer API >> and PyAccu API in quite all cases, with a speedup between 30% and 100%. But >> there are some cases where the _PyUnicodeWriter API is slower: > > Perhaps most of these problems ca

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > It might help if the error message also stated how many arguments were > actually received, like the TypeError message already does for bad function / > method calls. E.g., > > "struct.error: pack expected 2 items for packing (got 1)" Yes, this would b

[issue14855] IPv6 support for logging.handlers

2012-05-24 Thread Vinay Sajip
Vinay Sajip added the comment: > Or should it go to the separate ticket? Yes, please. -- ___ Python tracker ___ ___ Python-bugs-list

[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2012-05-24 Thread Phil Daintree
Phil Daintree added the comment: The field in question contains the utf-8 text: PEÇAS -- ___ Python tracker ___ ___ Python-bugs-list

[issue5767] xmlrpclib expat

2012-05-24 Thread Phil Daintree
Changes by Phil Daintree : -- title: xmlrpclib loads invalid documents -> xmlrpclib expat versions: +Python 2.7 -Python 2.5, Python 2.6 ___ Python tracker ___

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Natalia
Natalia added the comment: Hello, as a GSoC student, I'm working on PyPI to Debian repository converter. I wanted to compare  versions of packages available in PyPI and it broke while comparing appwsgi, wsgi-design ('default') and gar ('prototype.1') versions. --

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Mark Dickinson
Mark Dickinson added the comment: It might help if the error message also stated how many arguments were actually received, like the TypeError message already does for bad function / method calls. E.g., "struct.error: pack expected 2 items for packing (got 1)" -- _

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Funny. struct.pack(fmt, args...) is just an alias to struct.Struct(fmt).pack(args...). The error message should be changed to explicitly state that we are talking about the data for packing, and not about the arguments of function. Or should remove mention

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. Yes, that's not very clear. The same message is used both for struct.pack and for Struct.pack (which struct.pack is really just a convenient alias for); it makes a bit more sense for the latter: >>> struct.Struct('1s1s').pack('33') Traceback (most rec

[issue14890] typo in difflib

2012-05-24 Thread ninsen
ninsen added the comment: My bad, closing... -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue14889] PyBytes_FromObject(bytes_object) fails

2012-05-24 Thread Larry Hastings
Larry Hastings added the comment: I can't reproduce this, and it was pretty late in my day when I saw it, so let's assume I was mistaken and PyBytes_CheckBuffer() works fine. Nevertheless I think the patch is a good idea--why create a new object when you don't have to? Unless I hear otherwi

[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > For Python 3.3, _PyUnicodeWriter API is faster than the Py_UCS4 buffer API > and PyAccu API in quite all cases, with a speedup between 30% and 100%. But > there are some cases where the _PyUnicodeWriter API is slower: Perhaps most of these problems can be

[issue14889] PyBytes_FromObject(bytes_object) fails

2012-05-24 Thread Stefan Krah
Stefan Krah added the comment: I also wonder how the buffer interface section can fail. PyBuffer_ToContiguous() should translate to a simple memcpy() for a bytes object. What is going on? -- nosy: +skrah ___ Python tracker