Re: [Python-Dev] bsddb

2008-09-07 Thread Gregory P. Smith
On Thu, Sep 4, 2008 at 7:33 AM, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Thu, Sep 04, 2008 at 03:23:22PM +0200, Jesus Cea wrote: >> Compared to sqlite, you don't need to know SQL, you can finetuning (for >> example, using ACI instead of ACID, deciding store by store), and you >> can do replic

Re: [Python-Dev] bsddb

2008-09-07 Thread Gregory P. Smith
On Thu, Sep 4, 2008 at 11:03 AM, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Thu, Sep 04, 2008 at 07:40:28PM +0200, Jesus Cea wrote: >> A stable fileformat is useful for long term support, but an evolving >> format allows improvements. > > Once I upgraded Python on a Windows computer... I thin

Re: [Python-Dev] [issue3769] Deprecate bsddb for removal in 3.0

2008-09-07 Thread Gregory P. Smith
On Thu, Sep 4, 2008 at 11:30 AM, Brett Cannon <[EMAIL PROTECTED]> wrote: > Another thing to keep in mind with the whole shelve/dbm.any argument > is that for 3.1 there is nothing saying we can't change shelve and the > dbm package to allow 3rd-party code to register with the dbm package > such that

Re: [Python-Dev] Filename as byte string in python 2.6 or 3.0?

2008-09-28 Thread Gregory P. Smith
On 9/27/08, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> I think that the problem is important because it's a regression from 2.5 >> to >> 2.6/3.0. Python 2.5 uses bytes filename, so it was possible to >> open/unlink "invalid" unicode strings (since it's not unicode but bytes). > > I'd like to s

Re: [Python-Dev] Real segmentation fault handler

2008-10-03 Thread Gregory P. Smith
On Thu, Oct 2, 2008 at 10:54 AM, Thomas Heller <[EMAIL PROTECTED]> wrote: > Victor Stinner schrieb: >> Hi, >> >> I would like to be able to catch SIGSEGV in my Python code! So I started to >> hack Python trunk to support this feature. The idea is to use a signal >> handler which call longjmp(), and

Re: [Python-Dev] [ANN] VPython 0.1

2008-11-01 Thread Gregory P. Smith
On Fri, Oct 24, 2008 at 12:53 AM, J. Sievers <[EMAIL PROTECTED]> wrote: > "M.-A. Lemburg" <[EMAIL PROTECTED]> writes: > > [snip] >> BTW: I hope you did not use pybench to get profiles of the opcodes. >> That would most certainly result in good results for pybench, but >> less good ones for general

Re: [Python-Dev] Optionally using GMP to implement long if available

2008-11-03 Thread Gregory P. Smith
On Mon, Nov 3, 2008 at 12:41 PM, Victor Stinner <[EMAIL PROTECTED]> wrote: > Hi, > > Le Monday 03 November 2008 18:56:37 Paul Miller, vous avez écrit : >> I've read some of the past discussion about including GMP into the >> python core and understand the reasons for not doing so. > > Please, check

Re: [Python-Dev] Optionally using GMP to implement long if available

2008-11-15 Thread Gregory P. Smith
On Tue, Nov 4, 2008 at 10:33 AM, Tim Peters <[EMAIL PROTECTED]> wrote: > > 2. On platforms that support it, this is at least 64x64->64 multiplication, > potentially much more expensive than the 32x32->64 (or 31x31->62?) > flavor you /intend/ to move to. Thats a good point, thanks! I am not av

Re: [Python-Dev] [Python-3000] 2.6.1 and 3.0

2008-11-27 Thread Gregory P. Smith
I am not at all a windows person but I have used http://www.dennisbareis.com/makemsi.htm in the past to automate editing and tweaking some MSI files for testing. It can also be used to generate new ones. It looks like it would still require something to generate its own input description. Regard

Re: [Python-Dev] socket.c, _rbufsize

