Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-04 Thread Steven D'Aprano
On Fri, 03 May 2013 13:52:23 +0600, Mr. Joe wrote: Thanks for clearing up. Developers of python should address this issue, in my opinion. 3.4/3.5 maybe, but better late than never. Recently, I've been beaten back for using some exotic features of python. What do you consider exotic?

Re: socket programming

2013-05-04 Thread Irmen de Jong
On 4-5-2013 4:13, Pedro wrote: SERVER: import socket # Import socket module s = socket.socket() # Create a socket object host = socket.gethostname() # Get local machine name port = 12345# Reserve a port for your service. s.bind((host, port))#

Re: socket programming

2013-05-04 Thread Chris Angelico
On Sat, May 4, 2013 at 7:37 PM, Irmen de Jong irmen.nos...@xs4all.nl wrote: Bottom line: Socket programming on this level is hugely complicated. It doesn't seem too bad if you start of with these simple example programs, but that's false hope. If at all possible, avoid direct socket

Re: Can read in the BMP data correctly ,but the size is not right?

2013-05-04 Thread Jimmie He
Totally right!Thanks again! -- http://mail.python.org/mailman/listinfo/python-list

About py2exe bundle_files setting?

2013-05-04 Thread Jimmie He
Hi Guys, Now I met an issue to use py2exe when I use bundle_files = 1.As the statement by py2exe,it means it will generate standalone EXE in stead of lots of .dll .pyc.But it crash when I use bundle_files = 1 or bundle_files = 2,if I use =3 it is okey.I 've search this issue by google, it

Re: About py2exe bundle_files setting?

2013-05-04 Thread Steven D'Aprano
On Sat, 04 May 2013 03:37:54 -0700, Jimmie He wrote: Hi Guys, Now I met an issue to use py2exe when I use bundle_files = 1.As the statement by py2exe,it means it will generate standalone EXE in stead of lots of .dll .pyc.But it crash when I use bundle_files = 1 or bundle_files =

Re: About py2exe bundle_files setting?

2013-05-04 Thread Jimmie He
在 2013年5月4日星期六UTC+8下午7时31分04秒,Steven D'Aprano写道: On Sat, 04 May 2013 03:37:54 -0700, Jimmie He wrote: Hi Guys, Now I met an issue to use py2exe when I use bundle_files = 1.As the statement by py2exe,it means it will generate standalone EXE in stead of lots of .dll

Re: About py2exe bundle_files setting?

2013-05-04 Thread Jimmie He
在 2013年5月4日星期六UTC+8下午7时31分04秒,Steven D'Aprano写道: On Sat, 04 May 2013 03:37:54 -0700, Jimmie He wrote: Hi Guys, Now I met an issue to use py2exe when I use bundle_files = 1.As the statement by py2exe,it means it will generate standalone EXE in stead of lots of .dll

Re: About py2exe bundle_files setting?

2013-05-04 Thread Steven D'Aprano
On Sat, 04 May 2013 04:59:13 -0700, Jimmie He wrote: I 've already put my project into GitHub,find the link below,in the folder Bug,I capture the expection pops up,it is not fatal blue screen.Sorry for my non-english windows:-) https://github.com/jimmiehe/BMPtool/tree/master/Bug I

Re: About py2exe bundle_files setting?

2013-05-04 Thread Chris Angelico
On Sat, May 4, 2013 at 11:42 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 04 May 2013 04:59:13 -0700, Jimmie He wrote: I 've already put my project into GitHub,find the link below,in the folder Bug,I capture the expection pops up,it is not fatal blue

Re: About py2exe bundle_files setting?

2013-05-04 Thread Jimmie He
在 2013年5月4日星期六UTC+8下午10时50分14秒,Chris Angelico写道: On Sat, May 4, 2013 at 11:42 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 04 May 2013 04:59:13 -0700, Jimmie He wrote: I 've already put my project into GitHub,find the link below,in the folder

Re: About py2exe bundle_files setting?

