Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 2:39 PM, Nick Coghlan ncogh...@gmail.com wrote: On Wed, Feb 27, 2013 at 7:06 PM, Maciej Fijalkowski fij...@gmail.com wrote: 3. Cffi basicly contains a (limited) C parser, and those are notoriously hard to get exactly right. Luckily cffi only needs to interpret

Re: [Python-Dev] cffi in stdlib

2013-02-27 Thread Maciej Fijalkowski
On Wed, Feb 27, 2013 at 5:57 PM, Eli Bendersky eli...@gmail.com wrote: I read the cffi docs once again and went through some of the examples. I want to divide this to two topics. One is what you call the ABI level. IMHO, it's hands down superior to ctypes. Your readdir demo demonstrates

Re: [Python-Dev] cffi in stdlib

2013-02-28 Thread Maciej Fijalkowski
On Thu, Feb 28, 2013 at 10:27 AM, Paul Moore p.f.mo...@gmail.com wrote: On 27 February 2013 23:18, Armin Rigo ar...@tunes.org wrote: from cffi import FFI ffi = FFI() ffi.cdef( int MessageBox(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType); ) lib = ffi.dlopen(USER32.DLL)

[Python-Dev] High volumes and off topic discussions

2013-02-28 Thread Maciej Fijalkowski
Hi I know this is a hard topic, but python-dev is already incredibly high-volume and dragging discussion off-topic is making following important stuff (while ignoring unimportant stuff) very hard. For example in a recent topic cffi in stdlib I find a mail that says we have to find a sufficiently

Re: [Python-Dev] High volumes and off topic discussions

2013-02-28 Thread Maciej Fijalkowski
On Thu, Feb 28, 2013 at 4:03 PM, Antoine Pitrou solip...@pitrou.net wrote: Le Thu, 28 Feb 2013 13:36:10 +0200, Maciej Fijalkowski fij...@gmail.com a écrit : Hi I know this is a hard topic, but python-dev is already incredibly high-volume and dragging discussion off-topic is making following

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-03-02 Thread Maciej Fijalkowski
And I'd really like to see a CPython summit happen at some point. There's so much interesting stuff going on in that area that it's worth getting some people together to move these things forward. Yes, a CPython runtime summit some year would be interesting. Cheers, Nick. I don't see

Re: [Python-Dev] Python Language Summit at PyCon: Agenda

2013-03-04 Thread Maciej Fijalkowski
On Mon, Mar 4, 2013 at 8:41 PM, Antoine Pitrou solip...@pitrou.net wrote: On Mon, 4 Mar 2013 11:51:04 -0500 Barry Warsaw ba...@python.org wrote: On Mar 04, 2013, at 11:34 AM, Brett Cannon wrote: And One True Way of invoking and/or discovering how to invoke, a package's test suite. How

Re: [Python-Dev] Increase the code coverage of OS module

2013-03-22 Thread Maciej Fijalkowski
On Fri, Mar 22, 2013 at 2:28 AM, rakesh karanth rakeshg...@hotmail.com wrote: Hi python-dev, I'm interested in increasing the code coverage of the Python stdlib library OS Can some one who is already working on this or on a similar issue enlighten me on this? Thanks in advance. Hey You

Re: [Python-Dev] Simple IDLE issues to commit before Python 2.7.4 release in two weeks on 4/6/2013

2013-03-25 Thread Maciej Fijalkowski
On Mon, Mar 25, 2013 at 3:57 PM, Glyph gl...@twistedmatrix.com wrote: On Mar 25, 2013, at 1:40 PM, Benjamin Peterson benja...@python.org wrote: ... Assuming PEP 343 becomes policy ... Are you sure you got this PEP number right? The 'with' statement?

Re: [Python-Dev] noob contributions to unit tests

2013-03-26 Thread Maciej Fijalkowski
On Tue, Mar 26, 2013 at 4:49 PM, Sean Felipe Wolfe ether@gmail.com wrote: Hey everybody how are you all :) I am an intermediate-level python coder looking to get help out. I've been reading over the dev guide about helping increase test coverage --

Re: [Python-Dev] Accepting PEP 434, Idle Enhancement Exception

2013-03-29 Thread Maciej Fijalkowski
On Fri, Mar 29, 2013 at 6:33 PM, Nick Coghlan ncogh...@gmail.com wrote: I am accepting Todd Rovito's and Terry Reedy's PEP 434, officially declaring IDLE to be an application bundled with Python, with the contents of Lib/idlelib exempt from the usual no new features in maintenance releases

Re: [Python-Dev] Accepting PEP 434, Idle Enhancement Exception

2013-03-30 Thread Maciej Fijalkowski
On Sat, Mar 30, 2013 at 5:26 AM, Antoine Pitrou solip...@pitrou.net wrote: On Sat, 30 Mar 2013 08:33:38 +0200 Simon Cross hodgestar+python...@gmail.com wrote: Having a standalone version of IDLE might be really useful to alternative Python implementations. Why? I don't think it's worth

Re: [Python-Dev] Semantics of __int__(), __index__()