2008-11-27 Thread Gregory P. Smith
I've created http://bugs.python.org/issue4448 to track this issue. On Thu, Nov 27, 2008 at 6:50 AM, Kristján Valur Jónsson < [EMAIL PROTECTED]> wrote: > I came across this in socket.c: > > # _rbufsize is the suggested recv buffer size. It is *strictly* > > # obeyed within readli

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-18 Thread Gregory P. Smith
+1 on getting rid of the IOBase __del__ in the C rewrite in favor of tp_dealloc. On Sun, Jan 18, 2009 at 11:53 PM, Christian Heimes wrote: > Brett Cannon schrieb: > > Fine by me. People should be using the context manager for guaranteed > > file closure anyway IMO. > Yes they should. (how I re

Re: [Python-Dev] stuck with dlopen...

2009-01-19 Thread Gregory P. Smith
If you run your python.exe under gdb you should be able to set a future breakpoint on your _PyEval_EvalMiniFrameEx function and debug from there. On Wed, Jan 14, 2009 at 8:28 PM, wrote: > > I've recently been working on generating C functions on-the-fly which > inline > the C code necessary to i

Re: [Python-Dev] Subversion upgraded to 1.5

2009-01-31 Thread Gregory P. Smith
I'm seeing the following when trying to svn commit: Transmitting file data ...Read from remote host svn.python.org: Operation timed out svn: Commit failed (details follow): svn: Connection closed unexpectedly ... That was with subversion 1.4.4; copying my changes to a different host with subversi

Re: [Python-Dev] Subversion upgraded to 1.5

2009-01-31 Thread Gregory P. Smith
I'm just trying to commit the following to trunk: SendingLib/test/test_socket.py SendingMisc/NEWS SendingModules/socketmodule.c Transmitting file data ... I have another svn commit attempt which appesrs to be hanging and destined to timeout running right now. ssh -v pytho

Re: [Python-Dev] Subversion upgraded to 1.5

2009-01-31 Thread Gregory P. Smith
upgrade. I don't think I've done any commits from these hosts since I got IPv6 connectivity, only updates. -gps On Sat, Jan 31, 2009 at 2:49 PM, Gregory P. Smith wrote: > I'm just trying to commit the following to trunk: > > SendingLib/test/test_socket.py &g

Re: [Python-Dev] Software Transactional Memory for Python

2011-08-29 Thread Gregory P. Smith
On Mon, Aug 29, 2011 at 5:20 AM, Antoine Pitrou wrote: > On Sun, 28 Aug 2011 09:43:33 -0700 > Guido van Rossum wrote: > > > > This sounds like a very interesting idea to pursue, even if it's late, > > and even if it's experimental, and even if it's possible to cause > > deadlocks (no news there)

Re: [Python-Dev] issue 6721 "Locks in python standard library should be sanitized on fork"

2011-08-29 Thread Gregory P. Smith
On Sat, Aug 27, 2011 at 2:59 AM, Ask Solem wrote: > > On 26 Aug 2011, at 16:53, Antoine Pitrou wrote: > > > > > Hi, > > > >> I think that "deprecating" the use of threads w/ multiprocessing - or > >> at least crippling it is the wrong answer. Multiprocessing needs the > >> helper threads it uses

Re: [Python-Dev] Python 3 optimizations continued...

2011-08-29 Thread Gregory P. Smith
On Mon, Aug 29, 2011 at 2:05 PM, stefan brunthaler wrote: > > The question really is whether this is an all-or-nothing deal. If you > > could identify smaller parts that can be applied independently, interest > > would be higher. > > > Well, it's not an all-or-nothing deal. In my current architect

Re: [Python-Dev] Python 3 optimizations continued...

2011-08-30 Thread Gregory P. Smith
On Tue, Aug 30, 2011 at 1:54 PM, Benjamin Peterson wrote: > 2011/8/30 stefan brunthaler : > > On Tue, Aug 30, 2011 at 13:42, Benjamin Peterson > wrote: > >> 2011/8/30 stefan brunthaler : > >>> I will remove my development commentaries and create a private > >>> repository at bitbucket for you* to

Re: [Python-Dev] PEP 393 merged

2011-10-02 Thread Gregory P. Smith
On Wed, Sep 28, 2011 at 8:41 AM, Guido van Rossum wrote: > Congrats! Python 3.3 will be better because of this. > > On Wed, Sep 28, 2011 at 12:48 AM, "Martin v. Löwis" > wrote: > > I have now merged the PEP 393 implementation into default. > > The main missing piece is the documentation; contrib

Re: [Python-Dev] STM and python

2011-11-30 Thread Gregory P. Smith
Azul has been using hardware transactional memory on their custom CPUs (and likely STM in their current x86 virtual machine based products) to great effect for their massively parallel Java VM (700+ cpu cores and gobs of ram) for over 4 years. I'll leave it to the reader to do the relevant searchi

[Python-Dev] Adding features to 2to3... cpython/default right? can I backport to 2.7?

2011-12-21 Thread Gregory P. Smith
I have some features I need to add to lib2to3 to make it more useful for our purposes at work supporting our massive code base in a Python 2 to 3 transition. Which tree should I develop these and check these into? cpython/default? Can I backport this to 3.2 and 2.7? It counts as a feature additi

Re: [Python-Dev] A new dict for Xmas?

2011-12-21 Thread Gregory P. Smith
On Sun, Dec 18, 2011 at 2:55 PM, Antoine Pitrou wrote: > On Fri, 16 Dec 2011 21:32:44 + > Mark Shannon wrote: > > > > > per-instance attributes, it just forces them all to keep resizing up, > > > even though individual instances would be small with the current dict. > > There is a cut-off po

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-13 Thread Gregory P. Smith
On Fri, Jan 13, 2012 at 5:38 PM, Guido van Rossum wrote: > On Fri, Jan 13, 2012 at 5:17 PM, Antoine Pitrou wrote: > >> On Thu, 12 Jan 2012 18:57:42 -0800 >> Guido van Rossum wrote: >> > Hm... I started out as a big fan of the randomized hash, but thinking >> more >> > about it, I actually believ

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-13 Thread Gregory P. Smith
> > > Clearly these ideas are more complex than adding randomization, but adding > randomization doesn't seem to be produce immunity from attack, when data > about the randomness is leaked. > Which will not normally happen. I'm firmly in the camp that believes the random seed can be probed and de

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-13 Thread Gregory P. Smith
btw, Tim's commit message on this one is amusingly relevant. :) http://hg.python.org/cpython/diff/8d2f2cb9/Objects/dictobject.c On Fri, Jan 13, 2012 at 6:25 PM, Gregory P. Smith wrote: > >> Clearly these ideas are more complex than adding randomization, but >>

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-13 Thread Gregory P. Smith
On Fri, Jan 13, 2012 at 5:58 PM, Gregory P. Smith wrote: > > On Fri, Jan 13, 2012 at 5:38 PM, Guido van Rossum wrote: > >> On Fri, Jan 13, 2012 at 5:17 PM, Antoine Pitrou wrote: >> >>> On Thu, 12 Jan 2012 18:57:42 -0800 >>> Guido van Rossum wrote: >&g

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-14 Thread Gregory P. Smith
My patch example does change the bytes object hash as well as Unicode. On Jan 13, 2012 7:46 PM, wrote: > What an implementation looks like: >> >> http://pastebin.com/9ydETTag >> >> some stuff to be filled in, but this is all that is really required. >> > > I think this statement (and the patch)

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-14 Thread Gregory P. Smith
s own hash implementation. As for when to enable it or not, I unfortunately have to agree, despite my wild desires we can't turn on the hash randomization change by default in anything prior to 3.3. -gps On Sat, Jan 14, 2012 at 11:17 AM, Gregory P. Smith wrote: > My patch example does change the by

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-15 Thread Gregory P. Smith
On Sun, Jan 15, 2012 at 8:46 AM, Stefan Behnel wrote: > > It also seems to me that the wording "has a hash value which never changes > during its lifetime" makes it pretty clear that the lifetime of the hash > value is not guaranteed to supersede the lifetime of the object (although > that's a rat

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-16 Thread Gregory P. Smith
On Sun, Jan 15, 2012 at 9:44 AM, Guido van Rossum wrote: > On Sun, Jan 15, 2012 at 8:46 AM, Stefan Behnel wrote: > >> Guido van Rossum, 15.01.2012 17:10: >> > On Sun, Jan 15, 2012 at 6:30 AM, Stefan Behnel wrote: >> >> Terry Reedy, 14.01.2012 06:43: >> >

Re: [Python-Dev] Hashing proposal: change only string-only dicts

2012-01-17 Thread Gregory P. Smith
On Tue, Jan 17, 2012 at 12:59 PM, "Martin v. Löwis" wrote: > I'd like to propose a different approach to seeding the string hashes: > only do so for dictionaries involving only strings, and leave the > tp_hash slot of strings unchanged. > > Each string would get two hashes: the "public" hash, whic

Re: [Python-Dev] Status of the fix for the hash collision vulnerability

2012-01-17 Thread Gregory P. Smith
On Tue, Jan 17, 2012 at 12:52 PM, "Martin v. Löwis" wrote: > > I plan to commit my fix to Python 3.3 if it is accepted. Then write a > > simplified version to Python 3.2 and backport it to 3.1. > > I'm opposed to any change to the hash values of strings in maintenance > releases, so I guess I'm op

Re: [Python-Dev] Daily reference leaks (12de1ad1cee8): sum=6024

2012-01-18 Thread Gregory P. Smith
On Wed, Jan 18, 2012 at 12:50 PM, Antoine Pitrou wrote: > > Well, they should be fixed now :-) > > Regards > > Antoine. awesome! :) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http:/

