ANN: PyNSource - Python UML tool - 1.6 released

2012-09-01 Thread Andy Bulka
Hi All, Announcing PyNSource 1.6 with numerous new features. http://www.andypatterns.com/index.php/products/pynsource/ Reverse engineer python source code into UML. Version 1.6 - New animated spring layout algorithm - Toggle between normal and Ascii UML view - Colour sibling subclasses to

ANN: gcc-python-plugin 0.10

2012-09-01 Thread David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the CPython interpreter within GCC, allowing you to write new compiler warnings for C/C++ in Python, generate code visualizations, etc. It comes with cpychecker: a tool for static analysis tool of CPython extensions. Tarball releases

Cython 0.17 released

2012-09-01 Thread Stefan Behnel
Hello everyone, on behalf of the Cython project team, I'm proud to announce the final release of Cython 0.17. This is another major step forward in the development of the Cython programming language that will make life easier for a lot of users, rounds up some rough edges of the compiler and adds

PyTexas: last day for $25 registration, talk proposal

2012-09-01 Thread Brad Allen
Just wanted to send out this quick reminder--today is the last day for PyTexas $25 registration; starting tomorrow it will cost $50. http://www.pytexas.org/chance/1/register/ Today is also your last day to post your talk proposals. http://www.pytexas.org/chance/1/talks/add/ Btw, there

ANN: A new version (0.3.1) of the Python module which wraps GnuPG has been released.