2013-04-02 Thread Maciej Fijalkowski
On Tue, Apr 2, 2013 at 10:53 AM, Mark Dickinson dicki...@gmail.com wrote: On Tue, Apr 2, 2013 at 9:33 AM, Mark Shannon m...@hotpy.org wrote: Hence my original question: what *should* the semantics be? I like Nick's answer to that: int *should* always return something of exact type int.

Re: [Python-Dev] could gevent be apart the standard Python library in future ?

2013-04-03 Thread Maciej Fijalkowski
On Wed, Apr 3, 2013 at 4:42 AM, iMath 2281570...@qq.com wrote: Hi, It will be my first post here. could gevent be apart the standard Python library in future ? Hi. Such question generally belongs to python-ideas. To start with you need to restart the question whether greenlets module

Re: [Python-Dev] The end of 2.7

2013-04-07 Thread Maciej Fijalkowski
On Sun, Apr 7, 2013 at 7:11 AM, mar...@v.loewis.de wrote: Quoting Benjamin Peterson benja...@python.org: This means we need to talk about how many more 2.7 releases there are going to be. At the release of 2.7.0, I thought we promised 5 years of bugfix maintenance, but my memory may be

Re: [Python-Dev] The end of 2.7

2013-04-07 Thread Maciej Fijalkowski
On Sun, Apr 7, 2013 at 9:44 AM, mar...@v.loewis.de wrote: Martin, you guys are shooting yourself in a foot. Almost noone uses python 3 in production, even at pycon, which is the more progressive crowd. There is a giant group of people using python that are not as vocal. While I bet some are

Re: [Python-Dev] The end of 2.7

2013-04-07 Thread Maciej Fijalkowski
On Sun, Apr 7, 2013 at 9:51 AM, mar...@v.loewis.de wrote: Quoting Lennart Regebro rege...@gmail.com: On Sun, Apr 7, 2013 at 7:11 AM, mar...@v.loewis.de wrote: Wrt. to the 3.x migration rate: I think this is a self-fulfilling prophecy. Migration rate will certainly increase once we

Re: [Python-Dev] The end of 2.7

2013-04-07 Thread Maciej Fijalkowski
On Sun, Apr 7, 2013 at 10:32 AM, Stefan Behnel stefan...@behnel.de wrote: Maciej Fijalkowski, 07.04.2013 10:12: On Sun, Apr 7, 2013 at 9:51 AM, martin...@v.loewis.de wrote: Quoting Lennart Regebro: On Sun, Apr 7, 2013 at 7:11 AM, martin...@v.loewis.de wrote: Wrt. to the 3.x migration rate

Re: [Python-Dev] The end of 2.7

2013-04-07 Thread Maciej Fijalkowski
On Sun, Apr 7, 2013 at 10:42 AM, Stefan Behnel stefan...@behnel.de wrote: Maciej Fijalkowski, 07.04.2013 10:37: On Sun, Apr 7, 2013 at 10:32 AM, Stefan Behnel wrote: Maciej Fijalkowski, 07.04.2013 10:12: On Sun, Apr 7, 2013 at 9:51 AM, martin...@v.loewis.de wrote: Quoting Lennart Regebro

Re: [Python-Dev] cpython (3.3): don't run frame if it has no stack (closes #17669)

2013-04-11 Thread Maciej Fijalkowski
On Thu, Apr 11, 2013 at 12:28 PM, Nick Coghlan ncogh...@gmail.com wrote: On 11 Apr 2013 07:49, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 10 Apr 2013 23:01:46 +0200 (CEST) benjamin.peterson python-check...@python.org wrote: http://hg.python.org/cpython/rev/35cb75b9d653 changeset:

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Maciej Fijalkowski
On Mon, Apr 15, 2013 at 9:56 AM, David Lam david.k.l...@gmail.com wrote: Recently I helped out on issue16954 which involved filling in docstrings for methods and classes in ElementTree.py While doing so, I tried to test my work in the interpreter like this... from xml.etree.ElementTree

[Python-Dev] libffi inclusion in python