Re: [Python-Dev] Hashing proposal: change only string-only dicts

2012-01-19 Thread Gregory P. Smith
On Wed, Jan 18, 2012 at 9:55 AM, "Martin v. Löwis" wrote: > Am 18.01.2012 17:01, schrieb PJ Eby: > > On Tue, Jan 17, 2012 at 7:58 PM, "Martin v. Löwis" > > wrote: > > > > Am 17.01.2012 22:26, schrieb Antoine Pitrou: > > > Only 2 bits are used in ob_sstate, meani

Re: [Python-Dev] cpython (3.2): Avoid the compiler warning about the unused return value.

2012-01-21 Thread Gregory P. Smith
On Sat, Jan 21, 2012 at 2:33 PM, Stefan Krah wrote: > Benjamin Peterson wrote: >> > Can't that give you another warning about the ssize_t being truncated to >> > int? >> > How about the following instead? >> > >> >   (void) write(...); >> >> Also, if you use a recent enough version of gcc, ./conf

Re: [Python-Dev] cpython (3.2): Fixes issue #8052: The posix subprocess module's close_fds behavior was

2012-01-21 Thread Gregory P. Smith
On Sat, Jan 21, 2012 at 2:52 PM, Antoine Pitrou wrote: > On Sat, 21 Jan 2012 23:39:41 +0100 > gregory.p.smith wrote: >> http://hg.python.org/cpython/rev/61aa484a3e54 >> changeset:   74563:61aa484a3e54 >> branch:      3.2 >> parent:      74561:d01fecadf3ea &g

Re: [Python-Dev] [Python-checkins] cpython (3.2): Fixes issue #8052: The posix subprocess module's close_fds behavior was

2012-01-22 Thread Gregory P. Smith
On Sat, Jan 21, 2012 at 4:21 PM, Benjamin Peterson wrote: > 2012/1/21 gregory.p.smith : > ... >> +/* Convert ASCII to a positive int, no libc call. no overflow. -1 on error. >> */ > > Is no libc call important? Yes. strtol() is not on the async signal safe C library function list. > >> +static

Re: [Python-Dev] Counting collisions w/ no need for a fatal exception

2012-01-24 Thread Gregory P. Smith
On Sun, Jan 22, 2012 at 10:41 PM, Tim Delaney wrote: > On 23 January 2012 16:49, Lennart Regebro wrote: >> >> On Mon, Jan 23, 2012 at 06:02, Paul McMillan wrote: >> >> We may use a different salt per dictionary. >> > >> > If we're willing to re-hash everything on a per-dictionary basis. That >>