2013-05-04 Thread Chris Angelico
On Sun, May 5, 2013 at 1:42 AM, Jimmie He jimmie...@gmail.com wrote: 在 2013年5月4日星期六UTC+8下午10时50分14秒,Chris Angelico写道: On Sat, May 4, 2013 at 11:42 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 04 May 2013 04:59:13 -0700, Jimmie He wrote: I 've already put

Re: About py2exe bundle_files setting?

2013-05-04 Thread Jimmie He
在 2013年5月4日星期六UTC+8下午11时49分33秒,Chris Angelico写道: On Sun, May 5, 2013 at 1:42 AM, Jimmie He jimmie...@gmail.com wrote: 在 2013年5月4日星期六UTC+8下午10时50分14秒,Chris Angelico写道: On Sat, May 4, 2013 at 11:42 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 04

Re: About py2exe bundle_files setting?

2013-05-04 Thread Chris Angelico
On Sun, May 5, 2013 at 2:27 AM, Jimmie He jimmie...@gmail.com wrote: 在 2013年5月4日星期六UTC+8下午11时49分33秒,Chris Angelico写道: Unfortunately it's fairly non-specific. Are you able to make _any_ program work with py2exe using bundle_files = 1? If you can make a simple Hello, world work but your

Video tutorial for making a guess the number game in python

2013-05-04 Thread eli m
I made a video tutorial for making a guess the number game in python. You can check it out here: http://www.youtube.com/watch?v=0WSQb-7wMJQ -- http://mail.python.org/mailman/listinfo/python-list

Re: Libroffice PMT equivalent in python

2013-05-04 Thread Michael Marshall
On Thursday, April 25, 2013 6:46:01 AM UTC-4, ஆமாச்சு wrote: Hi, Are there equivalent in any Python libraries that could match function like PMT in libreoffice? Refer: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two#PMT -- Amachu The PMT function in

Re: Libroffice PMT equivalent in python

2013-05-04 Thread Michael Marshall
On Saturday, May 4, 2013 11:37:17 PM UTC-4, Michael Marshall wrote: On Thursday, April 25, 2013 6:46:01 AM UTC-4, ஆமாச்சு wrote: If the number of periods have a fractional part such as 10.5 years of 119.25 months then besides the initial periodic payment, there may be 4 different last

Re: Libroffice PMT equivalent in python

2013-05-04 Thread Michael Marshall
On Saturday, May 4, 2013 11:37:17 PM UTC-4, Michael Marshall wrote: 4) Partial period payment But then if the NPER has a fraction, you may still opt to pay or collect the payment at the actual time period but the amount you pay is the fraction of time period times the remaining principal.

Re: Collision of Two Rect

2013-05-04 Thread Tim Roberts
Alex Gardner agardner...@gmail.com wrote: When rect A collides with rect B they stick when I am wanting A to bounce off of B. I have tried different methods, but none seem to work. My source is here: http://pastebin.com/CBYPcubL The collision code itself is below: -- # Bounce off of the

[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-05-04 Thread Evgeny Kapun
Evgeny Kapun added the comment: To make fdopendir fail, just pass any valid FD which points to a non-directory, such as a file or a pipe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17899

[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-05-04 Thread Evgeny Kapun
Evgeny Kapun added the comment: Simple test: while True: try: listdir(0) except NotADirectoryError: pass -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17899 ___

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-05-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: The reasons for the previous rejections still hold: more tools make the overall toolset harder to use, not being a primitive operation, dearth of real-world use-cases, not being prevalent in other functional languages, easily expressible with existing

[issue17897] Optimize unpickle prefetching

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, I have no any interesting results. ;) If an effect exists, it should reveal itself only in rare cases and be very small. This patch may be considered rather as a tiny refactoring (it decreases a number of code lines). --

[issue17900] Recursive OrderedDict pickling

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In additional the patch decreases the size of the pickled data, speeds up pickling and unpickling. $ ./python -c import collections, pickle; od = collections.OrderedDict((i, i) for i in range(10)); print(len(pickle.dumps(od))) Without patch: 1536827.

[issue17899] os.listdir() leaks FDs if invoked on FD pointing to a non-directory

2013-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17899 ___ ___

[issue17872] Crash in marshal.load() with bad reader

2013-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- type: behavior - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17872 ___ ___

[issue17776] IDLE Internationalization

2013-05-04 Thread Damien Marié
Damien Marié added the comment: A side note to justify the localization of IDLE: I think the internationalization part is important, It's a nearly invisible overhead for the code but it will be helpful for example: - In France, most of the highschool student have to learn python so they learn

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1) A separate function might be better. I think this kind of output would be more useful while inspecting individual byte objects, rather than having it for arbitrary byte objects (that might be inside other containers). I don't think the general

