[Python-Dev] Extent of post-rc churn

2014-02-20 Thread Jim Jewett
http://midwinter.com/~larry/3.4.status/merge.status.html lists enough changes that it sounds more like a bugfix release than just a few last tweaks after the rc. It would probably help if the what's-new-in-rc2 explicitly mentioned that asyncio is new and provisional with 3.4, and listed its

[Python-Dev] DB-API v2.1 or v3 [inspired by: python 3 niggle: None 1 raises TypeError]

2014-02-20 Thread Jim Jewett
I personally regret that sorting isn't safe, but that ship has sailed. There is practicality benefit in making None compare to everything, just as C and Java do with null pointers -- but it is too late to do by default. Adding a keyword to sorted might be nice -- but then shouldn't it also be

Re: [Python-Dev] PEP 460 reboot

2014-01-14 Thread Jim Jewett
On Tue, Jan 14, 2014 at 3:06 PM, Guido van Rossum gu...@python.org wrote: Personally I wouldn't add any words suggesting or referring to the option of creation another class for this purpose. You wouldn't recommend subclassing dict for constraining the types of keys or values, would you? Yes,

Re: [Python-Dev] [Python-checkins] cpython: Close #19762: Fix name of _get_traces() and _get_object_traceback() function

2013-11-25 Thread Jim Jewett
Why are these functions (get_traces and get_object_traceback) private? (1) Is the whole module provisional? At one point, I had thought so, but I don't see that in the PEP or implementation. (I'm not sure that it should be provisional, but I want to be sure that the decision is intentional.)

Re: [Python-Dev] PEP 454 (tracemalloc) disable == clear?

2013-10-30 Thread Jim Jewett
On Wed, Oct 30, 2013 at 6:02 AM, Victor Stinner victor.stin...@gmail.com wrote: 2013/10/30 Jim J. Jewett jimjjew...@gmail.com: Well, unless I missed it... I don't see how to get anything beyond the return value of get_traces, which is a (time-ordered?) list of allocation size with then-current

[Python-Dev] PEP 454 (tracemalloc) disable == clear?

2013-10-28 Thread Jim Jewett
reset() function: Clear traces of memory blocks allocated by Python. Does this do anything besides clear? If not, why not just re-use the 'clear' name from dicts? disable() function: Stop tracing Python memory allocations and clear traces of memory blocks

Re: [Python-Dev] Keyword meanings [was: Accept just PEP-0426]

2012-11-20 Thread Jim Jewett
On 11/20/12, Daniel Holth dho...@gmail.com wrote: On Tue, Nov 20, 2012 at 3:58 PM, Jim J. Jewett jimjjew...@gmail.com wrote: Vinay Sajip reworded the 'Provides-Dist' definition to explicitly say: The use of multiple names in this field *must not* be used for bundling distributions

Re: [Python-Dev] [Python-checkins] cpython: Close #15387: inspect.getmodulename() now uses a new

2012-07-18 Thread Jim Jewett
Why is inspect.getmoduleinfo() deprecated? Is it just to remove circular dependencies? FWIW, I much prefer an API like: tell_me_about(object) to one like: for test_data in (X, Y, Z): usable = tester(object, test_data) if valid(usable): return

[Python-Dev] PEP 362 minor nits

2012-06-19 Thread Jim Jewett
I've limited this to minor issues, but kept python-dev in the loop because some are questions, rather than merely editorial. Based on: http://hg.python.org/peps/file/tip/pep-0362.txt view pep-0362.txt @ 4466:659639095ace Committing the latest changes to PEP 362 on behalf of Yury Selivanov.

Re: [Python-Dev] PEP 362 minor nits

2012-06-19 Thread Jim Jewett
On Tue, Jun 19, 2012 at 11:53 AM, Yury Selivanov yselivanov...@gmail.com wrote: Based on:  http://hg.python.org/peps/file/tip/pep-0362.txt view pep-0362.txt @ 4466:659639095ace ==   142 * args : tuple   143     Tuple of positional arguments values.  Dynamically computed from

Re: [Python-Dev] PEP 362 minor nits

2012-06-19 Thread Jim Jewett
On Tue, Jun 19, 2012 at 2:10 PM, Yury Selivanov yselivanov...@gmail.com wrote: On 2012-06-19, at 12:33 PM, Jim Jewett wrote: On Tue, Jun 19, 2012 at 11:53 AM, Yury Selivanov yselivanov...@gmail.com wrote: Based on:  http://hg.python.org/peps/file/tip/pep-0362.txt view pep-0362.txt @ 4466

Re: [Python-Dev] PEP 362: 4th edition