Re: [Python-Dev] [issue13703] Hash collision security issue

2012-01-29 Thread Gregory P. Smith
On Fri, Jan 27, 2012 at 11:39 AM, wrote: > > In fact, none of the strategies fixes all issues with hash collisions; > even the hash-randomization solutions only deal with string keys, and > don't consider collisions on non-string keys. The hash-randomization approach also works fine on immutable

Re: [Python-Dev] plugging the hash attack

2012-01-29 Thread Gregory P. Smith
On Fri, Jan 27, 2012 at 6:33 PM, Benjamin Peterson wrote: > 2012/1/27 Steven D'Aprano : >> Benjamin Peterson wrote: >>> >>> Hello everyone, >>> In effort to get a fix out before Perl 6 goes mainstream, Barry and I >>> have decided to pronounce on what we want for our stable releases. >>> What we h

Re: [Python-Dev] PEP 408 -- Standard library __preview__ package

2012-01-29 Thread Gregory P. Smith
On Fri, Jan 27, 2012 at 9:26 AM, Alex wrote: > Eli Bendersky gmail.com> writes: > >> >> Hello, >> >> Following an earlier discussion on python-ideas [1], we would like to >> propose the following PEP for review. Discussion is welcome. The PEP >> can also be viewed in HTML form at >> http://www.py

Re: [Python-Dev] PEP: New timestamp formats

2012-02-03 Thread Gregory P. Smith
Why is the PEP promoting the float type being used as the default on the new-in-3.3 APIs that were added explicitly to provide nanosecond level resolution that cannot be represented by a float? The *new* APIs should default to the high precision return value (be that datetime/timedelta or decimal)

Re: [Python-Dev] Is this safe enough? Re: [Python-checkins] cpython: _Py_Identifier are always ASCII strings

2012-02-07 Thread Gregory P. Smith
Why do we still care about C89? It is 2012 and we're talking about Python 3. What compiler on what platform that anyone actually cares about does not support C99? -gps ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

Re: [Python-Dev] which C language standard CPython must conform to

2012-02-07 Thread Gregory P. Smith
On Tue, Feb 7, 2012 at 1:41 PM, "Martin v. Löwis" wrote: > Am 07.02.2012 20:10, schrieb Gregory P. Smith: >> Why do we still care about C89?  It is 2012 and we're talking about >> Python 3.  What compiler on what platform that anyone actually cares >> about

Re: [Python-Dev] peps: Update with bugfix releases.

2012-02-12 Thread Gregory P. Smith
On Sun, Feb 5, 2012 at 11:23 AM, Ned Deily wrote: > In article , >  georg.brandl wrote: >> +Bugfix Releases >> +=== >> + >> +- 3.2.1: released July 10, 2011 >> +- 3.2.2: released September 4, 2011 >> + >> +- 3.2.3: planned February 10-17, 2012 > > I would like to propose that we plan

Re: [Python-Dev] How to round timestamps and durations?

2012-02-14 Thread Gregory P. Smith
On Mon, Feb 13, 2012 at 4:59 AM, Victor Stinner wrote: > Hi, > > My work on the PEP 410 tries to unify the code to manipulate > timestamps. The problem is that I'm unable to decide how to round > these numbers. > > Functions using a resolution of 1 second (e.g. time.mktime) expects > rounding towa