2012-09-01 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been released. What Changed? = This is a minor enhancement and bug-fix release. See the project website ( http://code.google.com/p/python-gnupg/ ) for more information. Summary: Better support for status messages from GnuPG.

ANN: PipeController v0.1 released: Python tool to experiment with simulating UNIX-style pipes

2012-09-01 Thread vasudevram
PipeController is a tool that I wrote to experiment with simulating simple, sequential, synchronous UNIX-style pipes in Python. It is the first release - v0.1. Blog post about PipeController: http://jugad2.blogspot.in/2012/08/pipecontroller-v01-released-simulating.html The blog post gives

Re: PyTexas: last day for $25 registration, talk proposal

2012-09-01 Thread Brad Allen
Whoops, false alarm. Tomorrow, August 31 is actually the last day to register and pay at the $25 rate for PyTexas. Likewise for talk proposals. On Thu, Aug 30, 2012 at 3:36 PM, Brad Allen bradallen...@gmail.com wrote: Just wanted to send out this quick reminder--today is the last day for

[ANN] guidata v1.5.0

2012-09-01 Thread Pierre.RAYBAUT
Hi all, I am pleased to announce that `guidata` v1.5.0 has been released (http://guidata.googlecode.com). Based on the Qt Python binding module PyQt4 (and mostly compatible with PySide), guidata is a Python library generating graphical user interfaces for easy dataset editing and display. It

[ANN] guiqwt v2.2.0

2012-09-01 Thread Pierre.RAYBAUT
Hi all, I am pleased to announce that `guiqwt` v2.2.0 has been released (http://guiqwt.googlecode.com). Based on PyQwt (plotting widgets for PyQt4 graphical user interfaces) and on the scientific modules NumPy and SciPy, guiqwt is a Python library providing efficient 2D data-plotting features

Twisted 12.2.0 released

2012-09-01 Thread Ashwini Oruganti
On behalf of Twisted Matrix Laboratories, I am honored to announce the release of Twisted 12.2. Highlights for this release include: * To be able to work on Python3 support, Python 2.5 is no longer supported. * twisted.mail.imap4 now serves BODYSTRUCTURE responses which provide more

Re: why i can't set locale?

2012-09-01 Thread Peter Otten
contro opinion wrote: locale.setlocale(locale.LC_ALL, 'gbk') Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/locale.py, line 513, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting Try picking one of

Re: how to get character hex number?

2012-09-01 Thread Peter Otten
Tim Chase wrote: On 08/31/12 22:41, contro opinion wrote: uenglish.encode(utf-8) 'english' uenglish.encode(ascii) 'english' how can i get 656e676c697368 in encode method? At least in 2.x, you can do: uenglish.encode(hex) '656e676c697368' how about in python3.0? Well, in 3.1.3

Re: how to get character hex number?

2012-09-01 Thread Mark Lawrence
On 01/09/2012 04:50, Tim Chase wrote: Well, in 3.1.3 at least, using the u... notation dies on me with an invalid syntax. However, as Ian suggests, you can do my_str = english .join(%02x % c for c in my_str.encode(ascii)) or whatever other encoding you want instead of ascii. -tkc

Re: Tkinter bug in Entry widgets on OS X

2012-09-01 Thread Arnaud Delobelle
On Friday, 31 August 2012, Dennis Lee Bieber wrote: On Fri, 31 Aug 2012 15:41:01 GMT, Alister alister.w...@ntlworld.comjavascript:; declaimed the following in gmane.comp.python.general: I agree that it is unexpected in a single line entry box but isn't the 1st rule of user interface

Re: Tkinter bug in Entry widgets on OS X

2012-09-01 Thread Peter Otten
Arnaud Delobelle wrote: On Friday, 31 August 2012, Dennis Lee Bieber wrote: On Fri, 31 Aug 2012 15:41:01 GMT, Alister alister.w...@ntlworld.comjavascript:; declaimed the following in gmane.comp.python.general: I agree that it is unexpected in a single line entry box but isn't the 1st

Re: how to get character hex number?

2012-09-01 Thread Tim Chase
On 09/01/12 03:49, Mark Lawrence wrote: On 01/09/2012 04:50, Tim Chase wrote: Well, in 3.1.3 at least, using the u... notation dies on me with an invalid syntax. The u... notation has been reintroducd for Python 3.3 Nice to know--it makes writing backwards compat. code just a bit easier,

Re: to know binary

2012-09-01 Thread Laszlo Nagy
On 2012-09-01 06:15, contro opinion wrote: there is a only line in the file nanmed test: 1234 when i open it whit xxd xxd test what i get is : 000: 3132 3334 0a 1234. can you explain it ? At offset zero (00): chr(0x31) + chr(0x32)+ chr(0x33)+ chr(0x33)+

Re: Tkinter bug in Entry widgets on OS X

2012-09-01 Thread Arnaud Delobelle
On 1 September 2012 11:30, Peter Otten __pete...@web.de wrote: Arnaud Delobelle wrote: It would be good if I could intercept the key press event and cancel its action on the Entry widget. It's easy to intercept the key event, but I haven't found out how to prevent the funny characters from

Re: Looking for an IPC solution

2012-09-01 Thread Wolfgang Keller
There are just so many IPC modules out there. I'm looking for a solution for developing a new a multi-tier application. The core application will be running on a single computer, so the IPC should be using shared memory (or mmap) and have very short response times. Probably the fastest I/RPC

Twisted 12.2.0 released

2012-09-01 Thread Ashwini Oruganti
On behalf of Twisted Matrix Laboratories, I am honored to announce the release of Twisted 12.2. Highlights for this release include: * To be able to work on Python3 support, Python 2.5 is no longer supported. * twisted.mail.imap4 now serves BODYSTRUCTURE responses which provide more

Re: interfacing with x86_64 assembler

2012-09-01 Thread Ramchandra Apte
On Friday, 31 August 2012 19:28:11 UTC+5:30, Grant Edwards wrote: On 2012-08-31, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/08/2012 14:40, lipska the kat wrote: I was hacking away at some x86_64 assembler today when I found myself obsessively indenting my code by

Re: PipeController v0.1 - experimental tool to simulate simple UNIX-style pipes in Python

2012-09-01 Thread Ramchandra Apte
On Friday, 31 August 2012 03:27:54 UTC+5:30, vasudevram wrote: I wrote PipeController recently to experiment with doing UNIX-style pipes in Python. Blog post about it: http://jugad2.blogspot.in/2012/08/pipecontroller-v01-released-simulating.html The blog post has a link to

Re: KAJOL SEX VIDEOS'''''''''''''''''''

2012-09-01 Thread raipervaiz786
On Thursday, August 2, 2012 9:35:25 PM UTC+5, devi wrote: KAJAL SEX VIDEOS http://maxworkerds.co.cc -- http://mail.python.org/mailman/listinfo/python-list

Re: Async client for PostgreSQL?

2012-09-01 Thread Werner Thie
On 8/31/12 7:17 PM, Laszlo Nagy wrote: Is there any extension for Python that can do async I/O for PostgreSQL with tornadoweb's ioloop? Something like: class MainHandler(tornado.web.RequestHandler): @tornado.web.asynchronous def get(self):

Re: PipeController v0.1 - experimental tool to simulate simple UNIX-style pipes in Python

2012-09-01 Thread Ian Kelly
Resending to the list... On Sep 1, 2012 12:19 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sep 1, 2012 9:37 AM, Ramchandra Apte maniandra...@gmail.com wrote: Doesn't the pipes module already do this? No, that deals with actual Unix pipes. This appears to be about pipelined processing

Re: Async client for PostgreSQL?

2012-09-01 Thread Laszlo Nagy
Hi does running on tornado imply that you would not consider twisted http://twistedmatrix.com ? If not, twisted has exactly this capability hiding long running queries on whatever db's behind deferToThread(). All right, I was reading its documentation

Re: Async client for PostgreSQL?

2012-09-01 Thread Werner Thie
On 9/1/12 9:28 AM, Laszlo Nagy wrote: Hi does running on tornado imply that you would not consider twisted http://twistedmatrix.com ? If not, twisted has exactly this capability hiding long running queries on whatever db's behind deferToThread(). All right, I was reading its documentation

Re: Async client for PostgreSQL?

2012-09-01 Thread jwp
On Friday, August 31, 2012 10:17:18 PM UTC-7, Laszlo Nagy wrote: Is there any extension for Python that can do async I/O for PostgreSQL As others point out, the easiest route is using one of the blocking drivers with threads and emulate async operations. However, the low-level parts of

ANN: A new version (0.3.1) of the Python module which wraps GnuPG has been released.

2012-09-01 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been released. What Changed? = This is a minor enhancement and bug-fix release. See the project website ( http://code.google.com/p/python-gnupg/ ) for more information. Summary: Better support for status messages from GnuPG.

Re: interfacing with x86_64 assembler

2012-09-01 Thread John Ladasky
I haven't seen this joke on the Net in years, does anyone still remember it? C combines the power of assembly language with the readability and maintainability of assembly language. -- http://mail.python.org/mailman/listinfo/python-list

Re: interfacing with x86_64 assembler

2012-09-01 Thread Chris Angelico
On Sun, Sep 2, 2012 at 10:10 AM, John Ladasky john_lada...@sbcglobal.net wrote: I haven't seen this joke on the Net in years, does anyone still remember it? C combines the power of assembly language with the readability and maintainability of assembly language. Seen it, and it has validity.

Re: Looking for an IPC solution

2012-09-01 Thread Aaron Brady
On Friday, August 31, 2012 2:22:00 PM UTC-5, Laszlo Nagy wrote: There are just so many IPC modules out there. I'm looking for a solution for developing a new a multi-tier application. The core application will be running on a single computer, so the IPC should be using shared memory

Accessing AST at runtime

2012-09-01 Thread alessandromoura35
Hi, I would like to access the AST of a python object at runtime. I mean, if I have this: def f(x): return x*x/2 Is there any way to interrogate the object f to find out the AST of the expression x*x/2 ? Of course if the definition of f were in a file, I could use the ast module to parse it;

Re: Accessing AST at runtime

2012-09-01 Thread Ramchandra Apte
On Sunday, 2 September 2012 08:00:59 UTC+5:30, (unknown) wrote: Hi, I would like to access the AST of a python object at runtime. I mean, if I have this: def f(x): return x*x/2 Is there any way to interrogate the object f to find out the AST of the expression x*x/2 ? Of

Re: interfacing with x86_64 assembler

2012-09-01 Thread Ramchandra Apte
On Sunday, 2 September 2012 06:06:06 UTC+5:30, Chris Angelico wrote: On Sun, Sep 2, 2012 at 10:10 AM, John Ladasky john_lada...@sbcglobal.net wrote: I haven't seen this joke on the Net in years, does anyone still remember it? C combines the power of assembly language with the

Re: py2c - an open source Python to C/C++ is looking for developers

2012-09-01 Thread Ramchandra Apte
On Tuesday, 31 July 2012 18:16:27 UTC+5:30, Stefan Behnel wrote: Stefan Behnel, 31.07.2012 07:23: From a look at the source code, it seems hard to bring it together with anything. It looks very monolithic. Hmm, sorry, I mixed it up with 2c.py, which is yet another of those

Re: Curses unicode support

2012-09-01 Thread cjgohlke
On Saturday, September 1, 2012 3:41:04 PM UTC-7, Steven D'Aprano wrote: Thanks to Victor Stinner, the curses module now has improved Unicode support. http://mail.python.org/pipermail/python-dev/2012-September/121569.html Victor has asked for testers to report any bugs in the

Re: py2c - an open source Python to C/C++ is looking for developers

2012-09-01 Thread Michael Torrie
On 09/01/2012 09:15 PM, Ramchandra Apte wrote: It converts to *pure* C/C++ *without* using Python or its API so that it can be the same speed as C/C++ Sounds like a fun project for you. I hope you learn a lot doing it. That's reason enough for it. Do you plan to port all the standard python

[issue15821] PyMemoryView_FromBuffer() behavior change (possible regression)

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: In general, the number of calls to PyObject_GetBuffer() must be equal to the number of calls to PyBuffer_Release(), otherwise bad things will happen in the same way as with malloc()/free(). Now, in my test case I omitted the call to PyObject_GetBuffer() *with*

[issue15837] Added test to test_random.py testing Random.shuffle

2012-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The int=int is probably some sort of micro-optimization and perhaps should be removed. Agree, this micro-optimization has no effect here. -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org

[issue15837] Added test to test_random.py testing Random.shuffle

2012-09-01 Thread Alessandro Moura
Alessandro Moura added the comment: Sorry, here it is the patch. -- keywords: +patch Added file: http://bugs.python.org/file27082/random.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15837

[issue14783] Make int() and str() docstrings correct

2012-09-01 Thread Ezio Melotti
Ezio Melotti added the comment: The issues about weird signatures are being discussed on #15831. However, this issue is about the docstring. Leave it incorrect? Change it to the hard-to-parse one liner? Change it to a two-line signature also? For the docstring it's ok to use the double

[issue15826] Increased test coverage of test_glob.py

2012-09-01 Thread Alessandro Moura
Alessandro Moura added the comment: test_bytes_glob_directory_with_trailing_slash already has a counterpart in the main class, but it is not easily handled by overriding self.glob and self.norm. Since it is only a single test, I just decided to override test_glob_directory_with_trailing_slash

[issue14042] json.dumps() documentation is slightly incorrect.

2012-09-01 Thread Petri Lehtinen
Petri Lehtinen added the comment: Fixed, see #13769. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14042 ___ ___ Python-bugs-list mailing list

[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2012-09-01 Thread Ned Deily
Ned Deily added the comment: The problem here is in the libinstall Makefile target and that hidden dependency within lib2to3 that, as Tomi notes, causes lib2to3 to try to recreate the pickles anytime it runs if it thinks they are out of date. The fixes for Issue15645 cause the recipes for

[issue15748] Various symlink test failures in test_shutil on FreeBSD

2012-09-01 Thread Trent Nelson
Trent Nelson added the comment: Not really... the problem is that the chmod 0007 actually corrupts the ZFS metadata regarding the symlink by always setting the length to 24. Andriy did some debugging here: http://lists.freebsd.org/pipermail/freebsd-fs/2012-August/015005.html So, the link

[issue15802] Nonsensical test for mailbox

2012-09-01 Thread Petri Lehtinen
Petri Lehtinen added the comment: Techincally, converting to int is not necessary, because the number of digits in the unix timestamp doesn't change until year 2286 :) The patch looks good to me. I don't think comparing pairs would be any more readable than what the proposed patch does.

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: Here's a patch that enforces byte formats. Does everyone agree on (or tolerate at least) allowing 'B', 'b' and 'c'? I think we should at least commit the doc patch for 3.3.0. Otherwise implementors of exporting objects might waste time on a feature that's

[issue15838] make install tries to create lib2to3 grammar pickles in source directory

2012-09-01 Thread Ned Deily
New submission from Ned Deily: With the recent activity around making out-of-tree builds work, while investigating Issue15822 I realized that the lib2to3 grammar pickle files are being built in the source directory by the libinstall target step of the main Makefile rather than in the build

[issue15802] Nonsensical test for mailbox

2012-09-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset aef4a2ba3210 by Petri Lehtinen in branch '3.2': #15802: Fix test logic in TestMaildir.test_create_tmp http://hg.python.org/cpython/rev/aef4a2ba3210 New changeset 2370e331241b by Petri Lehtinen in branch '2.7': #15802: Fix test logic in

[issue15802] Nonsensical test for mailbox

2012-09-01 Thread Petri Lehtinen
Petri Lehtinen added the comment: Fixed, thanks. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15802

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for docs patch for 3.3.0 and then enforcing the format restriction for 3.3.1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15814 ___

[issue15795] Zipfile.extractall does not preserve file permissions

2012-09-01 Thread Alexey Boriskin
Changes by Alexey Boriskin sun.v...@gmail.com: -- hgrepos: +147 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15795 ___ ___ Python-bugs-list

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 895e123d9476 by Stefan Krah in branch 'default': Issue #15814: Document planned restrictions for memoryview hashes in 3.3.1. http://hg.python.org/cpython/rev/895e123d9476 -- nosy: +python-dev ___ Python

[issue14223] curses addch broken on Python3.3a1

2012-09-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 27b5bd5f0e4c by Victor Stinner in branch 'default': Close #14223: Fix window.addch(curses.ACS_HLINE) http://hg.python.org/cpython/rev/27b5bd5f0e4c -- resolution: - fixed status: open - closed ___ Python

[issue15795] Zipfile.extractall does not preserve file permissions

2012-09-01 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- hgrepos: -147 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15795 ___ ___ Python-bugs-list

[issue15795] Zipfile.extractall does not preserve file permissions

2012-09-01 Thread Alexey Boriskin
Alexey Boriskin added the comment: I'm attaching a patch, which solves the issue. Patch intoduces new argument preserve_permissions for extract and extractall methods. That argument may accept one of the three values: do not preserve permissions, preserve a safe subset of them or preserve all

[issue14223] curses addch broken on Python3.3a1

2012-09-01 Thread STINNER Victor
STINNER Victor added the comment: I'm reopening this bug because I've noticed that in Python3.3rc1, although trying to print curses.ACS_HLINE and other such characters no long cause an Exception, only blank characters are printed to the screen. If the Python curses module is compiled in

[issue14223] curses addch broken on Python3.3a1

2012-09-01 Thread STINNER Victor
STINNER Victor added the comment: (keep the issue open until the fix is included in Georg's repository) -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14223

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-09-01 Thread STINNER Victor
STINNER Victor added the comment: @georg.brandl: Can you please include the important fix c58789634d22 into Python 3.3 final? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15785 ___

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 01.09.12 13:22, schrieb Stefan Krah: Does everyone agree on (or tolerate at least) allowing 'B', 'b' and 'c'? Why be more permissive than necessary? -0 on the committed version; it should IMO further restrict it to 1D contiguous byte arrays. --

[issue15839] SystemError raised by super() should be NameError or RuntimeError

2012-09-01 Thread Ramchandra Apte
New submission from Ramchandra Apte: Running the erronous code: class X: super_object = super() fails with a SystemError(super(): __class__ cell not found) The exception should be a NameError or SystemError. -- components: None messages: 169634 nosy: ramchandra.apte priority:

[issue15839] SystemError raised by super() in erronous class should be NameError or RuntimeError

2012-09-01 Thread Ramchandra Apte
Changes by Ramchandra Apte maniandra...@gmail.com: -- title: SystemError raised by super() should be NameError or RuntimeError - SystemError raised by super() in erronous class should be NameError or RuntimeError ___ Python tracker

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: The FreeBSD machine decided to hang for 1h: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/3340/steps/test/logs/stdio If I'm running the tests manually, they take over half an hour and I get:

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: Martin v. L??wis rep...@bugs.python.org wrote: Why be more permissive than necessary? -0 on the committed version; it should IMO further restrict it to 1D contiguous byte arrays. Does byte arrays include 'b' and 'c' or just 'B'? I don't see a reason to allow

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: I see that in the following build test_threading also fails, so I wouldn't spend too much time on debugging test_threaded_import: == FAIL: test_waitfor_timeout

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sep 1, 2012, at 10:24 AM, Stefan Krah rep...@bugs.python.org wrote: The definition hash(m) == hash(m.tobytes()) is pretty straightforward. I probably missed something from the early discussion, but doesn't this definition only work for 1d (or 0d)

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I see that in the following build test_threading also fails, so I wouldn't spend too much time on debugging test_threaded_import: Did something change recently on that machine? It's supposed to be a stable buildbot. --

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: Nothing changed on the buildbot. -- It appears that FreeBSD is unable to handle the low switchinterval. With the patch test_threaded_import runs in 10s. Since Linux has no problems whatsoever, I'm inclined to think that's a FreeBSD issue. I've yet to check if

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: tobytes() is the same as the flattened multi-dimensional list representation with all elements converted to bytes. If I'm not mistaken, that's how NumPy's tostring() behaves. -- ___ Python tracker rep...@bugs.python.org

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sep 1, 2012, at 11:06 AM, Stefan Krah rep...@bugs.python.org wrote: tobytes() is the same as the flattened multi-dimensional list representation with all elements converted to bytes. This is correct, but why is it desirable to have deliberate hash

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Nick Coghlan
Nick Coghlan added the comment: Keep in mind that its OK if hash(m) == hash(m.tobytes()) in some cases where m != m.tobytes(). The only cases we really need to kill are those that break the hash invariant. I don't like the idea of making the definition of hash more complicated just to rule

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: why is it desirable to have deliberate hash collisions between views with different shapes? Since we're now restricting everything to bytes, the multi-dimensional case is probably not useful at all. As I said above, I would leave it in because it actually saves

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 01.09.12 16:24, schrieb Stefan Krah: Does byte arrays include 'b' and 'c' or just 'B'? I don't see a reason to allow 'B' but not the others. Either type is fine with me. It's the multi-dimensional aspect I'd like to ban. My reasoning was: If

[issue15523] Block on close TCP socket in SocketServer.py

2012-09-01 Thread Charles-François Natali
Charles-François Natali added the comment: So when calling close_request to deallocate the socket, it will always be waiting to read response until response data is available. It seems like an issue in SokcetServer.py library. Hum, I don't see what you mean. Even if there is still data in

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-01 Thread Georg Brandl
Georg Brandl added the comment: +1 for multiple signatures. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15831 ___ ___ Python-bugs-list

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: Disallowing non-contiguous arrays leads to very strange situations though. I'm positive that there will be a bug report about this: x = memoryview(b'abc')[::-1] b = b'cba' d = {b'cba': 101} b in d True x == b True x in d Traceback (most recent call last):

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: (The double signature might be easier to understand, but the original issue should probably be fixed in Sphinx, even if we decide to stop using this kind of signature.) I filed an issue for this in the Sphinx tracker here:

[issue14385] Support other types than dict for __builtins__

2012-09-01 Thread Martijn Pieters
Martijn Pieters added the comment: I note that the documentation still states a dictionary is required for globals. Should that not be updated as well? See http://docs.python.org/py3k/library/functions.html#exec -- nosy: +mjpieters ___ Python

[issue14385] Support other types than dict for __builtins__

2012-09-01 Thread Martijn Pieters
Martijn Pieters added the comment: Apologies, I meant to link to the dev docs: http://docs.python.org/dev/library/functions.html#exec -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14385

[issue15831] comma after leading optional argument is after bracket in docs

2012-09-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: I will prepare a patch (multiple signatures, for the Python fix). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15831 ___

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2012-09-01 Thread Michael Foord
Michael Foord added the comment: Yep, certainly worth fixing. When 3.3 is out the door I will look at applying this to all branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15836

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 01.09.12 19:20, schrieb Stefan Krah: Disallowing non-contiguous arrays leads to very strange situations though. I don't find that strange. That two object compare equal doesn't imply that they both hash - only that *if* they hash, they should hash equal.

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2012-09-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15836 ___ ___

[issue11866] race condition in threading._newname()

2012-09-01 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11866 ___ ___

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Could we perhaps take a small poll? My own vote is: 1) Allow bytes hashing at all: +0.5 +10. The buffer() object in 2.x was hashable, and a very important use case of memoryview is replacing buffer(). 2) If 1) is allowed, then also non-contiguous hashing

[issue11866] race condition in threading._newname()

2012-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: With or without Raymond's suggested change, global _counter is not necessary anymore. Note that this fix only works on implementations where itertools.count().next is atomic. -- ___ Python tracker

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Stefan Krah
Stefan Krah added the comment: py x = memoryview(array.array('B',b'cba')) I find the array example is different. The user has to remember one thing: memoryviews based on arrays don't hash. For memoryviews based on bytes one would have to remember: - 'B', 'c' and 'b' hash - only

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2012-09-01 Thread R. David Murray
R. David Murray added the comment: Since it is a bugfix it can be applied at any time now. Checkins to default will end up in 3.3.1 and 3.4. (Only features need to wait until after 3.3 is branched in the main repo.) -- ___ Python tracker

[issue15814] memoryview: equality-hash invariant

2012-09-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 01.09.12 20:06, schrieb Stefan Krah: - b'abc'[::-1] hashes, but memoryview(b'abc')[::-1] does not I find that memoryview(b'abc')[::-1] is a strange thing to have, anyway, so I'm not bothered by it behaving different. I can accept that it needs to be

[issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance

2012-09-01 Thread Alexander Konovalenko
New submission from Alexander Konovalenko: Two pieces of the documentation for io.IOBase seem to contradict each other: At http://docs.python.org/library/io.html#io.IOBase: Note that calling any method (even inquiries) on a closed stream is undefined. Implementations may raise IOError in this

[issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0

2012-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since Linux has no problems whatsoever, I'm inclined to think that's a FreeBSD issue. Maybe. If you believe it's so, I guess the patch can be committed. -- ___ Python tracker rep...@bugs.python.org

[issue1528167] Tweak to make string.Templates more customizable

2012-09-01 Thread R. David Murray
R. David Murray added the comment: I don't think this closure was appropriate. The idea was accepted twice and argued against once, so it isn't dead (it's just resting). -- assignee: barry - nosy: +r.david.murray resolution: wont fix - status: closed - open versions: +Python 3.4

[issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance

2012-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: 1) IOError and ValueError are not subclasses one of another. So what should we expect an IOBase implementation to raise? Ideally, ValueError should be raised, but I suspect some methods raise IOError instead. Undefined behavior means literally anything can

[issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance

2012-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, I would suggest we standardize the docs on raising ValueError as the official behaviour, and fix non-compliant behaviours as bugs. -- ___ Python tracker rep...@bugs.python.org

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-01 Thread Antoine Pitrou
New submission from Antoine Pitrou: f = io.StringIO() f.close() f.readable() True f.read() Traceback (most recent call last): File stdin, line 1, in module ValueError: I/O operation on closed file. f = io.BytesIO() f.close() f.readable() True f.read() Traceback (most recent call

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson, hynek, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15841 ___

[issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance

2012-09-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson, hynek, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15840 ___

[issue15842] Some SocketIO methods can succeed after close()

2012-09-01 Thread Antoine Pitrou
New submission from Antoine Pitrou: import socket s = socket.socket() f = s.makefile(rb, buffering=0) f socket.SocketIO object at 0x7f2f323cd790 f.close() f.writable() False f.readable() False -- components: IO, Library (Lib) messages: 169666 nosy: benjamin.peterson, hynek,

[issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance

2012-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Related: issue15841 and issue15842. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15840 ___ ___

  1   2   >