2012-06-18 Thread Jim Jewett
On Sat, Jun 16, 2012 at 11:27 AM, Nick Coghlan ncogh...@gmail.com wrote: On Sat, Jun 16, 2012 at 1:56 PM, Jim J. Jewett jimjjew...@gmail.com wrote:    *Every* Parameter attribute is optional, even name.  (Think of  builtins, even if they aren't automatically supported yet.)   So go ahead

Re: [Python-Dev] PEP 362: 4th edition

2012-06-18 Thread Jim Jewett
On Mon, Jun 18, 2012 at 10:37 AM, Yury Selivanov yselivanov...@gmail.com wrote: Jim, On 2012-06-18, at 3:08 AM, Jim Jewett wrote: On Sat, Jun 16, 2012 at 11:27 AM, Nick Coghlan ncogh...@gmail.com wrote: On Sat, Jun 16, 2012 at 1:56 PM, Jim J. Jewett jimjjew...@gmail.com wrote:    Instead

Re: [Python-Dev] (time) PEP 418 glossary V2

2012-04-24 Thread Jim Jewett
On Tue, Apr 24, 2012 at 6:38 AM, Victor Stinner victor.stin...@gmail.com wrote: Monotonic - This is a particularly tricky term, as there are several subtly incompatible definitions in use. Is it a definition for the glossary? One use case for a PEP is that someone who does *not*

Re: [Python-Dev] [Python-checkins] peps: Note that ImportError will no longer be raised due to a missing __init__.py

2012-04-24 Thread Jim Jewett
On Thu, Apr 19, 2012 at 18:56, eric.smith wrote: +Note that an ImportError will no longer be raised for a directory +lacking an ``__init__.py`` file. Such a directory will now be imported +as a namespace package, whereas in prior Python versions an +ImportError would be raised. Given that

[Python-Dev] (time) PEP 418 glossary V2

2012-04-23 Thread Jim Jewett
Glossary Absolute Time - A measurement of time since a specific Epoch_, typically far in the past. Civil Time is the most common example. Typically contrasted with a `Duration`_, as (now - epoch) is generally much larger than any duration that can be appropriately measured

[Python-Dev] PEP 418 glossary

2012-04-11 Thread Jim Jewett
I believe PEP 418 (or at least the discussion) would benefit greatly from a glossary to encourage people to use the same definitions. This is arguably the Definitions section, but it should move either near the end or (preferably) ahead of the Functions. It also needs to be greatly expanded.

[Python-Dev] Who are the decimal volunteers? Re: [Python-checkins] cpython: Resize the coefficient to MPD_MINALLOC also if the requested size is below

2012-04-09 Thread Jim Jewett
I remember that one of the concerns with cdecimal was whether it could be maintained by anyone except Stefan (and a few people who were already overcommitted). If anyone (including absolute newbies) wants to step up, now would be a good time to get involved. A few starter questions, whose answer

Re: [Python-Dev] [Python-checkins] cpython (3.2): attempt to fix asyncore buildbot failure

2012-03-23 Thread Jim Jewett
What does this verify? My assumption from the name (test_quick_connect) and the context (an asynchronous server) is that it is verifying the server can handle a certain level of load. Refusing the sockets should then be a failure, or at least a skipped test. Would the below fail even if

Re: [Python-Dev] [Python-checkins] cpython (2.7): Fixes Issue 14234: fix for the previous commit, keep compilation when

2012-03-19 Thread Jim Jewett
Does this mean that if Python is updated before expat, python will compile out the expat randomization, and therefore not use if even after expat is updated? -jJ On Thu, Mar 15, 2012 at 2:01 PM, benjamin.peterson python-check...@python.org wrote: http://hg.python.org/cpython/rev/ada6bfbeceb8

Re: [Python-Dev] [Python-checkins] cpython: Close #14205: dict lookup raises a RuntimeError if the dict is modified during

2012-03-09 Thread Jim Jewett
I do not believe the change set below is valid. As I read it, the new test verifies that one particular type of Nasty key will provoke a RuntimeError -- but that particular type already did so, by hitting the recursion limit. (It doesn't even really mutate the dict.) Meanwhile, the patch throws

Re: [Python-Dev] [Python-checkins] peps: Switch back to named functions, since the Ellipsis version degenerated badly

2012-02-23 Thread Jim Jewett
On Wed, Feb 22, 2012 at 10:22 AM, nick.coghlan python-check...@python.org wrote: +    in x = weakref.ref(target, report_destruction) +    def report_destruction(obj):         print({} is being destroyed.format(obj)) +If the repetition of the name seems especially annoying, then a throwaway

Re: [Python-Dev] PEP for new dictionary implementation

2012-02-17 Thread Jim Jewett
On Fri, Feb 17, 2012 at 1:50 AM, Martin v. Löwis mar...@v.loewis.de wrote: Good idea. However, how do you track per-dict how large the table is? [Or, rather, what is the highest index needed to store any values that are actually set for this instance.] To determine whether it needs to grow

Re: [Python-Dev] PEP for new dictionary implementation

2012-02-16 Thread Jim Jewett
On Thu, Feb 16, 2012 at 4:34 PM, Martin v. Löwis mar...@v.loewis.de wrote: Am 16.02.2012 19:24, schrieb Jim J. Jewett: PEP author Mark Shannon wrote (in http://mail.python.org/pipermail/python-dev/attachments/20120208/05be469a/attachment.txt): ... allows ... (the ``__dict__`` attribute of

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

2012-02-06 Thread Jim Jewett
I realize that _Py_Identifier is a private name, and that PEP 3131 requires anything (except test cases) in the standard library to stick with ASCII ... but somehow, that feels like too long of a chain. I would prefer to see _Py_Identifier renamed to _Py_ASCII_Identifier, or at least a comment

[Python-Dev] Hash collision security issue (now public)

2012-01-06 Thread Jim Jewett
In http://mail.python.org/pipermail/python-dev/2012-January/115350.html, Mark Shannon wrote: The minimal proposed change of seeding the hash from a global value (a single memory read and an addition) will have such a minimal performance effect that it will be undetectable even on the most

[Python-Dev] Proposed PEP on concurrent programming support

2012-01-04 Thread Jim Jewett
(I've added back python-ideas, because I think that is still the appropriate forum.) A new suite type - the ``transaction`` will be added to the language. The suite will have the semantics discussed above: modifying an object in the suite will trigger creation of a thread-local shallow

Re: [Python-Dev] That depends on what the meaning of is is (was Re: http://mail.python.org/pipermail/python-dev/2011-December/115172.html)

2012-01-03 Thread Jim Jewett
On Mon, Jan 2, 2012 at 7:16 PM, PJ Eby p...@telecommunity.com wrote: On Mon, Jan 2, 2012 at 4:07 PM, Jim Jewett jimjjew...@gmail.com wrote: But the public header file http://hg.python.org/cpython/file/3ed5a6030c9b/Include/dictobject.h defines the typedef structs for PyDictEntry

Re: [Python-Dev] That depends on what the meaning of is is (was Re: http://mail.python.org/pipermail/python-dev/2011-December/115172.html)

2012-01-02 Thread Jim Jewett
On Mon, Jan 2, 2012 at 1:16 AM, PJ Eby p...@telecommunity.com wrote: On Sun, Jan 1, 2012 at 10:28 PM, Jim Jewett jimjjew...@gmail.com wrote: Given the wording requiring a real dictionary, I would have assumed that it was OK (if perhaps not sensible) to do pointer arithmetic and access

[Python-Dev] Hash collision security issue (now public)

2012-01-01 Thread Jim Jewett
Steven D'Aprano (in http://mail.python.org/pipermail/python-dev/2011-December/115162.html) wrote: By compile-time, do you mean when the byte-code is compilated, i.e. just before runtime, rather than a switch when compiling the Python executable from source? No. I really mean when the C code

[Python-Dev] Hash collision security issue (now public)

2012-01-01 Thread Jim Jewett
Paul McMillan in http://mail.python.org/pipermail/python-dev/2012-January/115183.html wrote: Guido van Rossum wrote: Hm. I'm not sure I like the idea of extra arithmetic for every character being hashed. the collision generator doesn't necessarily vary the length of the string.

[Python-Dev] Hash collision security issue (now public)

2012-01-01 Thread Jim Jewett
Victor Stinner wrote in http://mail.python.org/pipermail/python-dev/2012-January/115198.html If we want to protect a website against this attack for example, we must suppose that the attacker can inject arbitrary data and can get (indirectly) the result of hash(str) (e.g. with the

[Python-Dev] http://mail.python.org/pipermail/python-dev/2011-December/115172.html

2012-01-01 Thread Jim Jewett
In http://mail.python.org/pipermail/python-dev/2011-December/115172.html, P. J. Eby wrote: On Sat, Dec 31, 2011 at 7:03 AM, Stephen J. Turnbull stephen at xemacs.org wrote: While the dictionary probe has to start with a hash for backward compatibility reasons, is there a reason the overflow

Re: [Python-Dev] http://mail.python.org/pipermail/python-dev/2011-December/115172.html

2012-01-01 Thread Jim Jewett
On Sun, Jan 1, 2012 at 8:04 PM, Christian Heimes li...@cheimes.de wrote: Am 02.01.2012 01:37, schrieb Jim Jewett: Well, there is nothing wrong with switching to a different hash function after N collisions, rather than in the first place.  The perturbation effectively does by shoving

Re: [Python-Dev] http://mail.python.org/pipermail/python-dev/2011-December/115172.html

2012-01-01 Thread Jim Jewett
On Sun, Jan 1, 2012 at 10:00 PM, PJ Eby p...@telecommunity.com wrote: On Sun, Jan 1, 2012 at 7:37 PM, Jim Jewett jimjjew...@gmail.com wrote: Well, there is nothing wrong with switching to a different hash function after N collisions, rather than in the first place.  The perturbation

[Python-Dev] Hash collision security issue (now public)

2011-12-30 Thread Jim Jewett
In http://mail.python.org/pipermail/python-dev/2011-December/115138.html, Christian Heimes pointed out that ... we don't have to alter the outcome of hash ... We just need to reduce the chance that an attacker can produce collisions in the dict (and set?) I'll state it more strongly. hash

[Python-Dev] A new dict for Xmas?

2011-12-16 Thread Jim Jewett
Greg Ewing wrote: Mark Shannon wrote: I have a new dict implementation which allows sharing of keys between objects of the same class. We already have the __slots__ mechanism for memory savings. Have you done any comparisons with that? You can't make Python programmers use slots, neither

Re: [Python-Dev] PyUnicodeObject / PyASCIIObject questions

2011-12-13 Thread Jim Jewett
On Tue, Dec 13, 2011 at 2:55 AM, Martin v. Löwis mar...@v.loewis.de wrote: (1)  Why is PyObject_HEAD used instead of PyObject_VAR_HEAD? The unicode object is not a var object. In a var object, tp_itemsize gives the element size, which is not possible for unicode objects, since the itemsize

[Python-Dev] PyUnicodeObject / PyASCIIObject questions

2011-12-12 Thread Jim Jewett
(see http://www.python.org/dev/peps/pep-0393/ and http://hg.python.org/cpython/file/6f097ff9ac04/Include/unicodeobject.h ) typedef struct { PyObject_HEAD Py_ssize_t length; Py_hash_t hash; struct { unsigned int interned:2;

[Python-Dev] Case consistency [was: Re: [Python-checkins] cpython: Cleanup code: remove int/long idioms and simplify a while statement.]

2011-10-24 Thread Jim Jewett
Is there a reason to check for  if s[:5] == 'pass ' or s[:5] == 'PASS ': instead of if s[:5].lower() == 'pass' ? If so, it should be documented; otherwise, I would rather see the more inclusive form, that would also allow things like Pass -jJ On Sun, Oct 23, 2011 at 4:21 PM,

Re: [Python-Dev] [Python-checkins] cpython: Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array

2011-09-29 Thread Jim Jewett
On Wed, Sep 28, 2011 at 8:07 PM, Benjamin Peterson benja...@python.org wrote: 2011/9/28 victor.stinner python-check...@python.org: http://hg.python.org/cpython/rev/36fc514de7f0 changeset:   72512:36fc514de7f0 ... Thanks Rusty Russell for having written these amazing C macros! Do we really

Re: [Python-Dev] [Python-checkins] cpython: #11572: improvements to copy module tests along with removal of old test suite

2011-08-05 Thread Jim Jewett
Why was the old test suite removed? Even if everything is covered by the test file (and that isn't clear from this checkin), I don't see anything wrong with a quick test that doesn't require loading the whole testing apparatus. (I would have no objection to including a comment saying that the

Re: [Python-Dev] [Python-checkins] cpython: Remove mention of medical condition from the test suite.

2011-07-04 Thread Jim Jewett
If you're going to get rid of the pun, you might as well change the whole sentence... On Sun, Jul 3, 2011 at 1:22 PM, georg.brandl python-check...@python.org wrote: http://hg.python.org/cpython/rev/76452b892838 changeset:   71146:76452b892838 parent:      71144:ce52310f61a0 user:        Georg

Re: [Python-Dev] [Python-checkins] cpython: #6771: Move wrapper function into __init__ and eliminate wrapper module

2011-06-19 Thread Jim Jewett
Does this really need to be a bare except? On Sat, Jun 18, 2011 at 8:21 PM, r.david.murray python-check...@python.org wrote: http://hg.python.org/cpython/rev/9c96c3adbcd1 changeset:   70867:9c96c3adbcd1 user:        R David Murray rdmur...@bitdance.com date:        Sat Jun 18 20:21:09 2011

Re: [Python-Dev] [Python-checkins] cpython (2.7): Issue #11277: Remove useless test from test_zlib.

2011-05-09 Thread Jim Jewett
Can you clarify (preferably in the commit message as well) exactly *why* these largefile tests are useless? For example, is there another test that covers this already? -jJ On 5/7/11, nadeem.vawda python-check...@python.org wrote: http://hg.python.org/cpython/rev/201dcfc56e86 changeset:

Re: [Python-Dev] [Python-checkins] cpython: _PyImport_LoadDynamicModule() encodes the module name explicitly to ASCII

2011-05-09 Thread Jim Jewett
Are you asserting that all foreign modules (or at least all handled by this) are in C, as opposed to C++ or even Java or Fortran? (And the C won't change?) Is this ASCII restriction (as opposed to even UTF8) really needed? Or are you just saying that we need to create an ASCII name for passing

Re: [Python-Dev] [Python-checkins] cpython: Userlist.copy() wasn't returning a UserList.

2011-05-06 Thread Jim Jewett
Do you also want to assert that u is not v, or would that sort of copy be acceptable by some subclasses? On 5/5/11, raymond.hettinger python-check...@python.org wrote: http://hg.python.org/cpython/rev/f20373fcdde5 changeset: 69865:f20373fcdde5 user:Raymond Hettinger pyt...@rcn.com

Re: [Python-Dev] [Python-checkins] cpython: PyGILState_Ensure(), PyGILState_Release(), PyGILState_GetThisThreadState() are

2011-04-27 Thread Jim Jewett
Would it be a problem to make them available a no-ops? On 4/26/11, victor.stinner python-check...@python.org wrote: http://hg.python.org/cpython/rev/75503c26a17f changeset: 69584:75503c26a17f user:Victor Stinner victor.stin...@haypocalc.com date:Tue Apr 26 23:34:58 2011

Re: [Python-Dev] [Python-checkins] cpython (3.2): Issue #11919: try to fix test_imp failure on some buildbots.

2011-04-26 Thread Jim Jewett
This seems to be changing what is tested -- are you saying that filenames with an included directory name are not intended to be supported? On 4/25/11, antoine.pitrou python-check...@python.org wrote: http://hg.python.org/cpython/rev/2f2c7eb27437 changeset: 69556:2f2c7eb27437 branch:

[Python-Dev] clarification: subset vs equality Re: [Python-checkins] peps: Draft of PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements

2011-04-05 Thread Jim Jewett
On 4/4/11, brett.cannon python-check...@python.org wrote: Draft of PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements +Abstract + + +The Python standard library under CPython contains various instances +of modules implemented in both pure Python and C. This PEP

Re: [Python-Dev] [Python-checkins] r87980 - in python/branches/py3k/Lib/importlib: _bootstrap.py abc.py

2011-01-13 Thread Jim Jewett
Why? Are annotations being deprecated in general? Or are these particular annotations no longer accurate? -jJ On Wed, Jan 12, 2011 at 9:31 PM, raymond.hettinger python-check...@python.org wrote: Author: raymond.hettinger Date: Thu Jan 13 03:31:25 2011 New Revision: 87980 Log: Issue

Re: [Python-Dev] [Python-checkins] r87523 - python/branches/py3k/Doc/tutorial/interpreter.rst

2010-12-28 Thread Jim Jewett
It might still be worth saying something like: Note that this python file does something subtly different; the details are not included in this tutorial. On Tue, Dec 28, 2010 at 4:18 AM, georg.brandl python-check...@python.org wrote: Author: georg.brandl Date: Tue Dec 28 10:18:24 2010 New

[Python-Dev] __file__ and bytecode-only

2010-03-03 Thread Jim Jewett
I understand the need to ship without source -- but why does that require supporting .pyc (or .pyo) -only? Couldn't vendors just replace the real .py files with empty files? Then no one would need the extra stat call, and no one would be bitten by orphaned .pyc files after a rename. [Yes, zips

[Python-Dev] codecs.oen [was: PEP 385: the eol-type issue]

2009-08-09 Thread Jim Jewett
M.-A. Lemburg wrote: ... and because of this, the feature is already available if you use codecs.open() instead of the built-in open(): Neil Hodgson asked: So should I not add an issue for the basic open because codecs.open should be used for this case? In python 3, why does codecs.open

[Python-Dev] standard library mimetypes module pathologically broken?

2009-08-02 Thread Jim Jewett
[It may be worth creating a patch; I think most of these comments would be better on the bug-tracker.] (1) In a few cases, it looked like you were changing parameter names between files and filenames. This might break code that was calling it with keyword arguments -- as I typically would for

[Python-Dev] PEP 384: Defining a Stable ABI

2009-05-22 Thread Jim Jewett
Martin v. Löwis wrote: - PyGetSetDef (name, get, set, doc, closure) Is it fully decided that the generally-unused closure parameter will stay until python 4? The accessor macros to these fields (Py_REFCNT, Py_TYPE, Py_SIZE) are also available to applications. There have been several

[Python-Dev] PEP 383 and GUI libraries

2009-05-03 Thread Jim Jewett
(sent only to python-dev, as I am not a subscriber of tahoe-dev) Zooko wrote: [Tahoe] currently uses utf-8 for its internal storage (note: nothing to do with reading or writing files from external sources -- only for storing filenames in the decentralized storage system which is accessed by

[Python-Dev] #!/usr/bin/env python -- python3 where applicable

2009-04-30 Thread Jim Jewett
Jared Grubb wrote: Ok, so if I understand, the situation is: * python points to 2.x version * python3 points to 3.x version * need to be able to run certain 3k scripts from cmdline (since we're talking about shebangs) using Python3k even though python points to 2.x So, if I got the

[Python-Dev] package resources [was: setuptools has divided the Python community]

2009-03-28 Thread Jim Jewett
At 11:27 PM 3/26/2009 +, Paul Moore wrote: What I'd really like is essentially some form of virtual filesystem access to stuff addressed relative to a Python package name, P.J. Eby responded: Note that relative to a *Python package name* isn't quite as useful, due to namespace packages.

[Python-Dev] return from a generator [was:PEP 380 (yield from a subgenerator) comments]

2009-03-26 Thread Jim Jewett
On Thu, Mar 26, 2009 at 4:19 PM, P.J. Eby wrote: What I don't like is the confusion of adding return values to generators, at least using the 'return' statement. At Fri Mar 27 04:39:48 CET 2009, Guido van Rossum replied: I'm +1 on yield from and +0 on return values in generators. def g():

[Python-Dev] wait time [was: Ext4 data loss]

2009-03-12 Thread Jim Jewett
It is starting to look as though flush (and close?) should take an optional wait parameter, to indicate how much re-assurance you're willing to wait for. It also looks like we can't know enough to predict all sensible symbolic constants -- so instead use a floating point numeric value.

Re: [Python-Dev] wait time [was: Ext4 data loss]

2009-03-12 Thread Jim Jewett
On 3/12/09, Martin v. Löwis mar...@v.loewis.de wrote: It is starting to look as though flush (and close?) should take an optional wait parameter, to indicate how much re-assurance you're willing to wait for. Unfortunately, such a thing would be unimplementable on most of today's operating

[Python-Dev] sure [was: Ext4 data loss]

2009-03-12 Thread Jim Jewett
[new name instead of wait -- but certainty is too long, patience too hard to spell, etc...] class file(_file): ... def flush(self, sure=0): super().flush(self) if sure 0.25: return if sure 0.5 and os.fdatasync:

Re: [Python-Dev] Integrate BeautifulSoup into stdlib?

2009-03-08 Thread Jim Jewett
Michael Foord wrote: Chris Withers wrote: ... love to see ... but ... not optimistic - python to grow a decent, cross platform, package management system As stated, this may be impossible, because of the difference in what a package should mean on Windows vs Unix. If you just mean a way to

[Python-Dev] html5lib/BeautifulSoup (was: Integrate lxml into the stdlib? (was: Integrate BeautifulSoup into stdlib?))

2009-03-05 Thread Jim Jewett
Stefan Behnel wrote: I would have a hard time feeling happy if a real-world HTML parser was added to the stdlib that provides a totally different interface than the best (and fastest) XML library that the stdlib currently has. I doubt there would be any objection to someone contributing

[Python-Dev] #ifdef __cplusplus?

2009-01-02 Thread Jim Jewett
Alexander Belopolsky wrote: 4. Should exported symbols be always declared in headers or is it ok to just declare them as extern in .c files where they are used? Is the concern that moving them to a header makes them part of the API? In other words, does replacing PyObject *

[Python-Dev] Merging flow

2008-12-05 Thread Jim Jewett
Nick Coghlan wrote: For now it looks like we might have to maintain 3.0 manually, with svnmerge only helping out for trunk-2.6 and trunk-py3k Does it make the bookkeeping horrible if you merge from trunk straight to 3.0, and then blocked svnmerged changes from propagating? -jJ

[Python-Dev] Looking for VCS usage scenarios

2008-11-05 Thread Jim Jewett
David Ripton wrote: Time for average user to check out Python sources with bzr: 10 minutes Time for average user to check out Python sources with git or hg: 1 minute Time for average user's trivial patch to be reviewed and committed: 1 year I love DVCS as much as the next guy, but checkout

[Python-Dev] www.python.org/doc and docs.python.org hotfixed

2008-10-10 Thread Jim Jewett
For the search engine issue, is there any way we can tell robots to ignore the rewrite rules so they see the broken links? (although even that may not be ideal, since what we really want is to tell the robot the link is broken, and provide the new alternative) I may be missing something

[Python-Dev] syntax change justification

2008-10-10 Thread Jim Jewett
Nick Coghlan's explanation of what justifies a syntax change (most of message http://mail.python.org/pipermail/python-dev/2008-October/082831.html ) should probably be added to the standard docs/FAQs somewhere. At the moment, I'm not sure exactly where, though. At the moment, the Developer FAQ

[Python-Dev] backporting tests [was: [Python-checkins] r66863 - python/trunk/Modules/posixmodule.c]

2008-10-10 Thread Jim Jewett
In http://mail.python.org/pipermail/python-dev/2008-October/082994.html Martin v. Löwis wrote: So 2.6.0 will contain a lot of tests that have never been tested in a wide variety of systems. Some are incorrect, and get fixed in 2.6.1, and stay fixed afterwards. This is completely different from

[Python-Dev] Advice on numbers.py implementation of binary mixins.

2008-06-14 Thread Jim Jewett
Raymond Hettinger wrote: PEP-3141 outlines an approach to writing binary operators to allow the right operand to override the operation if the left operand inherits the operation from the ABC. Here is my first approximation at how to write them for the Integral mixins: class

[Python-Dev] Proposal: add odict to collections

2008-06-14 Thread Jim Jewett
The odict (as proposed here, ordered on time of key insertion) looks like a close match to the dlict needed by some of the optimization proposals. http://python.org/dev/peps/pep-0267/ -jJ ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] [Python-3000] Betas today - I hope

2008-06-12 Thread Jim Jewett
On 6/12/08, Nick Coghlan [EMAIL PROTECTED] wrote: documentation patch for the language reference ... following categories: ... 2. Method lookup MAY bypass __getattribute__, shadowing the attribute in the instance dictionary MAY have ill effects. (slots such as __enter__ and __exit__ that

[Python-Dev] Mini-Pep: An Empty String ABC

2008-06-06 Thread Jim Jewett
So, apart from compatibility purposes, what is the point currently of *not* directly subclassing str? To provide your own storage format, such as a views into existing data. Whether or not this is actually practical is a different question; plenty C code tends to assume it can use the

[Python-Dev] PEP 8 vs PEP 371: Additional Discussion

2008-06-05 Thread Jim Jewett
Guido van Rossum wrote: I consider multiprocessing a new API -- while it bears a superficial resemblance with the threading API the similarities are just that, and it should not be constrained by mistakes in that API. The justification for including it is precisely that it is *not* a new

Re: [Python-Dev] [Python-3000] Iterable String Redux (aka String ABC)

2008-05-27 Thread Jim Jewett
On 5/27/08, Benji York wrote: Guido van Rossum wrote: Armin Ronacher wrote: Basically *the* problematic situation with iterable strings is something like a `flatten` function that flattens out every iterable object except of strings. I'm not against this, but so far I've not been

[Python-Dev] Encoding detection in the standard library?

2008-04-21 Thread Jim Jewett
David Wolever wrote: IMO, encoding estimation is something that many web programs will have to deal with, so it might as well be built in; I would prefer the option to run `text=input.encode('guess')` (or something similar) than relying on an external dependency or worse yet using a

[Python-Dev] unscriptable?

2008-04-19 Thread Jim Jewett
I dispute this. Indices aren't necessarily numeric (think of an A-Z file), Python has recently added an __index__ slot which means as an integer, and I really am an integer, I'm not just rounding like int(3.4) would do So in the context of python, an index is numeric, whereas subscript has

[Python-Dev] windows (was: how to easily consume just the parts of eggs that are good for you)

2008-04-09 Thread Jim Jewett
Are the Linux users happy with having a Python package manager that ignores RPM/apt? Why should Windows users be any happier? Because, as you noted, the add/remove programs application is severely limited. I've read one too many Windows is so broken that people who use it obviously don't

[Python-Dev] Proposal: from __future__ import unicode_string_literals

2008-03-24 Thread Jim Jewett
Maybe it's not apparent to people that hasn't developed in that kind of environment, and I'm sorry I'm not able to make this clearer. I think I understand the issue. Some contributors will be running under 2.6, others will be running under 3.0. Either the code forks, or one of them is

Re: [Python-Dev] [Python-checkins] r61709 - python/trunk/Doc/library/functions.rst python/trunk/Doc/library/future_builtins.rst python/trunk/Doc/library/python.rst

2008-03-23 Thread Jim Jewett
What is the precise specification of the builtin print function. Does it call str, or does it just behave as if the builtin str had been called? In 2.5, the print statement ignores any overrides of the str builtin, but I'm not sure whether a _function_ should -- and I do think it should be

[Python-Dev] windows standard [was: PEP 365 (Adding the pkg_resources module)]

2008-03-23 Thread Jim Jewett
Terry Reedy The standard (and to me, preferable) way of dealing with such things is to have an 'installation manager' that can reinstall as well as delete and that has a check box for various things to delete. This is what Python needs. Paul Moore: I'd dispute strongly that this is a

Re: [Python-Dev] [Python-checkins] logging shutdown (was: Re: r61431 - python/trunk/Doc/library/logging.rst)

2008-03-19 Thread Jim Jewett
On 3/19/08, Vinay Sajip [EMAIL PROTECTED] wrote: I think (repeatedly) testing an app through IDLE is a reasonable use case. [other threads may still have references to loggers or handlers] Would it be reasonable for shutdown to remove logging from sys.modules, so that a rerun has some

[Python-Dev] logging shutdown (was: Re: [Python-checkins] r61431 - python/trunk/Doc/library/logging.rst)

2008-03-18 Thread Jim Jewett
I think (repeatedly) testing an app through IDLE is a reasonable use case. Would it be reasonable for shutdown to remove logging from sys.modules, so that a rerun has some chance of succeeding via its own import? -jJ On 3/16/08, vinay.sajip [EMAIL PROTECTED] wrote: Author: vinay.sajip Date:

[Python-Dev] Py_CLEAR to avoid crashes

2008-02-18 Thread Jim Jewett
A simple way to do this would be to push objects whose refcounts had reached 0 onto a list instead of finalizing them immediately, and have PyEval_EvalFrameEx periodically swap in a new to-delete list and delete the objects on the old one. Some of the memory management threads discussed

Re: [Python-Dev] [Python-3000] Rounding Decimals

2008-01-14 Thread Jim Jewett
On 1/12/08, Guido van Rossum [EMAIL PROTECTED] wrote: On Jan 12, 2008 5:09 PM, Jeffrey Yasskin [EMAIL PROTECTED] wrote: During the discussion about the new Rational implementation (http://bugs.python.org/issue1682), Guido and Raymond decided that Decimal should not implement the new Real

[Python-Dev] Coverity Scan, Python upgraded to rung 2

2008-01-11 Thread Jim Jewett
Neal Norwitz wrote: For codeobject.c, line 327 should not be reachable. ... Christian Heimes wrote: Please suppress the warning. I removed the last two lines and GCC complained ... Either way, it would be worth adding a comment to the source code so this doesn't come up again. -jJ

Re: [Python-Dev] Non-string keys in namespace dicts

2007-12-04 Thread Jim Jewett
PJE wrote: Isn't the simplest way to cache attribute lookups to just have a cache dictionary in the type, and update that dictionary whenever a change is made to a superclass? That's essentially how __slotted__ attribute changes on base classes work now, isn't it? Neil Toronto wrote:

[Python-Dev] SSL 1.7

2007-10-17 Thread Jim Jewett
Bill Janssen wrote: One thing to watch out for: ssl.SSLError can't inherit from socket.error, as it does in 2.6+, Why not? -jJ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

[Python-Dev] SSL 1.7

2007-10-17 Thread Jim Jewett
Bill Janssen wrote: One thing to watch out for: ssl.SSLError can't inherit from socket.error, as it does in 2.6+, Why not? -jJ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

[Python-Dev] urllib exception compatibility

2007-09-26 Thread Jim Jewett
urllib goes to goes to some trouble to ensure that it raises IOError, even when the underlying exception comes from another module.[*] I'm wondering if it would make sense to just have those modules' exceptions inherit from IOError. In particular, should socket.error, ftp.Error and

[Python-Dev] PEP 362: Signature objects

2007-09-07 Thread Jim Jewett
Brett Cannon wrote: A Signature object has the following structure attributes: * name : str Name of the function. This is not fully qualified because function objects for methods do not know the class they are contained within. This makes functions and methods

Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-14 Thread Jim Jewett
On 7/14/07, Andy C [EMAIL PROTECTED] wrote: On 7/13/07, Jim Jewett [EMAIL PROTECTED] wrote: while I think it would be a bad practice to import __main__, I have seen it recommended as the right place to store global (cross-module) settings. Where? People use __main__.py now

[Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-13 Thread Jim Jewett
Andy C wrote: ... a .zip file with a __zipmain__.py module at its root? Why not just an __init__.py, which you would normally execute if you tried to import/run a directory? * Magically looking at the first argument to see if it's a zip file seems problematic to me. I'd rather be explicit

[Python-Dev] [RFC] urlparse - parse query facility

2007-06-13 Thread Jim Jewett
a) import cgi and call cgi module's query_ps. [circular imports] or b) Implement a stand alone query parsing facility in urlparse *AS IN* cgi module. Assuming (b), please remove the (code for the) parsing from the cgi module, and just import it back from urlparse (or urllib). Since cgi

[Python-Dev] svn viewer confused

2007-06-04 Thread Jim Jewett
Choosing a revision, such as http://svn.python.org/view/python/trunk/Objects/?rev=55606sortby=dateview=log does not lead to the correct generated page; it either times out or generates a much older changelog. ___ Python-Dev mailing list

[Python-Dev] Wither PEP 335 (Overloadable Boolean Operators)?

2007-05-25 Thread Jim Jewett
Greg, If you do update this PEP, please update the __not__ portion as well, at least regarding possible return values. It currently says that __not__ can return NotImplemented, which falls back to the current semantics. (Why? to override an explicit __not__? Then why not just put the current

[Python-Dev] The docs, reloaded

2007-05-22 Thread Jim Jewett
Martin v. Löwis schrieb: That docutils happens to be written in Python should make little difference - it's *not* part of the Python language project, and is just a tool for us, very much like latex and latex2html. Not entirely. When I first started looking at python, I read a lot of

[Python-Dev] updated PEP3125, Remove Backslash Continuation

2007-05-04 Thread Jim Jewett
Major rewrite. The inside-a-string continuation is separated from the general continuation. The alternatives section is expaned to als list Andrew Koenig's improved inside-expressions variant, since that is a real contender. If anyone feels I haven't acknowledged their concerns, please tell me.

  1   2   3   >