Re: [Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

2012-02-14 Thread Gregory P. Smith
On Tue, Feb 14, 2012 at 2:29 PM, Barry Warsaw wrote: > I think I will just state my reasoning one last time and then leave it to the > BDFL or BDFOP to make the final decision. > > Victor on IRC says that there is not much difference between Decimal and > timedelta, and this may be true from an im

Re: [Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

2012-02-14 Thread Gregory P. Smith
On Tue, Feb 14, 2012 at 4:23 PM, Nick Coghlan wrote: > On Wed, Feb 15, 2012 at 8:29 AM, Barry Warsaw wrote: >> My primary concern with the PEP is adding to users confusion when they have >> to >> handle (at least) 5 different types[*] that represent time in Python. > > My key question to those a

Re: [Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

2012-02-14 Thread Gregory P. Smith
On Tue, Feb 14, 2012 at 5:13 PM, Gregory P. Smith wrote: > On Tue, Feb 14, 2012 at 4:23 PM, Nick Coghlan wrote: >> On Wed, Feb 15, 2012 at 8:29 AM, Barry Warsaw wrote: >>> My primary concern with the PEP is adding to users confusion when they have >>> to >>>

Re: [Python-Dev] [Python-checkins] cpython (merge 2.6 -> 2.7): merge 2.6 with hash randomization fix

2012-02-20 Thread Gregory P. Smith
On Mon, Feb 20, 2012 at 10:19 PM, Gregory P. Smith wrote: > Look at PCbuild/pythoncore.vcproj within this commit, it looks like > you committed (or merged) a merge conflict marker in the file. > > -gps > > On Mon, Feb 20, 2012 at 6:49 PM, benjamin.peterson > wrote: &g

Re: [Python-Dev] Issue 13703 is closed for the Python 2.6 branch

2012-02-22 Thread Gregory P. Smith
On Wed, Feb 22, 2012 at 10:14 AM, Barry Warsaw wrote: > Two more small details to address, and then I think we're ready to start > creating release candidates. > >  - sys.flags.hash_randomization > >   In the tracker issue, I had previously stated a preference that this flag >   only reflect the s

Re: [Python-Dev] [Python-checkins] cpython (3.2): logging: Added locking in flush() and close() handler methods. Thanks to Fayaz

2012-02-23 Thread Gregory P. Smith
On Thu, Feb 23, 2012 at 12:04 PM, vinay.sajip wrote: > http://hg.python.org/cpython/rev/b2adcd90e656 > changeset:   75211:b2adcd90e656 > branch:      3.2 > parent:      75200:85d08a1ba74e > user:        Vinay Sajip > date:        Thu Feb 23 19:45:52 2012 + > summary: >  logging: Added locking

Re: [Python-Dev] [Python-checkins] cpython (3.2): logging: Added locking in flush() and close() handler methods. Thanks to Fayaz

2012-02-23 Thread Gregory P. Smith
On Thu, Feb 23, 2012 at 5:51 PM, Gregory P. Smith wrote: > On Thu, Feb 23, 2012 at 12:04 PM, vinay.sajip > wrote: >> http://hg.python.org/cpython/rev/b2adcd90e656 >> changeset:   75211:b2adcd90e656 >> branch:      3.2 >> parent:      75200:85d08a1ba74e >&g

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Gregory P. Smith
On Fri, Feb 24, 2012 at 1:52 PM, Tshepang Lekhonkhobe wrote: > On Fri, Feb 24, 2012 at 23:39, "Martin v. Löwis" wrote: >>> It is a burden for some people to learn and remember the exact details >>> of both systems and exactly how they differ. Having both in the stdlib >>> hurts readability for su

Re: [Python-Dev] PEP 417: Adding mock to the Python Standard Library

2012-03-12 Thread Gregory P. Smith
+10 for the record. (given we all already agreed upon this in the summit :) make it so. On Mon, Mar 12, 2012 at 3:05 PM, Michael Foord wrote: > Hello all, > > At the Python Language Summit adding the "mock" library to the Python > Standard Library was discussed and agreed. Here is a very brief

Re: [Python-Dev] Playing with a new theme for the docs

2012-03-24 Thread Gregory P. Smith
On Tue, Mar 20, 2012 at 3:55 PM, John O'Connor wrote: > On Tue, Mar 20, 2012 at 6:38 PM, Georg Brandl wrote: > > recently I've grown a bit tired of seeing our default Sphinx theme, > > especially as so many other projects use it. > > I think regardless of the chosen style, giving the Python 3 do

Re: [Python-Dev] PEP 418 is too divisive and confusing and should be postponed

2012-04-09 Thread Gregory P. Smith
On Sat, Apr 7, 2012 at 4:56 PM, Glyph Lefkowitz wrote: > On Apr 7, 2012, at 3:40 AM, Steven D'Aprano wrote: > > In any case, NTP is not the only thing that adjusts the clock, e.g. the > operating system will adjust the time for daylight savings. > > > Daylight savings time is not a clock adjustmen

Re: [Python-Dev] PEP 418 is too divisive and confusing and should be postponed

2012-04-09 Thread Gregory P. Smith
On Mon, Apr 9, 2012 at 4:46 PM, Guido van Rossum wrote: > Is it still? I thought they fixed that ages ago? > sadly, no. http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html On Mon, Apr 9, 2012 at 4:42 PM, Gregory P. Smith wrote: > > > > On Sat, Apr 7, 2012 at 4:56 P

Re: [Python-Dev] Possible change to logging.handlers.SysLogHandler

2012-04-10 Thread Gregory P. Smith
On Fri, Apr 6, 2012 at 1:06 PM, Vinay Sajip wrote: > There is a problem with the way logging.handlers.SysLogHandler works > when presented with Unicode messages. According to RFC 5424, Unicode > is supposed to be sent encoded as UTF-8 and preceded by a BOM. > However, the current handler implemen

Re: [Python-Dev] Highlighting reference-stealing APIs [was Re: cpython: Fix email post-commit review comments.]

2012-04-18 Thread Gregory P. Smith
On Wed, Apr 18, 2012 at 5:01 PM, David Malcolm wrote: > On Thu, 2012-04-19 at 10:48 +1200, Greg Ewing wrote: > > Antoine Pitrou wrote: > > > > > (and here we see why reference-stealing APIs are a nuisance: because > > > you never know in advance whether a function will steal a reference or > > >

Re: [Python-Dev] Proposal for better SSL errors

2012-05-26 Thread Gregory P. Smith
On Sat, May 26, 2012 at 12:28 PM, Antoine Pitrou wrote: > > Hello, > > In http://bugs.python.org/issue14837 I have attached a proof-of-concept > patch to improve the exceptions raised by the ssl module when OpenSSL > signals an error. The current situation is quite dismal, since you get > a someti

Re: [Python-Dev] what is happening with the regex module going into Python 3.3?

2012-06-03 Thread Gregory P. Smith
On Fri, Jun 1, 2012 at 5:37 PM, Nick Coghlan wrote: > ipaddress really made it in because I personally ran into the limitations > of not having IP address support in the stdlib. I ended up doing quite a > bit of prompting to ensure the process of cleaning up the API to modern > stdlib standards d

Re: [Python-Dev] what is happening with the regex module going into Python 3.3?

2012-06-03 Thread Gregory P. Smith
On Sun, Jun 3, 2012 at 2:38 PM, Nick Coghlan wrote: > On Mon, Jun 4, 2012 at 6:25 AM, Gregory P. Smith wrote: > > > > On Fri, Jun 1, 2012 at 5:37 PM, Nick Coghlan wrote: > >> > >> ipaddress really made it in because I personally ran into the > limitations &

Re: [Python-Dev] deprecating .pyo and -O

2012-06-16 Thread Gregory P. Smith
On Thu, Jun 14, 2012 at 1:57 PM, "Martin v. Löwis" wrote: > > I don't really see the point. In my experience there is no benefit to > > removing assert statements in production mode. This is a C-specific > > notion that doesn't really map very well to Python code. Do other > > high-level languages

Re: [Python-Dev] Restricted API versioning

2012-06-23 Thread Gregory P. Smith
On Sat, Jun 23, 2012 at 2:31 PM, "Martin v. Löwis" wrote: > I've been thinking about extensions to the stable ABI. On the one hand, > introducing new API can cause extension modules not to run on older > Python versions. On the other hand, the new API may well be stable in > itself, i.e. remain av

Re: [Python-Dev] test_hashlib

2012-07-21 Thread Gregory P. Smith
Fixed. The TypeError in this nonsense never gonna work use case is now consistent in 2.7, 3.2 and 3.3. On Sat, Jul 21, 2012 at 7:10 PM, R. David Murray wrote: > On Sun, 22 Jul 2012 01:05:35 -, > =?iso-8859-1?Q?Kristj=E1n_Valur_J=F3nsson?= wrote: > > Indeed, shame on me for not mentioning thi

Re: [Python-Dev] AST optimizer implemented in Python

2012-08-11 Thread Gregory P. Smith
On Sat, Aug 11, 2012 at 11:30 AM, Victor Stinner wrote: > Hi, > > I started to implement an AST optimizer in Python. It's easy to create > a new AST tree, so I'm surprised that I didn't find any existing > project. > > https://bitbucket.org/haypo/misc/src/tip/python/ast_optimizer.py Neat! > >

[Python-Dev] why is _PyBytes_Join not public but PyUnicode_Join is?

2012-08-30 Thread Gregory P. Smith
We have use for _PyBytes_Join in an extension module but technically it isn't a public Python C API... anyone know why? PyUnicode_Join is. Looking up the bytes 'join' method and using the C API to call that method object with proper parameters seems like overkill in the case where we're not deali

Re: [Python-Dev] make decimal the default non-integer instead of float?

2012-09-29 Thread Gregory P. Smith
-cc: python-dev +cc: python-ideas On Sat, Sep 29, 2012 at 11:39 AM, Chris Angelico wrote: > On Sun, Sep 30, 2012 at 4:26 AM, Brett Cannon wrote: > > Does this mean we want to re-open the discussion about decimal constants? > > Last time this came up I think we decided that we wanted to wait for

Re: [Python-Dev] Stdlib and timezones, again

2012-09-30 Thread Gregory P. Smith
On Sun, Sep 30, 2012 at 8:33 AM, Benjamin Peterson wrote: > 2012/9/30 Xavier Morel : > > But at worst, an outdated unicode database will be missing data right? > > > > Doesn't an outdated timezone db have the risk of returning *incorrect* > data? > > Unicode updates also include corrections; howev

Re: [Python-Dev] Stdlib and timezones, again

2012-09-30 Thread Gregory P. Smith
On Sun, Sep 30, 2012 at 3:17 PM, Matthias Klose wrote: > On 30.09.2012 20:18, Gregory P. Smith wrote: > > On Sun, Sep 30, 2012 at 8:33 AM, Benjamin Peterson >wrote: > > > >> 2012/9/30 Xavier Morel : > >>> But at worst, an outdated unicode database will be

Re: [Python-Dev] Benchmarking Python 3.3 against Python 2.7 (wide build)

2012-09-30 Thread Gregory P. Smith
Interesting results! Another data point for the benchmarks that would be interesting is memory consumption of the python process during the runs. In 3.3 a reasonable place to gather this would be to add a callback to the new gc.callbacks and save a snapshot of the process's memory usage before ev

Re: [Python-Dev] Thread/garbage collection race in Popen

2012-10-05 Thread Gregory P. Smith
On Thu, Oct 4, 2012 at 8:56 PM, Ben Leslie wrote: > Hi all, > > I have a Python program where I have many threads each calling Popen, and > I was hitting some trouble. > > I've been seeing this on 3.2.3, however I believe the same issue is still > potentially a problem on head. > > The error mani

Re: [Python-Dev] Python 3.3 vs. Python 2.7 benchmark results (again, but this time more solid numbers)

2012-10-27 Thread Gregory P. Smith
One word: profile. Looking at stat counts alone rather than measuring the total time spent in all types of system calls from strace and profiling is not really useful. ;) Another thing to keep an eye out for within a startup profile: how often does the gc collect? our default gc collection thre

Re: [Python-Dev] urlretrieve regression no.2, now in Python 3.3

2012-11-07 Thread Gregory P. Smith
On Wed, Nov 7, 2012 at 2:42 PM, Terry Reedy wrote: > On 11/7/2012 5:57 AM, anatoly techtonik wrote: >> >> urlretrieve has a callback parameter, which takes function with the >> following prototype: >> >>def callback(block_number, block_size, total_size): >> pass >> >> Where block_size was

Re: [Python-Dev] Handling support for newer OS features at run time

2012-11-27 Thread Gregory P. Smith
On Tue, Nov 27, 2012 at 3:19 PM, Trent Nelson wrote: > On Tue, Nov 27, 2012 at 03:09:12PM -0800, Matthias Klose wrote: > > Am 27.11.2012 23:49, schrieb Trent Nelson: > > > I don't think we've currently got the ability to do this, right? > > > Is there a precedent set anywhere else? I sus

Re: [Python-Dev] Proposing "Argument Clinic", a new way of specifying arguments to builtins for CPython

2012-12-03 Thread Gregory P. Smith
On Mon, Dec 3, 2012 at 2:29 PM, Larry Hastings wrote: > > Say there, the Python core development community! Have I got > a question for you! > > *ahem* > > Which of the following four options do you dislike least? ;-) > > 1) CPython continues to provide no "function signature" >objects (PEP

Re: [Python-Dev] PEP 3145 (With Contents)

2012-12-08 Thread Gregory P. Smith
I'm really not sure what this PEP is trying to get at given that it contains no examples and sounds from the descriptions to be adding a complicated api on top of something that already, IMNSHO, has too much it (subprocess.Popen). Regardless, any user can use the stdout/err/in file objects with th

Re: [Python-Dev] PEP 3145 (With Contents)

2012-12-08 Thread Gregory P. Smith
On Sat, Dec 8, 2012 at 8:14 PM, Glyph wrote: > > On Dec 7, 2012, at 5:10 PM, anatoly techtonik wrote: > > What about reading from other file descriptors? subprocess.Popen allows >> arbitrary file descriptors to be used. Is there any provision here for >> reading and writing non-blocking from o

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

2012-12-09 Thread Gregory P. Smith
On Sun, Dec 9, 2012 at 5:44 PM, Raymond Hettinger < raymond.hettin...@gmail.com> 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 pointer. > > Instead, the 24-byte ent

Re: [Python-Dev] cpython: Using 'long double' to force this structure to be worst case aligned is no

2012-12-13 Thread Gregory P. Smith
On Mon, Dec 10, 2012 at 11:16 PM, Antoine Pitrou wrote: > On Tue, 11 Dec 2012 03:05:19 +0100 (CET) > gregory.p.smith wrote: > > Using 'long double' to force this structure to be worst case aligned > is no > > longer required as of Python 2.5+ when the gc_refs changed from an int (4 > > bytes) t

Re: [Python-Dev] cpython: Using 'long double' to force this structure to be worst case aligned is no

2012-12-13 Thread Gregory P. Smith
On Thu, Dec 13, 2012 at 11:27 PM, Gregory P. Smith wrote: > > On Mon, Dec 10, 2012 at 11:16 PM, Antoine Pitrou wrote: > >> On Tue, 11 Dec 2012 03:05:19 +0100 (CET) >> gregory.p.smith wrote: >> > Using 'long double' to force this structure to be worst ca

Re: [Python-Dev] cpython: Using 'long double' to force this structure to be worst case aligned is no

2012-12-13 Thread Gregory P. Smith
On Mon, Dec 10, 2012 at 11:21 PM, Antoine Pitrou wrote: > On Tue, 11 Dec 2012 08:16:27 +0100 > Antoine Pitrou wrote: > > > On Tue, 11 Dec 2012 03:05:19 +0100 (CET) > > gregory.p.smith wrote: > > > Using 'long double' to force this structure to be worst case aligned > is no > > > longer require

Re: [Python-Dev] cpython: Using 'long double' to force this structure to be worst case aligned is no

2012-12-14 Thread Gregory P. Smith
On Fri, Dec 14, 2012 at 12:02 AM, Ronald Oussoren wrote: > > On 14 Dec, 2012, at 8:27, "Gregory P. Smith" wrote: > > > On Mon, Dec 10, 2012 at 11:16 PM, Antoine Pitrou wrote: > >> On Tue, 11 Dec 2012 03:05:19 +0100 (CET) >> gregory.p.smith wrote:

Re: [Python-Dev] cpython: Using 'long double' to force this structure to be worst case aligned is no

2012-12-14 Thread Gregory P. Smith
, Mark Dickinson wrote: > On Fri, Dec 14, 2012 at 7:27 AM, Gregory P. Smith wrote: > > So changing the definition of the dummy side of the union makes zero > > difference to already compiled code as it (a) doesn't change the > structure's > > size and (b) all exis

Re: [Python-Dev] Possible GIL/threading issue involving subprocess and PyMem_MALLOC...

2012-12-20 Thread Gregory P. Smith
On Thu, Dec 20, 2012 at 10:43 AM, Trent Nelson wrote: > This seems odd to me so I wanted to see what others think. The unit > test Lib/unittest/test/test_runner.py:Test_TextRunner.test_warnings > will eventually hit subprocess.Popen._communicate. > > The `mswindows` implementatio

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-31 Thread Gregory P. Smith
On Sun, Dec 30, 2012 at 5:33 AM, Eli Bendersky wrote: > > > On Sat, Dec 29, 2012 at 5:34 PM, Nick Coghlan wrote: > >> On Sun, Dec 30, 2012 at 10:46 AM, Benjamin Peterson >> wrote: >> > 2012/12/29 Eli Bendersky : >> >> Hi, >> >> >> >> This came up while investigating some test-order-dependency fa

Re: [Python-Dev] test___all__ polluting sys.modules?

2012-12-31 Thread Gregory P. Smith
On Sun, Dec 30, 2012 at 6:48 AM, R. David Murray wrote: > On Mon, 31 Dec 2012 00:38:47 +1000, Nick Coghlan > wrote: > > On Mon, Dec 31, 2012 at 12:19 AM, Eli Bendersky > wrote: > > > On Sun, Dec 30, 2012 at 5:54 AM, Stefan Krah > wrote: > > >> > > >> Eli Bendersky wrote: > > >> > Yes, this is

Re: [Python-Dev] Add "e" (close and exec) mode to open()

2013-01-07 Thread Gregory P. Smith
On Mon, Jan 7, 2013 at 4:03 PM, Benjamin Peterson wrote: > 2013/1/7 Victor Stinner : > > Hi, > > > > I would like add a new flag to open() mode to close the file on exec: > > "e". This feature exists using different APIs depending on the OS and > > OS version: O_CLOEXEC, FD_CLOEXEC and O_NOINHERIT

Re: [Python-Dev] Release or not release the GIL

2013-02-01 Thread Gregory P. Smith
On Fri, Feb 1, 2013 at 7:22 AM, Antoine Pitrou wrote: > Le Fri, 1 Feb 2013 15:18:39 +0100, > "Amaury Forgeot d'Arc" a écrit : > > 2013/2/1 Charles-François Natali > > > > > >> dup2(oldfd, newfd) closes oldfd. > > > > > > > > No, it doesn't close oldfd. > > > > > > > > It may close newfd if it w

Re: [Python-Dev] cpython (2.7): - Issue #17086: Backport the patches from the 3.3 branch to cross-build

2013-02-03 Thread Gregory P. Smith
On Thu, Jan 31, 2013 at 11:14 PM, Antoine Pitrou wrote: > On Fri, 1 Feb 2013 11:00:24 +1000 > Nick Coghlan wrote: > > On Fri, Feb 1, 2013 at 9:50 AM, Antoine Pitrou > wrote: > > > On Thu, 31 Jan 2013 23:52:27 +0100 (CET) > > > matthias.klose wrote: > > >> http://hg.python.org/cpython/rev/8ee6d9

Re: [Python-Dev] Interested in GSoC 2013

2013-02-03 Thread Gregory P. Smith
First, welcome to Python. For people just starting out contributing we have setup a core-mentorship mailing list ideally suited for this type of question. http://mail.python.org/mailman/listinfo/core-mentorship general tip: look for open issues marked with the 'easy' on bugs.python.org. On Sun,

Re: [Python-Dev] Re: Re: 2.4 news reaches interesting places

2004-12-14 Thread Gregory P. Smith
> > we should be able to "sell" Python better than we do now, even without > > the need to resort to such poor measures. I'm sure the Python > > community does have good & creative people that can write a good > > "selling" FAQ for Python, emphasizing the main points of the language. > > No one di

Re: [Python-Dev] 2.4 news reaches interesting places

2004-12-13 Thread Gregory P. Smith
On Wed, Dec 08, 2004 at 02:18:48PM -0800, Guido van Rossum wrote: > I was pleasantly surprised to find a pointer to this article in a news > digest that the ACM emails me regularly (ACM TechNews). > > http://gcn.com/vol1_no1/daily-updates/28026-1.html > > One thing that bugs me: the article says

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-08 Thread Gregory P. Smith
> The md5.h/md5c.c files allow "copy and use", but no modification of > the files. There are some alternative implementations, i.e. in glibc, > openssl, so a replacement should be sage. Any other requirements when > considering a replacement? > > Matthias I believe the "plan" for md5 and sh

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-11 Thread Gregory P. Smith
> I think it would be cleaner and simpler to modify the existing > md5module.c to use the openssl md5 layer API (this is just a > search/replace to change the function names). The bigger problem is > deciding what/how/whether to include the openssl md5 implementation > sources so that win32 can use

Re: [Python-Dev] license issues with profiler.py and md5.h/md5c.c

2005-02-12 Thread Gregory P. Smith
On Sat, Feb 12, 2005 at 08:37:21AM -0500, A.M. Kuchling wrote: > On Sat, Feb 12, 2005 at 01:54:27PM +1100, Donovan Baarda wrote: > > Are there any potential problems with making the md5sum module availability > > "optional" in the same way as this? > > The md5 module has been a standard module for

[Python-Dev] Re: OpenSSL sha module / license issues with md5.h/md5c.c

2005-02-12 Thread Gregory P. Smith
I've created an OpenSSL version of the sha module. trivial to modify to be a md5 module. Its a first version with cleanup to be done and such. being managed in the SF patch manager: https://sourceforge.net/tracker/?func=detail&aid=1121611&group_id=5470&atid=305470 enjoy. i'll do more cleanu

[Python-Dev] Re: OpenSSL sha module / license issues with md5.h/md5c.c

2005-02-13 Thread Gregory P. Smith
On Mon, Feb 14, 2005 at 11:02:23AM +1100, Donovan Baarda wrote: > On Sat, 2005-02-12 at 17:35 -0800, Gregory P. Smith wrote: > > I've created an OpenSSL version of the sha module. trivial to modify > > to be a md5 module. Its a first version with cleanup to be done and >

<    1   2   3   4   5   6   7   >