[issue16429] Emit SyntaxWarning for code that risks UnboundLocalError

2013-05-04 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16429 ___ ___

[issue17903] Python launcher for windows should search path for #!/usr/bin/env

2013-05-04 Thread Paul Moore
New submission from Paul Moore: The Python launcher for windows should recognise a hashbang line of #!/usr/bin/env python, and use the python executable found on PATH to run the script. If no python executable is present on PATH the launcher should fall back to the current behaviour (using

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is an alternative patch which outputs a bytes literal and a hexdump as a comment. -- Added file: http://bugs.python.org/file30121/pprint_bytes_hex_2.patch ___ Python tracker rep...@bugs.python.org

[issue17904] bytes should be listed as built-in function for 2.7

2013-05-04 Thread Florent Xicluna
New submission from Florent Xicluna: Looking into the summary table, there's no information about the `bytes` built-in alias for `str`: http://docs.python.org/2/library/functions.html IMHO it should appear in this table (as str, unicode, bytearray) with the appropriate `.. versionadded:`.

[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2013-05-04 Thread Ger Luijten
Ger Luijten added the comment: Hello Roger, Thanks for the clear explanation! Greetings, Ger 2013/4/20 Roger Serwy rep...@bugs.python.org Roger Serwy added the comment: Good catch Terry! I've been testing using python -m idlelib.idle instead of importing it from an interactive prompt.

[issue3405] Add support for the new data option supported by event generate (Tk 8.5)

2013-05-04 Thread Alejandro Rodas
Changes by Alejandro Rodas alexrd...@gmail.com: -- nosy: +alex.rodas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3405 ___ ___ Python-bugs-list

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Antoine, can you share the code for your benchmarks which show performance improvements when framing is enabled? I am seeing the same 10-15% slowdown even when pickling stuff to pure Python objects: The performance improvement is when unpickling, not when

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le samedi 04 mai 2013 à 09:42 +, Serhiy Storchaka a écrit : However a simple specialized code can be used for special purposes, i.e. internally in the pprint module. I don't see how it can be reused and don't interested in a general function. I don't

[issue17806] Add keyword args support to str/bytes.expandtabs()

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: FTR the reason to add this is consistency This always was a weak reason. and readability It is a matter of taste. For me s.expandtabs(3) looks more readable than s.expandtabs(tabsize=3). I don't see an urgent need for this feature and don't like a

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file30121/pprint_bytes_hex_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17868 ___

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file30122/pprint_bytes_hex_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17868 ___

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand how it would be useful in the pprint module if it can't be useful as a general function. How can it be used besides pprint/pformat functions? Just the nice way is different depending on the situations: if my bytes object is simply a

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't understand how it would be useful in the pprint module if it can't be useful as a general function. How can it be used besides pprint/pformat functions? I don't understand your question. Do you never print some data at the command-line prompt? Or

[issue16316] Support xz compression in mimetypes module

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26068bfec70e by Serhiy Storchaka in branch '2.7': Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions. http://hg.python.org/cpython/rev/26068bfec70e New changeset d04259af01ff by Serhiy Storchaka in branch '3.3': Issue

[issue16316] Support xz compression in mimetypes module

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Have backported. -- resolution: - fixed status: open - closed versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16316 ___

[issue15809] IDLE console uses incorrect encoding.

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there are no objections I will commit the patch soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15809 ___

[issue16945] rewrite CGIHTTPRequestHandler to always use subprocess

2013-05-04 Thread Charles-François Natali
Charles-François Natali added the comment: The latest version of the patch passes on Linux, OpenIndiana and Windows. Note that I did apply the select()-hack on all platforms (not only Windows), because if I understood #427345 correctly, it's really there to bypass a non-standard IE behavior

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: The idea is that the output of pprint should be something like (once #17530 is applied): pprint.pprint(b'\x7fELF\x01\x01\x01\x00\x00\n\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00\x01') (b'\x7fELF\x01\x01\x01\x00\x00\n\x00\x00'

[issue17819] removes need for CONFIG_SITE external configuration

2013-05-04 Thread Antonio Cavallo
Antonio Cavallo added the comment: So far it seems the special handling in config.site is restricted to these two bits ptc/ptmx (I'm targeting android in cross compiling at the moment). -- ___ Python tracker rep...@bugs.python.org

[issue17905] Add check for locale.h

2013-05-04 Thread Antonio Cavallo
New submission from Antonio Cavallo: This patch adds autoconf.ac check for the locale.h file in addition to langinfo.h. The patch contains also a fix to Python/fileutils.c file. The android ndk provides locale.h but no langinfo.h: this fixes the issue. BTW bionic doesn't have any runtime

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here are some numbers: # Without the patch $ ./python -m timeit -s import pickle, io; d=pickle.dumps(list(range(1000)), 4); b=io.BytesIO(d) b.seek(0); pickle.load(b) 1 loops, best of 3: 180 usec per loop $ ./python -m timeit -s import pickle, _pyio as

[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Inspired by simplejson issue [1] which is related to standard json module too. JSON parser 3.3+ and wide builds of 3.2- raise an error on invalid strings (i.e. with unpaired surrogate), while narrow builds and some third-party parsers. Wide builds are

[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f82b68c1f28 by Ezio Melotti in branch '3.3': #7855: Add tests for ctypes/winreg for issues found in IronPython. Initial patch by Dino Viehland. http://hg.python.org/cpython/rev/5f82b68c1f28 New changeset df655ebf74d7 by Ezio Melotti in branch

[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e71406d8ed5d by Ezio Melotti in branch '2.7': #7855: Add tests for ctypes/winreg for issues found in IronPython. Initial patch by Dino Viehland. http://hg.python.org/cpython/rev/e71406d8ed5d -- ___

[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: This should be fixed now. Thanks for the report and the patch (and thanks Zach for confirming that it works on Windows and for the review)! -- assignee: dino.viehland - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status:

[issue16518] add buffer protocol to glossary

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 003e4eb92683 by Ezio Melotti in branch '3.3': #16518: use bytes-like object throughout the docs. http://hg.python.org/cpython/rev/003e4eb92683 New changeset d4912244cce6 by Ezio Melotti in branch 'default': #16518: merge with 3.3.

[issue16518] add buffer protocol to glossary

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: The attached patch uses bytes-like objects in the error messages. -- Added file: http://bugs.python.org/file30124/issue16518-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518

[issue17904] bytes should be listed as built-in function for 2.7

2013-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17904 ___ ___ Python-bugs-list

[issue17859] improve error message for saving ints to file

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: binary-mode write requires bytes-like object, not 'int' Looks like the function that raises the error (Objects/abstract.c:352) doesn't have enough information to produce a message like that. I attached a patch to #16518 that improves this and other error

[issue17901] _elementtree.TreeBuilder raises IndexError on end if constructed with element_factory=None

2013-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +eli.bendersky stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17901 ___

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand your question. Do you never print some data at the command-line prompt? Or even as part of small test programs? To be honest, I very rarely even use pprint. I'm too lazy to import it. If I want to quickly get a hexdump, I use something

[issue17868] pprint long non-printable bytes as hexdump

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le samedi 04 mai 2013 à 15:41 +, Serhiy Storchaka a écrit : Which is why the proposal doesn't fit well with pprint/pformat. Perhaps I misunderstood your wish. I'm not against consider pprint as a black box, which does all good magic inside by default.

[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-05-04 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- components: +Interpreter Core -Distutils2, Library (Lib) versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1298835

[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-05-04 Thread Éric Araujo
Éric Araujo added the comment: Adding Nick to this discussion, since distutils-sig is talking about these issues right now. Previous discussions: http://mail.python.org/pipermail/python-list/2005-September/345116.html http://mail.python.org/pipermail/python-dev/2005-September/056682.html

[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wonder if json should simply be less strict by default. If you pass the raw unescaped character, the json module accepts it: json.loads('{a: \ud8e9}') {'a': '\ud8e9'} It's only if you pass the escaped representation that json rejects it: json.loads('{a:

[issue17906] Add a string error handler to JSON encoder/decoder

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: See also #11489. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17906 ___ ___ Python-bugs-list mailing list

[issue17854] symmetric difference operation applicable to more than two sets

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: Return a new set with elements in an odd number of the sets. This wording is not really clear to me. IMHO the documentation is fine as is. The evaluation order works as usual, and, since the symmetric difference is an associative (and commutative) operation,

[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-05-04 Thread Nick Coghlan
Nick Coghlan added the comment: The discussion on distutils-sig that Éric is referring to is one were I ended up pointing out that PEP 439 (bootstrapping pip in 3.4) needs to address this in some manner, so that pip (which installs to site-packages) doesn't end up fighting with system package

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW I'm +1 about adding grouper(), since it happened to me to use it and suggest more often than any other recipe (I think it's the only recipe I used/know), and even more often than some of the current itertools. The fact that has been requested several times

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-05-04 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17862 ___ ___

[issue17877] Skip test_variable_tzname when the zoneinfo database is missing

2013-05-04 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17877 ___

[issue17887] docs: summary page - generator vs iterator vs iterable

2013-05-04 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: - enhancement versions: +Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17887

[issue17890] argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors

2013-05-04 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: I am not sure if I am missing something. I had filled out the form at http://www.python.org/psf/contrib/contrib-form/ on the day I submitted the patch and even got back an email from Ewa Jodlowska. However, I don't see any * after my name. I submitted the

[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-05-04 Thread Matthias Klose
Matthias Klose added the comment: there is more than one thing addressed with the 'dist-packages' choice of name. The primary reason is to have a directory where you only find python packages as distributed by the linux distribution, and where installers do not install to by default. Even if

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e39a8f8ceb9f by Brett Cannon in branch 'default': #17115,17116: Have modules initialize the __package__ and __loader__ http://hg.python.org/cpython/rev/e39a8f8ceb9f -- nosy: +python-dev ___ Python

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17115 ___

[issue17116] xml.parsers.expat.(errors|model) don't set the __loader__ attribute

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: New changeset e39a8f8ceb9f by Brett Cannon in branch 'default': #17115,17116: Have modules initialize the __package__ and __loader__ http://hg.python.org/cpython/rev/e39a8f8ceb9f -- resolution: - fixed stage: - committed/rejected status: open - closed

[issue17894] Edits to descriptor howto

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: Attached a patch that rephrases part of the suggestions made by Ned. -- nosy: +ezio.melotti Added file: http://bugs.python.org/file30125/issue17894.diff ___ Python tracker rep...@bugs.python.org

[issue5845] rlcompleter should be enabled automatically

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset d5ef330bac50 by Antoine Pitrou in branch 'default': Issue #5845: Enable tab-completion in the interactive interpreter by default, thanks to a new sys.__interactivehook__. http://hg.python.org/cpython/rev/d5ef330bac50 -- nosy: +python-dev

[issue5845] rlcompleter should be enabled automatically

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: End-users will hopefully rejoice :) -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845

[issue17177] Document/deprecate imp

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: Just to keep on top of what is left to do for this to happen: * get_magic(): expose in importlib * find_module()/load_module(): eliminate all uses in the stdlib and fully deprecate * new_module(): use types.ModuleType() instead * reload(): relocate *

[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-05-04 Thread Brett Cannon
New submission from Brett Cannon: imp.new_module() does not need to exist since code can use types.ModuleType's constructor. -- components: Library (Lib) keywords: easy messages: 188388 nosy: brett.cannon priority: low severity: normal stage: test needed status: open title: Deprecate

[issue17177] Document/deprecate imp

2013-05-04 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: +Deprecate imp.new_module() in favour of types.ModuleType ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177 ___

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: Some buildbots are failing after this: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/7840 http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/4536 FAIL: test_everyone_has___loader__

[issue17177] Document/deprecate imp

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: While thinking about asking on G+ for feedback, I realized that if I get this to the point of a module-level warning, it won't be a big deal. It would be just like warnings you deal with when supporting old versions of Python along with newer versions where

[issue17177] Document/deprecate imp

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: This might be OK, however you won't be able to point to the alternatives in the deprecation message (e.g. new_module() is deprecated, use types.ModuleType() instead). This can still be done in the docs though. -- ___

[issue17177] Document/deprecate imp

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: Right, the docs would say the imp modules is deprecated; please see the module documentation for alternatives or something. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177

[issue17408] second python execution fails when embedding

2013-05-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8c1385205a35 by Antoine Pitrou in branch '3.3': Issue #17408: Avoid using an obsolete instance of the copyreg module when the interpreter is shutdown and then started again. http://hg.python.org/cpython/rev/8c1385205a35 New changeset 0b34fd75b937

[issue17882] test_objecttypes fails for 3.2.4 on CentOS 6

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: 3.2 only gets security fixes, can you try with 3.3/default and see if it fails there? (The devguide has instructions about getting an updated clone and testing on 3.3/default if you need them.) -- nosy: +benjamin.peterson, ezio.melotti, loewis type: -

[issue17408] second python execution fails when embedding

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for reporting! This should be fixed now. -- components: +Interpreter Core -None nosy: +pitrou resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: +Python 3.4 ___

[issue17115] __loader__ = None should be fine

2013-05-04 Thread Brett Cannon
Brett Cannon added the comment: It's because test_pydoc is actively deleting the __loader__ of a test module. I'll have a look to figure out why it's doing that. -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org

[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: So, could you propose a patch? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16742 ___ ___

[issue10363] Embedded python, handle (memory) leak

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Closing as the original issue is fixed. Other leaks should be reported as separate issues. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue15809] IDLE console uses incorrect encoding.

2013-05-04 Thread Roger Serwy
Roger Serwy added the comment: There is a problem. Adding the encoding comment to the top of the source causes off-by-one line errors in the traceback. Take as an example: 1/0 Traceback (most recent call last): File pyshell#0, line 2, in module ZeroDivisionError: integer division or

[issue1545463] New-style classes fail to cleanup attributes

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch adding a call to gc.collect() after cleaning up most modules, with tests. -- keywords: +patch nosy: +ncoghlan stage: commit review - patch review type: resource usage - enhancement versions: +Python 3.4 -Python 3.2 Added file:

[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This avenue doesn't look promising at all. Closing. -- resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2262

[issue17806] Add keyword args support to str/bytes.expandtabs()

2013-05-04 Thread Mark Dickinson
Mark Dickinson added the comment: For me s.expandtabs(3) looks more readable than s.expandtabs(tabsize=3). I disagree: I think the second is more readable, and I think it's especially helpful to those not intimately familiar with the language (which probably accounts for the vast majority

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: +1 for iterdir. However, if we get a separate scandir() returning entries with attributes, is iterdir() still useful? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406

[issue16518] add buffer protocol to glossary

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The attached patch uses bytes-like objects in the error messages. I'm surprised your patch doesn't touch Python/getargs.c. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518

[issue16445] SEGFAULT when deleting Exception.message

2013-05-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This looks like it is fixed by Mark's commit. Other proposals should go into separate issues. -- nosy: +pitrou resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: -Python 3.2, Python 3.3, Python 3.4

[issue17705] Fill Character cannot be \0

2013-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17705 ___ ___ Python-bugs-list

[issue16518] add buffer protocol to glossary

2013-05-04 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW I was grepping for buffer protocol/interface/api, and then double-checking for buffer in the resulting files. Python/getargs.c doesn't seem to mention the buffer protocol/interface/api at all. -- ___ Python

  1   2   >