2013-04-18 Thread Maciej Fijalkowski
Hi libffi has bugs sometimes (like this http://bugs.python.org/issue17580). Now this is a thing that upstream fixes really quickly, but tracking down issues on bugs.python.org is annoying (they never get commited as quickly as the upstream). is there a good reason why cpython has it's own copy of

Re: [Python-Dev] libffi inclusion in python

2013-04-18 Thread Maciej Fijalkowski
On Thu, Apr 18, 2013 at 2:47 PM, Benjamin Peterson benja...@python.org wrote: 2013/4/18 Maciej Fijalkowski fij...@gmail.com: Hi libffi has bugs sometimes (like this http://bugs.python.org/issue17580). Now this is a thing that upstream fixes really quickly, but tracking down issues

Re: [Python-Dev] libffi inclusion in python

2013-04-18 Thread Maciej Fijalkowski
On Thu, Apr 18, 2013 at 9:22 PM, Thomas Heller thel...@ctypes.org wrote: libffi has bugs sometimes (like this http://bugs.python.org/issue17580). Now this is a thing that upstream fixes really quickly, but tracking down issues on bugs.python.org is annoying (they never get commited as quickly

Re: [Python-Dev] PyPy, Jython, IronPython: Enum convenience function and pickleablity

2013-05-02 Thread Maciej Fijalkowski
On Thu, May 2, 2013 at 9:07 PM, Ethan Furman et...@stoneleaf.us wrote: In order for the Enum convenience function to be pickleable, we have this line of code in the metaclass: enum_class.__module__ = sys._getframe(1).f_globals['__name__'] This works fine for Cpython, but what about the

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-13 Thread Maciej Fijalkowski
On Sun, May 12, 2013 at 2:01 PM, Antoine Pitrou solip...@pitrou.net wrote: On Fri, 03 May 2013 12:43:41 +1000 Steven D'Aprano st...@pearwood.info wrote: On 03/05/13 11:29, Nick Coghlan wrote: An exchange in one of the enum threads prompted me to write down something I've occasionally

Re: [Python-Dev] weak refs in descriptors (http://bugs.python.org/issue17950)

2013-05-13 Thread Maciej Fijalkowski
On Mon, May 13, 2013 at 1:49 PM, Kristján Valur Jónsson krist...@ccpgames.com wrote: Hello python-dev. I‘m working on a patch to remove reference cycles from heap-allocated classes: http://bugs.python.org/issue17950 Part of the patch involves making sure that descriptors in the class

Re: [Python-Dev] More compact dictionaries with faster iteration

2013-05-15 Thread Maciej Fijalkowski
On Wed, May 15, 2013 at 2:36 PM, Christian Tismer tis...@stackless.com wrote: On 15.05.13 14:01, Stefan Drees wrote: Hi Chris, On 15.05.13 13:32 Christian Tismer wrote: Hi Raymond, On 08.01.13 15:49, Maciej Fijalkowski wrote: On Mon, Dec 10, 2012 at 3:44 AM, Raymond Hettinger

Re: [Python-Dev] More compact dictionaries with faster iteration

2013-05-19 Thread Maciej Fijalkowski
On Sun, May 19, 2013 at 7:27 AM, Raymond Hettinger raymond.hettin...@gmail.com wrote: On May 15, 2013, at 4:32 AM, Christian Tismer tis...@stackless.com wrote: What is the current status of this discussion? I'd like to know whether it is a considered alternative implementation. As far as I

Re: [Python-Dev] Ordering keyword dicts

2013-05-19 Thread Maciej Fijalkowski
On Sun, May 19, 2013 at 4:40 PM, Nick Coghlan ncogh...@gmail.com wrote: On Sun, May 19, 2013 at 11:01 PM, Antoine Pitrou solip...@pitrou.net wrote: The main use case seems to be the OrderedDict constructor itself. Otherwise, I can't think of any situation where I would've wanted it. I've had

Re: [Python-Dev] performance testing recommendations in devguide

2013-05-29 Thread Maciej Fijalkowski
On Wed, May 29, 2013 at 9:19 PM, Antoine Pitrou solip...@pitrou.net wrote: Hi, On Wed, 29 May 2013 21:59:21 +0300 Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: [1] pybench - run the standard Python PyBench benchmark suite. This is considered an unreliable, unrepresentative

Re: [Python-Dev] PEP 442: Safe object finalization

2013-06-03 Thread Maciej Fijalkowski
On Sat, May 18, 2013 at 10:33 PM, Antoine Pitrou solip...@pitrou.net wrote: On Sat, 18 May 2013 16:22:55 +0200 Armin Rigo ar...@tunes.org wrote: Hi Antoine, On Sat, May 18, 2013 at 3:45 PM, Antoine Pitrou solip...@pitrou.net wrote: How is this done? I don't see a clear way to determine it

Re: [Python-Dev] Putting the Mac Build in the Apple App Store

2013-06-04 Thread Maciej Fijalkowski
On Tue, Jun 4, 2013 at 12:44 PM, Raymond Hettinger raymond.hettin...@gmail.com wrote: Does anyone know what we would need to do to get Python in the Apple application store as a free App? The default security settings on OS X 10.8 block the installation of the DMG (or any software

Re: [Python-Dev] Interest in integrating C decimal module into Python?

2009-10-20 Thread Maciej Fijalkowski
On Tue, Oct 20, 2009 at 3:00 PM, Paul Moore p.f.mo...@gmail.com wrote: 2009/10/20 Stefan Krah stefan-use...@bytereef.org: Hi, as some of you know, recently I've released an arbitrary precision C library for decimal arithmetic together with a Python module:

Re: [Python-Dev] recursive closures - reference leak

2009-12-08 Thread Maciej Fijalkowski
Ah, yes.  In my particular case, I'm running a cluster of hundreds of nodes, supporting 50.000 players in a real-time space simulation.  We disable GC because of its unpredictable performance impact and are careful to avoid reference cycles.  We use gc from time to time to _find_ those

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Maciej Fijalkowski
FWIW, deque indexing for small deques is already O(1) and somewhat fast.  You only get O(n) degradation (with a small contant factor) on large deques. Hi. For small dequeues (smaller than a constant), you have to have O(1) operations, by definition :-) Cheers, fijal

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Maciej Fijalkowski
On Thu, Jan 28, 2010 at 2:33 PM, Benjamin Schweizer we...@benjamin-schweizer.de wrote: Hello, I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here:  

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-02-11 Thread Maciej Fijalkowski
Snippet from: http://codereview.appspot.com/186247/diff2/5014:8003/7002 *PyPy*: PyPy [#pypy]_ has good performance on numerical code, but is slower than Unladen Swallow on non-numerical workloads. PyPy only supports 32-bit x86 code generation. It has poor support for CPython extension modules,

Re: [Python-Dev] Mercurial repository for Python benchmarks

2010-02-21 Thread Maciej Fijalkowski
Hello. We probably also need some people, besides CPython devs having some access to it (like me). Cheers, fijal On Sun, Feb 21, 2010 at 4:51 PM, Daniel Stutzbach dan...@stutzbachenterprises.com wrote: On Sun, Feb 21, 2010 at 2:28 PM, Collin Winter collinwin...@google.com wrote: Would it be

[Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-23 Thread Maciej Fijalkowski
Hello. I would like to have a feature on platform module (or sys or somewhere) that can tell distutils or distutils2 that this platform (be it PyPy or Jython) is not able to compile any C module. The purpose of this is to make distutils bail out in more reasonable manner than a compilation error

Re: [Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-23 Thread Maciej Fijalkowski
On Tue, Feb 23, 2010 at 2:27 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: On Tue, Feb 23, 2010 at 2:10 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: On Tue, Feb 23, 2010 at 1:50 PM, Maciej Fijalkowski fij...@gmail.com wrote: Hello. I would like to have a feature on platform module (or sys

Re: [Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-24 Thread Maciej Fijalkowski
On Wed, Feb 24, 2010 at 6:35 AM, Nick Coghlan ncogh...@gmail.com wrote: Tarek Ziadé wrote: That makes me wonder : why don't we have a sys.implementation variable ? (cython/jython/pypi), since we can have several values for cython in sys.platform Hello. So I propose to have a

Re: [Python-Dev] Mercurial repository for Python benchmarks

2010-02-24 Thread Maciej Fijalkowski
On Wed, Feb 24, 2010 at 12:12 PM, Dave Fugate dfug...@microsoft.com wrote: Would there be any interest in accepting IronPython's in-house benchmarks into this repository as well?  Internally we run the usual suspects (PyStone, PyBench, etc), but we also have a plethora of custom benchmarks

Re: [Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-24 Thread Maciej Fijalkowski
On Wed, Feb 24, 2010 at 11:17 AM, Glyph Lefkowitz gl...@twistedmatrix.com wrote: On Feb 23, 2010, at 2:10 PM, Tarek Ziadé wrote: On Tue, Feb 23, 2010 at 1:50 PM, Maciej Fijalkowski fij...@gmail.com wrote: Hello. I would like to have a feature on platform module (or sys or somewhere

Re: [Python-Dev] Catch SIGINT at Python startup

2010-03-08 Thread Maciej Fijalkowski
On Mon, Mar 8, 2010 at 10:47 AM, Guido van Rossum gu...@python.org wrote: Actually it sounds like there's some overly general except clause somewhere that should be adjusted to catch just Exception instead of *. There is at least one that prints import 'site' failed and continues to run your

Re: [Python-Dev] Why is nan != nan?

2010-03-25 Thread Maciej Fijalkowski
-1 = -1 implies log(-1) = log(-1) Mathematically speaking this is incorrect. x = y implies log(x) = log(y) for x 0 and y 0 Cheers, fijal ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] python compiler

2010-04-05 Thread Maciej Fijalkowski
On Mon, Apr 5, 2010 at 9:31 AM, Craig Citro craigci...@gmail.com wrote: for a college project, I proposed to create a compiler for python. I've read something about it and maybe I saw that made a bad choice. I hear everyone's opinion respond. I don't think everyone thinks this is a bad idea

Re: [Python-Dev] python compiler

2010-04-05 Thread Maciej Fijalkowski
On Mon, Apr 5, 2010 at 1:47 PM, Craig Citro craigci...@gmail.com wrote: There has been some contentious debate about this in the past, where a Cython developer(s?) insisted Cython be listed among the Python implementations somewhere, on a par with IronPython, Jython and PyPy. This does not

Re: [Python-Dev] python compiler

2010-04-05 Thread Maciej Fijalkowski
On Mon, Apr 5, 2010 at 2:21 PM, Michael Foord fuzzy...@voidspace.org.uk wrote: On 05/04/2010 21:10, Terry Reedy wrote: On 4/5/2010 10:54 AM, will...@ufpa.br wrote: for a college project, I proposed to create a compiler for python. I've read something about it and maybe I saw that made a bad

Re: [Python-Dev] python compiler

2010-04-05 Thread Maciej Fijalkowski
On Mon, Apr 5, 2010 at 3:03 PM, Martin v. Löwis mar...@v.loewis.de wrote: Is the requirement just the construction of full tracebacks in the event of an exception? Because Cython does that right now. In the event of an exception, the Python call frames are constructed as the C call stack is

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-16 Thread Maciej Fijalkowski
On Fri, Apr 16, 2010 at 3:11 PM, Raymond Hettinger raymond.hettin...@gmail.com wrote: Guido van Rossum, 16.04.2010 16:33: I am fine with declaring dict({}, **{1:3}) illegal, since after all it is abuse of the ** mechanism. ISTM that making it illegal costs cycles with giving any real

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-17 Thread Maciej Fijalkowski
On Sat, Apr 17, 2010 at 11:38 AM, Dino Viehland di...@microsoft.com wrote: Benjamin wrote: 2010/4/17 Guido van Rossum gu...@python.org: On Sat, Apr 17, 2010 at 9:22 AM, Nick Coghlan ncogh...@gmail.com wrote: Guido van Rossum wrote: Because Python promises that the object the callee sees

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-17 Thread Maciej Fijalkowski
On Sat, Apr 17, 2010 at 12:03 PM, Dino Viehland di...@microsoft.com wrote: Maciej wrote: On Sat, Apr 17, 2010 at 11:38 AM, Dino Viehland di...@microsoft.com wrote: Benjamin wrote: 2010/4/17 Guido van Rossum gu...@python.org: On Sat, Apr 17, 2010 at 9:22 AM, Nick Coghlan

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-17 Thread Maciej Fijalkowski
On Sat, Apr 17, 2010 at 1:03 PM, Steve Holden st...@holdenweb.com wrote: Dino Viehland wrote: Maciej wrote: [...] And yet that breaks some code :-) Sure, if you do: class C(object):     locals()[object()] = 42 dir(C) You lose.  Once I'm aware of some piece of code in the wild doing

Re: [Python-Dev] Two small PEP ideas

2010-04-30 Thread Maciej Fijalkowski
On Fri, Apr 30, 2010 at 5:08 PM, Benjamin Peterson benja...@python.org wrote: 2010/4/30 Antoine Pitrou solip...@pitrou.net: Jesse Noller jnoller at gmail.com writes: Consider this a plaintitive -1 to any sort of rule-or-decision based on committee. I'd much rather a 2x4 to the forehead.

Re: [Python-Dev] HEADS UP: Compilation risk with new GCC 4.5.0

2010-05-14 Thread Maciej Fijalkowski
On Wed, May 12, 2010 at 9:58 AM, Jeffrey Yasskin jyass...@gmail.com wrote: On Wed, May 12, 2010 at 6:39 AM, James Y Knight f...@fuhm.net wrote: I think you'll be a lot happier just modifying Psyco than making everyone else in the world change their compiler flags. Aye, there's the rub.

Re: [Python-Dev] robots exclusion file on the buildbot pages?

2010-05-15 Thread Maciej Fijalkowski
On Sat, May 15, 2010 at 12:07 PM, Antoine Pitrou solip...@pitrou.net wrote: On Sat, 15 May 2010 17:57:28 - exar...@twistedmatrix.com wrote: One thing I have noticed is that spammers find these forms and submit them with garbage.  We can probably suppose that such people are going to

Re: [Python-Dev] robots exclusion file on the buildbot pages?

2010-05-15 Thread Maciej Fijalkowski
For us at least no branch specified builds the default branch (trunk) and does not end up with exception in buildbot code. How about specifying the default branch in config file? On Sat, May 15, 2010 at 1:55 PM, Antoine Pitrou solip...@pitrou.net wrote: On Sat, 15 May 2010 21:49:07 +0200 Martin

[Python-Dev] Intricacies of calling __eq__

2014-03-18 Thread Maciej Fijalkowski
Hi I have a question about calling __eq__ in some cases. We're thinking about doing an optimization where say: if x in d: return d[x] where d is a dict would result in only one dict lookup (the second one being constant folded away). The question is whether it's ok to do it, despite the

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-18 Thread Maciej Fijalkowski
On Tue, Mar 18, 2014 at 11:35 AM, Nick Coghlan ncogh...@gmail.com wrote: On 18 March 2014 17:52, Maciej Fijalkowski fij...@gmail.com wrote: Hi I have a question about calling __eq__ in some cases. We're thinking about doing an optimization where say: if x in d: return d[x] where d

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-18 Thread Maciej Fijalkowski
On Tue, Mar 18, 2014 at 1:18 PM, Steven D'Aprano st...@pearwood.info wrote: On Tue, Mar 18, 2014 at 05:05:56AM -0400, Terry Reedy wrote: On 3/18/2014 3:52 AM, Maciej Fijalkowski wrote: Hi I have a question about calling __eq__ in some cases. We're thinking about doing an optimization

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-18 Thread Maciej Fijalkowski
On Tue, Mar 18, 2014 at 4:21 PM, Steven D'Aprano st...@pearwood.info wrote: On Tue, Mar 18, 2014 at 01:21:05PM +0200, Maciej Fijalkowski wrote: note that this is specifically about dicts, where __eq__ will be called undecided number of times anyway (depending on collisions in hash/buckets

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-19 Thread Maciej Fijalkowski
On Tue, Mar 18, 2014 at 11:19 PM, Paul Moore p.f.mo...@gmail.com wrote: On 18 March 2014 19:46, Maciej Fijalkowski fij...@gmail.com wrote: A question: how far away will this optimization apply? if x in d: do_this() do_that() do_something_else() spam = d

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-19 Thread Maciej Fijalkowski
On Wed, Mar 19, 2014 at 2:42 PM, Antoine Pitrou solip...@pitrou.net wrote: On Tue, 18 Mar 2014 09:52:05 +0200 Maciej Fijalkowski fij...@gmail.com wrote: We're thinking about doing an optimization where say: if x in d: return d[x] where d is a dict would result in only one dict lookup

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-19 Thread Maciej Fijalkowski
On Wed, Mar 19, 2014 at 3:17 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 19 Mar 2014 15:09:04 +0200 Maciej Fijalkowski fij...@gmail.com wrote: I would like to point out that instructing people does not really work. Besides, other examples like this: if d[x] = 3: d[x] += 1

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-19 Thread Maciej Fijalkowski
On Wed, Mar 19, 2014 at 3:26 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 19 Mar 2014 15:21:16 +0200 Maciej Fijalkowski fij...@gmail.com wrote: On Wed, Mar 19, 2014 at 3:17 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 19 Mar 2014 15:09:04 +0200 Maciej Fijalkowski fij

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-19 Thread Maciej Fijalkowski
On Wed, Mar 19, 2014 at 8:38 AM, Kevin Modzelewski k...@dropbox.com wrote: Sorry, I definitely didn't mean to imply that this kind of optimization is valid on arbitrary subscript expressions; I thought we had restricted ourselves to talking about builtin dicts. If we do, I think this becomes a

Re: [Python-Dev] Intricacies of calling __eq__

2014-03-21 Thread Maciej Fijalkowski
On Wed, Mar 19, 2014 at 11:43 PM, Nick Coghlan ncogh...@gmail.com wrote: On 20 Mar 2014 07:38, Nick Coghlan ncogh...@gmail.com wrote: Correct, but I think this discussion has established that how many times dict lookup calls __eq__ on the key is one such thing. In CPython, it already varies

Re: [Python-Dev] collections.sortedtree

2014-03-27 Thread Maciej Fijalkowski
On Thu, Mar 27, 2014 at 10:11 AM, Stephen J. Turnbull step...@xemacs.org wrote: Nick Coghlan writes: On 27 Mar 2014 07:02, Guido van Rossum gu...@python.org wrote: Actually, the first step is publish it on PyPI, the second is to get a fair number of happy users there. The bar for

Re: [Python-Dev] collections.sortedtree

2014-03-27 Thread Maciej Fijalkowski
On Thu, Mar 27, 2014 at 11:07 AM, Paul Moore p.f.mo...@gmail.com wrote: On 27 March 2014 08:16, Maciej Fijalkowski fij...@gmail.com wrote: And random pieces of C included in the standard library can be shuffled under the carpet under the disguise of upgrade or what are you suggesting

Re: [Python-Dev] Language Summit notes

2014-04-11 Thread Maciej Fijalkowski
On Fri, Apr 11, 2014 at 2:22 PM, Paul Moore p.f.mo...@gmail.com wrote: On 11 April 2014 10:36, Armin Rigo ar...@tunes.org wrote: This would be superficial, but change the perception of CFFI to be a preprocessor that produces C extension modules. Thanks, that clarification helps a lot. Does

Re: [Python-Dev] Should standard library modules optimize for CPython?

2014-06-02 Thread Maciej Fijalkowski
On Mon, Jun 2, 2014 at 10:43 AM, Victor Stinner victor.stin...@gmail.com wrote: 2014-06-01 10:11 GMT+02:00 Steven D'Aprano st...@pearwood.info: My feeling is that the CPython standard library should be written for CPython, Right. PyPy, Jython and IronPython already have their own standard

[Python-Dev] libffi embedded in CPython

2014-12-18 Thread Maciej Fijalkowski
After reading this http://bugs.python.org/issue23085 and remembering struggling having our own patches into cpython's libffi (but not into libffi itself), I wonder, is there any reason any more for libffi being included in CPython? Cheers, fijal ___

Re: [Python-Dev] libffi embedded in CPython

2014-12-18 Thread Maciej Fijalkowski
On Thu, Dec 18, 2014 at 9:17 PM, Steve Dower steve.do...@microsoft.com wrote: Maciej Fijalkowski wrote: After reading this http://bugs.python.org/issue23085 and remembering struggling having our own patches into cpython's libffi (but not into libffi itself), I wonder, is there any reason any

Re: [Python-Dev] libffi embedded in CPython

2014-12-18 Thread Maciej Fijalkowski
to debug On Thu, Dec 18, 2014 at 9:30 PM, Benjamin Peterson benja...@python.org wrote: On Thu, Dec 18, 2014, at 14:13, Maciej Fijalkowski wrote: After reading this http://bugs.python.org/issue23085 and remembering struggling having our own patches into cpython's libffi (but not into libffi itself

Re: [Python-Dev] libffi embedded in CPython

2014-12-19 Thread Maciej Fijalkowski
On Thu, Dec 18, 2014 at 10:36 PM, Jim J. Jewett jimjjew...@gmail.com wrote: On Thu, Dec 18, 2014, at 14:13, Maciej Fijalkowski wrote: ... http://bugs.python.org/issue23085 ... is there any reason any more for libffi being included in CPython? [And why a fork, instead of just treating

Re: [Python-Dev] More compact dictionaries with faster iteration

2015-01-01 Thread Maciej Fijalkowski
On Wed, Dec 31, 2014 at 3:12 PM, Serhiy Storchaka storch...@gmail.com wrote: On 10.12.12 03:44, Raymond Hettinger wrote: The current memory layout for dictionaries is unnecessarily inefficient. It has a sparse table of 24-byte entries containing the hash value, key pointer, and value

Re: [Python-Dev] PEP 468 (Ordered kwargs)

2015-01-24 Thread Maciej Fijalkowski
, Maciej Fijalkowski fij...@gmail.com wrote: On Sat, Jan 24, 2015 at 12:50 PM, Maciej Fijalkowski fij...@gmail.com wrote: Hi I would like to point out that we implemented rhettingers idea in PyPy that makes all the dicts ordered by default and we don't have any adverse performance effects

Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-05 Thread Maciej Fijalkowski
Hi Francis I don't think it's safe to assume f_code is properly filled by the time you might read it, depending a bit where you find the frame object. Are you sure it's not full of garbage? Besides, are you writing a profiler, or what exactly are you doing? On Fri, Feb 6, 2015 at 1:27 AM,

Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-07 Thread Maciej Fijalkowski
On Sat, Feb 7, 2015 at 12:48 AM, Francis Giraldeau francis.girald...@gmail.com wrote: 2015-02-06 6:04 GMT-05:00 Armin Rigo ar...@tunes.org: Hi, On 6 February 2015 at 08:24, Maciej Fijalkowski fij...@gmail.com wrote: I don't think it's safe to assume f_code is properly filled by the time

Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-08 Thread Maciej Fijalkowski
that as a hint that I want someone else to get extremely creative!) -gps On Sat Feb 07 2015 at 1:34:26 PM Greg Ewing greg.ew...@canterbury.ac.nz wrote: Maciej Fijalkowski wrote: However, you can't access thread locals from signal handlers (since in some cases it mallocs, thread locals

Re: [Python-Dev] Encoding of PyFrameObject members

2015-02-08 Thread Maciej Fijalkowski
Giraldeau francis.girald...@gmail.com wrote: 2015-02-08 4:01 GMT-05:00 Maciej Fijalkowski fij...@gmail.com: I'm working on vmprof (github.com/vmprof/vmprof-python) which works for both cpython and pypy (pypy has special support, cpython is patched on-the fly) This looks interesting. I'm

Re: [Python-Dev] PEP 468 (Ordered kwargs)

2015-01-24 Thread Maciej Fijalkowski
On Sat, Jan 24, 2015 at 12:50 PM, Maciej Fijalkowski fij...@gmail.com wrote: Hi I would like to point out that we implemented rhettingers idea in PyPy that makes all the dicts ordered by default and we don't have any adverse performance effects (in fact, there is quite significant memory

[Python-Dev] PEP 468 (Ordered kwargs)

2015-01-24 Thread Maciej Fijalkowski
Hi I would like to point out that we implemented rhettingers idea in PyPy that makes all the dicts ordered by default and we don't have any adverse performance effects (in fact, there is quite significant memory saving coming from it). The measurments on CPython could be different, but in

Re: [Python-Dev] boxing and unboxing data types

2015-03-09 Thread Maciej Fijalkowski
Not all your examples are good. * float(x) calls __float__ (not __int__) * re.group requires __eq__ (and __hash__) * I'm unsure about OSError * the % thing at the very least works on pypy On Mon, Mar 9, 2015 at 8:07 AM, Serhiy Storchaka storch...@gmail.com wrote: On 09.03.15 06:33, Ethan

Re: [Python-Dev] (ctypes example) libffi embedded in CPython

2015-03-11 Thread Maciej Fijalkowski
On Wed, Mar 11, 2015 at 8:17 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 11 Mar 2015 19:05:57 +0100 Antoine Pitrou solip...@pitrou.net wrote: But they are not ctypes. For example, cffi wouldn't be obvious to use for interfacing with non-C code, since it requires you to write

Re: [Python-Dev] libffi embedded in CPython

2015-03-11 Thread Maciej Fijalkowski
On Wed, Mar 11, 2015 at 11:34 PM, Victor Stinner victor.stin...@gmail.com wrote: Le 11 mars 2015 18:29, Brett Cannon br...@python.org a écrit : I'm going to propose a somewhat controversial idea: let's deprecate the ctypes module. In the past I tried to deprecate many functions or modules

Re: [Python-Dev] libffi embedded in CPython

2015-03-11 Thread Maciej Fijalkowski
On Wed, Mar 11, 2015 at 8:31 PM, Wes Turner wes.tur...@gmail.com wrote: On Mar 11, 2015 12:55 PM, Maciej Fijalkowski fij...@gmail.com wrote: On Wed, Mar 11, 2015 at 7:50 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 11 Mar 2015 17:27:58 + Brett Cannon br...@python.org wrote

Re: [Python-Dev] libffi embedded in CPython

2015-03-11 Thread Maciej Fijalkowski
On Wed, Mar 11, 2015 at 8:05 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 11 Mar 2015 19:54:58 +0200 Maciej Fijalkowski fij...@gmail.com wrote: Depends what you call dangerous. C code doesn't rot quicker than pure Python code :-) Also, libffi really offers a wrapper around

Re: [Python-Dev] libffi embedded in CPython

2015-03-11 Thread Maciej Fijalkowski
On Wed, Mar 11, 2015 at 7:50 PM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 11 Mar 2015 17:27:58 + Brett Cannon br...@python.org wrote: Did anyone ever step forward to do this? I'm a bit worried about the long-term viability of ctypes if we don't have a maintainer or at least

Re: [Python-Dev] libffi embedded in CPython

2015-03-11 Thread Maciej Fijalkowski
On Thu, Mar 12, 2015 at 12:20 AM, Brett Cannon br...@python.org wrote: On Wed, Mar 11, 2015 at 6:03 PM Paul Moore p.f.mo...@gmail.com wrote: On 11 March 2015 at 21:45, Maciej Fijalkowski fij...@gmail.com wrote: Is it possible to use cffi without a C compiler/headers as easily than ctypes

Re: [Python-Dev] libffi embedded in CPython

2015-03-11 Thread Maciej Fijalkowski
On Thu, Mar 12, 2015 at 12:31 AM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 11 Mar 2015 23:10:14 +0200 Maciej Fijalkowski fij...@gmail.com wrote: Well, sure. The point is, such bugs are unlikely to appear at a fast rate... Also, I don't understand why libffi issues would affect

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Maciej Fijalkowski
On Thu, Mar 12, 2015 at 8:35 PM, Ned Deily n...@acm.org wrote: In article CAP1=2w7cx5jpqv_pr61rqs1ubusjf5f6kg0cd-qcwr2+9ij...@mail.gmail.com, For UNIX OSs we could probably rely on the system libffi then. What's the situation on OS X? Anyone know if it has libffi, or would be need to be

Re: [Python-Dev] libffi embedded in CPython

2015-03-25 Thread Maciej Fijalkowski
On Tue, Mar 24, 2015 at 11:31 PM, Paul Moore p.f.mo...@gmail.com wrote: On 12 March 2015 at 17:44, Paul Moore p.f.mo...@gmail.com wrote: On 12 March 2015 at 17:26, Brett Cannon br...@python.org wrote: I'm all for ditching our 'libffi_msvc' in favor of adding libffi as another 'external' for

Re: [Python-Dev] ctypes module

2015-04-08 Thread Maciej Fijalkowski
I presume the reason was that noone wants to maintain code for the case where there are no buildbots available and there is no development time available. You are free to put back in the files and see if they work (they might not), but such things are usually removed if they're a maintenance

Re: [Python-Dev] ctypes module

2015-04-08 Thread Maciej Fijalkowski
for the record libffi supports itanium officially (but as usual I'm very skeptical how well it works on less used platforms) https://sourceware.org/libffi/ On Wed, Apr 8, 2015 at 1:32 PM, Nick Coghlan ncogh...@gmail.com wrote: On 8 April 2015 at 20:36, Maciej Fijalkowski fij...@gmail.com wrote

Re: [Python-Dev] 2.7 is here until 2020, please don't call it a waste.

2015-06-03 Thread Maciej Fijalkowski
On Wed, Jun 3, 2015 at 11:38 AM, M.-A. Lemburg m...@egenix.com wrote: On 02.06.2015 21:07, Maciej Fijalkowski wrote: Hi There was a PSF-sponsored effort to improve the situation with the https://bitbucket.org/pypy/codespeed2/src being written (thank you PSF). It's not better enough than

Re: [Python-Dev] 2.7 is here until 2020, please don't call it a waste.

2015-06-02 Thread Maciej Fijalkowski
Hi There was a PSF-sponsored effort to improve the situation with the https://bitbucket.org/pypy/codespeed2/src being written (thank you PSF). It's not better enough than codespeed that I would like, but gives some opportunities. That said, we have a benchmark machine for benchmarking cpython

Re: [Python-Dev] 2.7 is here until 2020, please don't call it a waste.

2015-06-03 Thread Maciej Fijalkowski
On Wed, Jun 3, 2015 at 3:49 PM, R. David Murray rdmur...@bitdance.com wrote: On Wed, 03 Jun 2015 12:04:10 +0200, Maciej Fijalkowski fij...@gmail.com wrote: On Wed, Jun 3, 2015 at 11:38 AM, M.-A. Lemburg m...@egenix.com wrote: On 02.06.2015 21:07, Maciej Fijalkowski wrote: Hi

Re: [Python-Dev] speed.python.org (was: 2.7 is here until 2020, please don't call it a waste.)

2015-06-04 Thread Maciej Fijalkowski
, Maciej Fijalkowski wrote: On Wed, Jun 3, 2015 at 3:49 PM, R. David Murray I think we should look into getting speed.python.org up and running for both Python 2 and 3 branches: https://speed.python.org/ What would it take to make that happen ? I guess ideal would be some

<    1   2   3   4   >