Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Thomas Wouters
On Thu, Mar 12, 2015 at 6:26 PM, Brett Cannon wrote: > > > For UNIX OSs we could probably rely on the system libffi then. > Yes, it's possible to use the system libffi -- that's what most linux distros already do -- but only if you use dynamic linking. If you want to statically link libffi (usefu

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Maciej Fijalkowski
On Thu, Mar 12, 2015 at 8:35 PM, Ned Deily wrote: > In article > , >> 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 >> pulled in to be used like on Windows? > > Ronald (in http://bugs.python.org/

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Paul Moore
On 12 March 2015 at 18:54, Zachary Ware wrote: > On Thu, Mar 12, 2015 at 12:44 PM, Paul Moore wrote: >> I'd be willing to contemplate helping out on the Windows side of >> things, if nobody else steps up (with the proviso that I have little >> free time, and I'm saying this without much idea of w

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-12 Thread Eric V. Smith
On 3/12/2015 2:17 PM, Antoine Pitrou wrote: > On Thu, 12 Mar 2015 14:08:01 -0400 > Scott Dial wrote: > >> On 2015-03-12 10:46 AM, Eric V. Smith wrote: >>> On 3/12/2015 10:00 AM, Antoine Pitrou wrote: Related issue: >>> ipaddress.IPv4Interface('10.0.0.255/8') + 1 IPv4Interface('

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Zachary Ware
On Thu, Mar 12, 2015 at 12:44 PM, Paul Moore wrote: > I'd be willing to contemplate helping out on the Windows side of > things, if nobody else steps up (with the proviso that I have little > free time, and I'm saying this without much idea of what's involved > :-)) If Zachary can give a bit more

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Ned Deily
In article , > 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 > pulled in to be used like on Windows? Ronald (in http://bugs.python.org/issue23534): "On OSX the internal copy of libffi that's used

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-12 Thread Antoine Pitrou
On Thu, 12 Mar 2015 14:08:01 -0400 Scott Dial wrote: > On 2015-03-12 10:46 AM, Eric V. Smith wrote: > > On 3/12/2015 10:00 AM, Antoine Pitrou wrote: > >> Related issue: > >> > > ipaddress.IPv4Interface('10.0.0.255/8') + 1 > >> IPv4Interface('10.0.1.0/32') > >> > >> Should the result be IPv4In

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-12 Thread Scott Dial
On 2015-03-12 10:46 AM, Eric V. Smith wrote: > On 3/12/2015 10:00 AM, Antoine Pitrou wrote: >> Related issue: >> > ipaddress.IPv4Interface('10.0.0.255/8') + 1 >> IPv4Interface('10.0.1.0/32') >> >> Should the result be IPv4Interface('10.0.0.0/8') >> (i.e. wrap around)? Should OverflowError be ra

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Paul Moore
On 12 March 2015 at 17:26, Brett Cannon wrote: >> I'm all for ditching our 'libffi_msvc' in favor of adding libffi as >> another 'external' for the Windows build. I have managed to get >> _ctypes to build on Windows using vanilla libffi sources, prepared >> using their configure script from withi

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Brett Cannon
On Thu, Mar 12, 2015 at 10:39 AM Zachary Ware wrote: > I started this message about 3 months ago; at this point I'm just > getting it posted so it stops rotting in my Drafts folder. > Thanks for looking into this! > > On Mon, Dec 22, 2014 at 3:49 PM, Jim J. Jewett > wrote: > > On Thu, Dec 18,

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-12 Thread Eric V. Smith
On 3/12/2015 10:00 AM, Antoine Pitrou wrote: > On Thu, 12 Mar 2015 12:37:16 + > "Loevborg, Soeren Jakob" wrote: >> > import ipaddress > ipaddress.IPv4Interface('10.0.0.1/8') + 1 >> IPv4Interface('10.0.0.2/32') > ipaddress.IPv6Interface('fd00::1/64') + 1 >> IPv6Interface('fd00::2/12

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Zachary Ware
I started this message about 3 months ago; at this point I'm just getting it posted so it stops rotting in my Drafts folder. On Mon, Dec 22, 2014 at 3:49 PM, Jim J. Jewett wrote: > On Thu, Dec 18, 2014, at 14:13, Maciej Fijalkowski wrote: >> ... http://bugs.python.org/issue23085 ... >> is there a

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Thomas Wouters
On Thu, Mar 12, 2015 at 1:20 AM, Guido van Rossum wrote: > Can we please decouple the ctypes deprecation discussion from efforts to > upgrade cffi? They can coexist just fine, and they don't even really solve > the same problem. > ctypes and cffi do actually solve the same problem, just not in t

Re: [Python-Dev] libffi embedded in CPython

2015-03-12 Thread Brett Cannon
On Wed, Mar 11, 2015 at 8:20 PM Guido van Rossum wrote: > Can we please decouple the ctypes deprecation discussion from efforts to > upgrade cffi? They can coexist just fine, and they don't even really solve > the same problem. > I mostly proposed deprecating ctypes because we were not keeping u

Re: [Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-12 Thread Antoine Pitrou
On Thu, 12 Mar 2015 12:37:16 + "Loevborg, Soeren Jakob" wrote: > > >>> import ipaddress > >>> ipaddress.IPv4Interface('10.0.0.1/8') + 1 > IPv4Interface('10.0.0.2/32') > >>> ipaddress.IPv6Interface('fd00::1/64') + 1 > IPv6Interface('fd00::2/128') Given that the behaviour is unlikely to match

[Python-Dev] Request for comments: [issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-12 Thread Loevborg, Soeren Jakob
Hi, I'm looking for feedback on issue 22941, "IPv4Interface arithmetic changes subnet mask". As stated in the bug, I'd be happy to write a patch, if anyone would comment on my proposal. http://bugs.python.org/issue22941 Thank you, Søren Løvborg --- Addition and subtraction of integers are d

Re: [Python-Dev] PEP 488: elimination of PYO files

2015-03-12 Thread Armin Rigo
Hi Brett, On 6 March 2015 at 19:11, Brett Cannon wrote: > I disagree with your premise that .pyo files don't have a noticeable effect > on performance. If you don't use asserts a lot then there is no effect, but > if you use them heavily or have them perform expensive calculations then > there is

Re: [Python-Dev] str.lstrip bug?

2015-03-12 Thread Isaac Schwabacher
On 15-03-10, Facundo Batista wrote: > On Tue, Mar 10, 2015 at 2:27 PM, lou xiao wrote: > > > tiny➜ ~ python > > Python 2.7.5+ (default, Feb 27 2014, 19:37:08) > > [GCC 4.8.1] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > a='device_info' > a.lstr

[Python-Dev] str.lstrip bug?

2015-03-12 Thread Stephen J. Turnbull
lou xiao writes: > I find a bug in str.lstrip, when i call str.lstrip, i get this result. > >>> a.lstrip('device_') > 'nfo' > >>> Try a.lstrip('_ecived') You'll see that you get the same result. I suspect that you misunderstand the meaning of the argument, which is not a sequence of c