[Python-Dev] Re: Are "Batteries Included" still a Good Thing? [was: It's now time to deprecate the stdlib urllib module]

2022-03-29 Thread Skip Montanaro
I was trying to think through how a "remote" stdlib might work. In the process, I got to wondering if there are known "specialists" for various current modules. Every now and then I still get assigned (or at least made nosy) about something to do with the csv module. Is there an official module-by-

[Python-Dev] Re: Are "Batteries Included" still a Good Thing? [was: It's now time to deprecate the stdlib urllib module]

2022-03-29 Thread Skip Montanaro
> > There's the CODEOWNERS file: > https://github.com/python/cpython/blob/main/.github/CODEOWNERS Thanks. Never would have thought there was such a thing. I was looking for files with "maintain" in them. Skimming it, it would seem that most of the stuff in Lib or Modules isn't really associated w

[Python-Dev] Re: Are "Batteries Included" still a Good Thing? [was: It's now time to deprecate the stdlib urllib module]

2022-03-30 Thread Skip Montanaro
On Wed, Mar 30, 2022, 12:02 PM Toshio Kuratomi wrote: > > As just one example, i found two interesting items in the discussion > started by Skip about determining what modules don't have maintainers just > downstream if this. > Age in snake years doesn't necessarily correlate well with one's des

[Python-Dev] Re: About PEPs being discussed on Discourse

2022-04-08 Thread Skip Montanaro
> > Discourse it just flat-out easier to admin: individuals can flag posts, > automatic spam detection, site-wide admins instead of per-list, ability to > split topics, ability to lock topics, ability to "slow down" topics, > time-limited suspensions, etc. I quit being an admin for any ML beyond >

[Python-Dev] Can I ask a real dumb procedural question about GitHub email?

2022-05-04 Thread Skip Montanaro
I subscribe to the python/cpython stuff on GitHub. I find it basically impossible to follow because of the volume. I realize there are probably plenty of extra changes going in based on the recent language summit (and maybe some sprints at PyCon?) as well as the proximity to the beta 1 freeze. Stil

[Python-Dev] Re: Switching to Discourse

2022-07-15 Thread Skip Montanaro
> > The discuss.python.org experiment has been going on for quite a while, > and while the platform is not without its issues, we consider it a > success. The Core Development category is busier than python-dev. > According to staff, discuss.python.org is much easier to moderate.. If > you're follo

[Python-Dev] Re: Switching to Discourse

2022-07-18 Thread Skip Montanaro
> > I don't think I *can* do much more than accept it and move on: > *if python-dev was used by everyone*, rather than almost exclusively by > people who prefer e-mail (and presumably use threading mail clients), > we'd get mangled threading anyway from all the non-threaded clients. > Don't forget

[Python-Dev] Re: Switching to Discourse

2022-07-21 Thread Skip Montanaro
I have a perhaps stupid question. Is Discord the same as discuss.python.org, just by another name? I find the similarity in names a bit confusing. Skip ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@

[Python-Dev] Re: Switching to Discourse

2022-07-21 Thread Skip Montanaro
> No, Discord is a different thing; it does text and voice communication > channels in real-time. If you're familiar with Slack, it's broadly > similar in purpose. Thanks (and to the others who replied). It seems like they've tried to make it a game, giving me the "opportunity" to buy boosts (or w

[Python-Dev] Re: Switching to Discourse

2022-12-09 Thread Skip Montanaro
> > I have a question about how you handle multiple communities. I'm > subscribed to ~30 python-dev style mailing lists across different > projects. There is no way I can open up 30 Discourse sites each day. > Mail brings everything into one place for me, and I have things setup > so that new mail

[Python-Dev] Small lament...

2023-04-01 Thread Skip Montanaro
Just wanted to throw this out there... I lament the loss of waking up on April 1st to see a creative April Fool's Day joke on one or both of these lists, often from our FLUFL... Maybe such frivolity still happens, just not in the Python ecosystem? I know you can still import "this" or "antigravity"

[Python-Dev] Mixed Python/C debugging

2019-12-01 Thread Skip Montanaro
Having tried comp.lang.python with no response, I turn here... After at least ten years away from Python's run-time interpreter & byte code compiler, I'm getting set to familiarize myself with that again. This will, I think, entail debugging a mixed Python/C environment. I'm an Emacs user and am a

[Python-Dev] Re: Mixed Python/C debugging

2019-12-02 Thread Skip Montanaro
Thanks for the responses. I know there are multiple tools out there (to wit, Wes's response), but I'm really after what people actually use and find works. I apologize that wasn't clear. I did neglect to mention that my environment is Linux (specifically Ubuntu 18.04), so Windows-based solutions ar

[Python-Dev] Re: Deprecating the "u" string literal prefix

2019-12-03 Thread Skip Montanaro
Guido> I think it’s too soon to worry about this. Simon> +100 Ditto. Besides, isn't support for u"..." just a variable and a couple tests in the earliest phase of compilation? If things are going to get deprecated/removed, I'd prefer the focus be placed on those bits which present a significant su

[Python-Dev] Macros instead of inline functions?

2019-12-04 Thread Skip Montanaro
As I wander around the code base, I keep seeing macro definitions in the C code. For example, there are four CALL* macros defined in Python/ast_opt.c which contain not entirely trivial bits of syntax. That code is from 2017 (as compared to, say, Modules/audioop.c, which first saw the light of day i

[Python-Dev] Re: Macros instead of inline functions?

2019-12-04 Thread Skip Montanaro
> > I don't think stable code which uses macros should be changed (though > > I see the INCREF/DECREF macros just call private inline functions, so > > some conversion has clearly been done). Still, in new code, shouldn't > > the use of macros for more than trivial use cases (constant defs, > > sim

[Python-Dev] Re: Macros instead of inline functions?

2019-12-04 Thread Skip Montanaro
This is my last post on this, at least as far as specific usage instances are concerned. See my question about PEP 7 below. If that is a discussion people think worthwhile, please start a new thread. > if (!VISIT(...)) { > return 0; > } > if (!VISIT(...)) { > retur

[Python-Dev] Python-dev mailing lis archives earlier than late April 1999?

2020-01-01 Thread Skip Montanaro
I could swear python-dev was older than late April 1999, yet that's as far back as the MM3 archives go. As evidence, here's an email from Jack Jansen on 28 April 1999 which was a reply to an earlier message not present in the current archive: https://mail.python.org/archives/list/python-dev@python

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-06 Thread Skip Montanaro
On Wed, Jan 1, 2020 at 7:25 PM Mark Sapiro wrote: > On 1/1/20 11:22 AM, Barry Warsaw wrote: > > I am looking at the MM2 mailing list creation confirmation messages in > my personal archives. Both d...@python.org (at 09:49 server local time?) > and python-dev@python.org (at 14:17) were created on

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-06 Thread Skip Montanaro
urvived the > various hosting migrations since then, but maybe they are laying around on > mail.python.org some place? > > -Barry > > > On Jan 6, 2020, at 06:48, Skip Montanaro > wrote: > > > > On Wed, Jan 1, 2020 at 7:25 PM Mark Sapiro wrote: > >

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-06 Thread Skip Montanaro
archives, ending in April 1995. Not exactly what > you were looking for but probably also worth saving before that archive > dies. > > On Mon, Jan 6, 2020 at 11:56 AM Skip Montanaro > wrote: > >> Thanks all. I just pinged Ken and am going to rummage around >> mail.python

[Python-Dev] Re: Python-dev mailing lis archives earlier than late April 1999?

2020-01-07 Thread Skip Montanaro
> Also note that comp.lang.python and hence python-list from late March > 1994 onward is archived at > > Thanks. During my first attempts at applying date range filters on Google Groups, everything came up empty, even for later dates (1999

[Python-Dev] extern "C" { ... } in Include/cpython/*.h

2020-01-27 Thread Skip Montanaro
(Apologies. Not sure where to ask this, and I'm not much of a C++ programmer. Maybe I should have just added a comment to the still-open issue.) I just noticed that Nick migrated the guts of Include/frameobject.h to include/cpython/frameobject.h. It's not clear to me that the latter should be #inc

[Python-Dev] Re: How to respond to repeated bad ideas

2020-03-02 Thread Skip Montanaro
> Atm we don't have an index of ideas, apart from pep 3099, and I'm not sure we > can make one (can we?), so I do not see a way to prevent this from happening. Maybe an informational PEP which briefly lists rejected ideas? Presumably, they'd normally come up in python-ideas, python-list or python

[Python-Dev] Changing layout of f_localsplus in frame objects

2020-03-17 Thread Skip Montanaro
(Apologies if you're seeing this twice. I first posted to the discourse instance.) I first worked on a register-based virtual machine in the 1.5.2 timeframe. That was before PEP 227 (closures) landed. Prior to that, local variables and the stack were contiguous in the f_localsplus array. Based on

[Python-Dev] Re: Changing layout of f_localsplus in frame objects

2020-03-20 Thread Skip Montanaro
> ... I would expect the FastToLocals and LocalsToFast functions to require > some non-trivial adjustments ... Thanks, Nick. I'm making precisely that change in a few places in frameobject.c. One loop for locals, another for cells & frees, a third for the stack (where the active stack is involved

[Python-Dev] Re: Changing layout of f_localsplus in frame objects

2020-03-21 Thread Skip Montanaro
> So far, my second go-round is proceeding better (fingers crossed). I > have added a new slot to the _frame struct (f_cellvars), initialized > once at creation, then referenced elsewhere. I'm also rerunning the > test suite more frequently. Once I've tweaked everything, all that > will remain (in

[Python-Dev] How to enable tracemalloc for the test suite?

2020-04-04 Thread Skip Montanaro
I've got a memory issue in my modified Python interpreter I'm trying to debug. Output at the end of the problematic unit test looks like this: ... == Tests result: FAILURE then SUCCESS == 1 test OK. 1 re-run test: test_rattlesnake Total duration: 2.9 sec Tests result: FAILURE then SUCCESS D

[Python-Dev] Re: How to enable tracemalloc for the test suite?

2020-04-04 Thread Skip Montanaro
Victor> I wrote the feature (both tracemalloc and query tracemalloc when a Victor> buffer overflow is detected), so I should be able to help you ;-) Yes, I thought you might. :-) I've attached the output of a more complete run. The command is % PYTHONTRACEMALLOC=5 ./python ./Tools/scripts/run_te

[Python-Dev] Re: How to enable tracemalloc for the test suite?

2020-04-05 Thread Skip Montanaro
> It seems like your Python changes use Py_False "somewhere" without > Py_INCREF(Py_False). > Maybe it's COMPARE_OP_REG() which calls SETLOCAL(dst, False). Yes, this was the problem. Thanks for the fix. Too much blind adherence on my part to the existing COMPARE_OP logic. I've even written (relat

[Python-Dev] Re: Do we need port some extension modules to the modules directory?

2020-04-12 Thread Skip Montanaro
> I notice some modules not in modules directory(for example: > _warnings、marshal in python directory). Do we need port those modules to > modules directory? I strongly suspect the answer is "no." Modules which aren't in the Modules directory are built directly into the Python executable. Us

[Python-Dev] Virtual machine bleeds into generator implementation?

2020-04-26 Thread Skip Montanaro
This is more an observation and question than anything else, but perhaps it will stimulate some ideas from the experts. Consider this trivial generator function: def gen(a): yield a When the YIELD_VALUE instruction is executed, it executes (in the non-async case): retval = POP();

[Python-Dev] Re: Virtual machine bleeds into generator implementation?

2020-04-27 Thread Skip Montanaro
> > I think it's worse that this though, as it seems that in gen_send_ex() > > it actually pushes a value onto the stack. That can't be solved by > > simply adding a state attribute to the generator object struct. > > At the higher level, "it doesn't push value on stack", it "sets value > of the yi

[Python-Dev] Re: Virtual machine bleeds into generator implementation?

2020-04-30 Thread Skip Montanaro
> > Thanks for the replies. I will cook up some private API in my cpython > fork. Whether or not my new vm ever sees the light of day, I think it > would be worthwhile to consider a proper API (even a _PyEval macro or > two) for the little dance the two subsystems do. > I committed a change to my

[Python-Dev] f_localsplus[0] == NULL in super_init_without_args()

2020-08-14 Thread Skip Montanaro
(I'm far from certain this is the correct place for this message. Maybe I should have opened a case on bpo instead?) I got far behind on my register instruction set stuff and in the interim the ground shifted underneath me. I'm still working to try and get the test suite to pass (modulo test_ssl,

Re: [Python-Dev] Can 3.1 still be built without complex?

2009-10-15 Thread Skip Montanaro
http://bugs.python.org/issue7147 Passes test (no big surprise there). Doesn't yet include any changes to documentation or Misc/NEWS entry. Should this be decided I will take a look at that. Skip ___ Python-Dev mailing list Python-Dev@python.org http:/

[Python-Dev] Could these restrictions be removed?

2011-05-12 Thread Skip Montanaro
A friend at work who is new to Python wondered why this didn't work with pickle: class Outer: Class Inner: ... def __init__(self): self.i = Outer.Inner() I explained: > http://docs.python.org/library/pickle.html#what-can-be-pickled-and-unpickled >

[Python-Dev] Pathscale compilers open source

2011-06-14 Thread Skip Montanaro
One of my colleagues with a background in the high performance computing realm sent me this press release: http://www.pathscale.com/ekopath4-open-source-announcement I'm not personally familiar with the Pathscale compilers, but thought some folks here might be and might want to experiment wit

Re: [Python-Dev] svn.python.org ?

2007-12-29 Thread Skip Montanaro
I'm unable to get the (apprently external?) 2to3 to update: % svn up Fetching external item into 'Tools/2to3' svn: PROPFIND request failed on '/projects/sandbox/trunk/2to3' svn: PROPFIND of '/projects/sandbox/trunk/2to3': could not connect to server (http://svn.python.org) Something seem

Re: [Python-Dev] [Python-checkins] r60919 - peps/trunk/pep-0008.txt

2008-02-21 Thread Skip Montanaro
Why not just skip the specifics except to say < 80 characters for all lines? Don't mention 72, 79 or any other number than 80: Maximum Line Length There are still many devices around that are limited to 80 character lines; plus, limiting windows to 80 characters makes it po

Re: [Python-Dev] Merges from 2.6 to 3.0?

2008-08-09 Thread Skip Montanaro
>> I don't know what svnmerge.py is ... > As always, the dev FAQ has the answer you are looking for: > http://python.org/dev/faq/#how-do-i-merge-between-branches . OK, I ran svnmerge, resolved conflicts, ran the tests, checked in the changes with the commit message svnmerge generated. Am I suppo

[Python-Dev] Backporting multiprocessing?

2008-10-16 Thread Skip Montanaro
I'd like to try backporting the multiprocessing module to Python 2.4. My first problem appears to be the reliance on a complete(?) rewrite of the buffer stuff. Any clues about transforming this code would be much appreciated. (Note: I'm backporting because the Python 2.6 version appears to be mu

Re: [Python-Dev] [Python-3000] Backporting multiprocessing?

2008-10-16 Thread Skip Montanaro
> I had been approached to do the exact same thing, are you trying to > back port the trunk version (2.6) or py3000? I'm trying to backport from 2.6. It appears that the buffer stuff is completely new though (backported from Python 3.0). S ___ Python

Re: [Python-Dev] Proposed schedule for Python 3.4

2012-10-03 Thread Skip Montanaro
> I've roughed out a release schedule Is there a rough list of changes for 3.4 written down somewhere, or is that only to be inferred based on PEPs whose Python-Version header reads "3.4"? How confident are you that the schedule you've proposed gives enough time for proposed changes to be imp

Re: [Python-Dev] Proposed schedule for Python 3.4

2012-10-03 Thread Skip Montanaro
> If you can show me people who use the alphas who want them earlier, I'll > consider it. So far the only person who's said they want them is you, and > IIUC you won't be a consumer of the alpha per se. > > Begging for feedback doesn't mean you'll get any, I haven't done any Python core developme

Re: [Python-Dev] Improve error message "UnboundLocalError: local variable referenced before assignment"

2012-11-07 Thread Skip Montanaro
> How about: > > "UnboundLocalError: Local variable 'FONT_NAMES' (created on >line 11) referenced before assignment." > > What I don't really like is the term "created". Maybe "implicitly created > on line 11"? Or "implied by line 11"? Or how about "Local variable > FONT_NAMES (implied by lin

[Python-Dev] Ctypes bug fix for Solaris - too late for 2.7.3?

2013-01-27 Thread Skip Montanaro
I hit a bug in the ctypes package on Solaris yesterday. Investigating, I found there is a patch: http://bugs.python.org/issue5289 I applied it and verified that when run as a main program ctypes/util.py now works. Is it too late to get this into 2.7.3? Given the nature of the patch (a new block

Re: [Python-Dev] Ctypes bug fix for Solaris - too late for 2.7.3?

2013-01-27 Thread Skip Montanaro
>> Is it too late to get this into 2.7.3? > > Yes, it's far too late for 2.7.3, since that was released last April. > :) I think it could go into 2.7.4, though. Whoops, sorry. I thought I had remembered some recent discussion of an upcoming 2.7 micro. Off-by-one error, or just brain freeze? :-)

Re: [Python-Dev] Fwd: I was just thinking that os.path could use some love...

2013-01-30 Thread Skip Montanaro
> Thoughts on os.path? What happened to the idea of a new path object? You old pot stirrer! I wonder about this from time-to-time as well, so was just interested enough to wander over to PyPI and see what I could dig up. There are a couple path module/package implementations on PyPI. Nothing j

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

2004-12-09 Thread Skip Montanaro
Raymond> * Any PR effort should also emphasize that no usability Raymond> trade-offs were made along the way. A number of features Raymond> make Py2.4 easier to use than 1.5.6: list comps, genexps, Raymond> generators, sets, nested scopes, int/long unification, Raymond>

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

2004-12-10 Thread Skip Montanaro
>> The other thing we can do is finish the portable backend for psyco >> and make it a standard module. Then Python won't be slow, it will be >> compiled, and py2exe will be able to make a single-file executable. Armin> You probably mean that Psyco can dynamically compile Python

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

2004-12-10 Thread Skip Montanaro
Thomas> I haven't tried it, but using psyco in a script and building an Thomas> exe from it with py2exe should work right out of the box - but Thomas> maybe this isn't what you had in mind? I was thinking of implicitly mixing in psyco, even if the script didn't use it. Maybe I have t

Re: [Python-Dev] Re: proto-pep: How to change Python's bytecode

2004-12-25 Thread Skip Montanaro
>> Over the last several years, various people have reported >> experimenting with CPython's bytecodes. I wonder if it would be >> helpful to have a respository of the results, in one place, for new >> experimenters and curious people to peruse. Brett> Wouldn't hurt. Adding

Re: [Python-Dev] Re: [Pythonmac-SIG] The versioning question...

2004-12-27 Thread Skip Montanaro
Martin> If you really want side-by-side installation of different Martin> versions, and a mechanism to select between them, the package Martin> could support Martin> import xml_0_8_2 as xml Martin> IOW, "import-as" should be sufficient for what you want to achieve. That's mo

Re: [Python-Dev] Re: [Pythonmac-SIG] The versioning question...

2004-12-28 Thread Skip Montanaro
Eric> Unless you are doing comparison tests, where it would be nice to Eric> be able to state in a generic way that the new implementation Eric> should not change answers. May be something like: Eric> import spam[1] as spamnext# next version Eric> import spam[0]

Re: [Python-Dev] Please help complete the AST branch

2005-01-04 Thread Skip Montanaro
>> I was suggesting that there is an ongoing discussion that should >> continue on the compiler-sig. Guido> I'd be fine with keeping this on python-dev too. +1 for a number of reasons: * It's more visible and would potentially get more people interested in what's happening

[Python-Dev] Re: [Csv] csv module TODO list

2005-01-04 Thread Skip Montanaro
Andrew> There's a bunch of jobs we (CSV module maintainers) have been Andrew> putting off - attached is a list (in no particular order): ... In addition, it occurred to me this evening that there's functionality in the csv module I don't think anybody uses. For example, you can regi

[Python-Dev] Re: csv module TODO list

2005-01-06 Thread Skip Montanaro
Magnus> Quite a while ago I posted some material to the csv-list about Magnus> problems using the csv module on Unix-style colon-separated Magnus> files -- it just doesn't deal properly with backslash escaping Magnus> and is quite useless for this kind of file. I seem to recall the

[Python-Dev] Re: [Csv] csv module TODO list

2005-01-06 Thread Skip Montanaro
>> * is CSV going to be maintained outside the python tree? >> If not, remove the 2.2 compatibility macros for: PyDoc_STR, >> PyDoc_STRVAR, PyMODINIT_FUNC, etc. Andrew> Does anyone thing we should continue to maintain this 2.2 Andrew> compatibility? With the release of 2.4, 2

[Python-Dev] Re: [Csv] Minor change to behaviour of csv module

2005-01-07 Thread Skip Montanaro
Andrew> I'm considering a change to the csv module that could Andrew> potentially break some obscure uses of the module (but CSV files Andrew> usually quote, rather than escape, so the most common uses Andrew> aren't effected). I'm with the other respondents. This looks like a bu

[Python-Dev] os.removedirs() vs. shutil.rmtree()

2005-01-08 Thread Skip Montanaro
Is there a reason the standard library needs both os.removedirs and shutil.rmtree? They seem awful similar to me (I can see they aren't really identical). Ditto for os.renames and shutil.move. Presuming they are all really needed, is there some reason they don't all belong in the same module? S

RE: [Python-Dev] Re: [Csv] csv module TODO list

2005-01-12 Thread Skip Montanaro
Raymond> Would the csv module be a good place to add a DBF reader and Raymond> writer? Not really. Raymond> I've posted a draft on ASPN. It interoperates well with the Raymond> rest of the CSV module because it also accepts/returns a list Raymond> of fieldnames and a sequenc

[Python-Dev] Re: [Csv] csv module and universal newlines

2005-01-12 Thread Skip Montanaro
Andrew> The csv parser consumes lines from an iterator, but it also has Andrew> it's own idea of end-of-line conventions, which are currently Andrew> only used by the writer, not the reader, which is a source of Andrew> much confusion. The writer, by default, also attempts to emit

Re: [Python-Dev] Re: PEP 246: LiskovViolation as a name

2005-01-12 Thread Skip Montanaro
>>> Terminology point: I know that LiskovViolation is technically >>> correct, but I'd really prefer it if exception names (which are >>> sometimes all users get to see) were more informative for people w/o >>> deep technical background. Would that be possible? >> >> I do

Re: [Python-Dev] Recent IBM Patent releases

2005-01-12 Thread Skip Montanaro
Scott> Since this includes patents on compression and encryption stuff, Scott> we will definitely be faced with deciding on whether to allow use Scott> of these patents in the main Python library. Who is going to decide if a particular library would be affected by one or more of the 5

RE: [Python-Dev] Re: PEP 246: LiskovViolation as a name

2005-01-12 Thread Skip Montanaro
Michael> This must be one of those cases where I am mislead by my Michael> background... I thought of Liskov substitution principle as a Michael> piece of basic CS background that everyone learned in school Michael> (or from the net, or wherever they learned Michael> programmi

Re: [Python-Dev] Re: [Csv] csv module and universal newlines

2005-01-12 Thread Skip Montanaro
>> The idea of the check is to enforce binary mode on those objects that >> support a mode if the desired line terminator doesn't match the >> platform's line terminator. Andrew> Where that falls down, I think, is where you want to read an Andrew> alien file - in fact, under u

Re: [Python-Dev] Re: [Csv] csv module and universal newlines

2005-01-12 Thread Skip Montanaro
Jack> On MacOSX you really want universal newlines. CSV files produced Jack> by older software (such as AppleWorks) will have \r line Jack> terminators, but lots of other programs will have files with Jack> normal \n terminators. Won't work. You have to be able to write a Windows

Re: [Python-Dev] Re: PEP 246: LiskovViolation as a name

2005-01-13 Thread Skip Montanaro
stelios> Yes but in order to fall into a Liskov Violation, one will have stelios> to use extreme OOP features (as I understand from the ongoing stelios> discussion for which, honestly, I understand nothing:). The first example here: http://www.compulink.co.uk/~querrid/STANDARD/l

[Python-Dev] redux: fractional seconds in strptime

2005-01-13 Thread Skip Montanaro
A couple months ago I proposed (maybe in a SF bug report) that time.strptime() grow some way to parse time strings containing fractional seconds based on my experience with the logging module. I've hit that stumbling block again, this time in parsing files with timestamps that were generated using

Re: [Python-Dev] redux: fractional seconds in strptime

2005-01-14 Thread Skip Montanaro
Brett> The problem I have always had with this proposal is that the Brett> value is worthless, time tuples do not have a slot for fractional Brett> seconds. Yes, it could possibly be changed to return a float for Brett> seconds, but that could possibly break things. Actually, tim

Re: [Python-Dev] redux: fractional seconds in strptime

2005-01-14 Thread Skip Montanaro
>> I realize the %4N notation is distasteful, but without it I think you >> will have trouble parsing something like >> >> 13:02:00.704 >> >> What would be the format string? %H:%M:%S.%N would be incorrect. Brett> Why is that incorrect? Because "704" represents the

Re: [Python-Dev] Unix line endings required for PyRun* breaking embedded Python

2005-01-19 Thread Skip Montanaro
Stuart> I don't think it is possible for plpythonu to fix this by simply Stuart> translating the line endings, as this would require significant Stuart> knowledge of Python syntax to do correctly (triple quoted Stuart> strings and character escaping I think). I don't see why not.

Re: [Python-Dev] Re: Zen of Python

2005-01-19 Thread Skip Montanaro
Phillip> Actually, this is one of those rare cases where optimization Phillip> and clarity go hand in hand. Human brains just don't handle Phillip> nesting that well. It's easy to visualize two levels of nested Phillip> structure, but three is a stretch unless you can abstract at

Re: [Python-Dev] Re: Unix line endings required for PyRun* breaking embedded Python

2005-01-20 Thread Skip Montanaro
Fredrik> s = s.replace("\r", "\n"["\n" in s:]) This fails on admittedly weird strings that mix line endings: >>> s = "abc\rdef\r\n" >>> s = s.replace("\r", "\n"["\n" in s:]) >>> s 'abcdef\n' where universal newline mode or Just's re.sub() gadget would work. Skip ___

Re: [Python-Dev] Unix line endings required for PyRun* breaking embedded Python

2005-01-20 Thread Skip Montanaro
Just> Skip Montanaro wrote: >> Just re.sub("[\r\n]+", "\n", s) and I think you're good to go. Just> I don't think that in general you want to fold multiple empty Just> lines into one. Whoops. Yes. Skip __

[Python-Dev] ANN: Free Trac/Subversion hosting at Python-Hosting.com (fwd)

2005-01-20 Thread Skip Montanaro
Thought I'd pass this along for people who don't read comp.lang.python. Skip --- Begin Message --- Hello everyone, To celebrate its second anniversary, Python-Hosting.com is happy to announce that it is now offering free Trac/Subversion hosting. This offer is limited to open-source, python proj

Re: [Python-Dev] Deprecating modules (python-dev summary for early Dec, 2004)

2005-01-25 Thread Skip Montanaro
Jim> Would it make sense to add an attic (or even "deprecated") Jim> directory to the end of sys.path, and move old modules there? This Jim> would make the search for non-deprecated modules a bit faster, and Jim> would make it easier to verify that new code isn't depending Jim

[Python-Dev] I think setup.py needs major rework

2005-01-25 Thread Skip Montanaro
I just submitted a bug report for setup.py: http://python.org/sf/1109602 It begins: Python's setup.py has grown way out of control. I'm trying to build and install Python 2.4.0 on a Solaris system with Tcl/Tk installed in a non-standard place and I can't figure out the incantati

Re: [Python-Dev] Patch review: [ 1100942 ] datetime.strptime constructor added

2005-01-26 Thread Skip Montanaro
Alan> 1. In the time module, the strptime() function's format Alan> parameter is optional. For consistency's sake, I'd expect Alan> datetime.strptime()'s format parameter also to be optional. (On Alan> the other hand, the default value for the format is not very Alan> useful.

RE: Moving towards Python 3.0 (was Re: [Python-Dev] Speed up function calls)

2005-01-30 Thread Skip Montanaro
Raymond> I had hoped for the core of p3k to be built for scratch ... Then we should just create a new CVS module for it (or go whole hog and try a new revision control system altogether - svn, darcs, arch, whatever). Skip ___ Python-Dev mailing lis

RE: Moving towards Python 3.0 (was Re: [Python-Dev] Speed up functioncalls)

2005-01-31 Thread Skip Montanaro
Michael> CPython CAN leverage such environments, and it IS used that Michael> way. However, this requires using multiple Python processes Michael> and inter-process communication of some sort (there are lots of Michael> choices, take your pick). It's a technique which is more

Re: [Python-Dev] redux: fractional seconds in strptime

2005-02-03 Thread Skip Montanaro
Brett> Everyone went silent on this topic. Does this mean people just Brett> stopped caring (which I doubt since I know Skip wants this bad Brett> enough to bring it up every so often)? Was it the issue of Brett> symmetry with strftime? I have a patch to do strptime() fractional

Re: [Python-Dev] Wanted: members for Python Security Response Team

2005-02-03 Thread Skip Montanaro
Guido> For discussion about the team's responsibilities and procedures, Guido> please follow up here. I noticed the checkins. I think there is one other necessary output: source patches against all the affected versions need to be made available so people can apply the patch to an existi

Re: [Python-Dev] JOB OPENING: Implementor for Python and Search

2005-02-04 Thread Skip Montanaro
etails on posting vacancies can be found here: http://www.python.org/Jobs-howto.html -- Skip Montanaro [EMAIL PROTECTED] http://www.mojam.com/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscri

Re: [Python-Dev] Wanted: members for Python Security Response Team

2005-02-05 Thread Skip Montanaro
>> How will Python releases made in response to security bugs be done: >> will they just include the security fix (rather than being taken from >> CVS HEAD), without the usual alpha / beta testing cycle? Or what...? Guido> On python.org, however, we tend to take the maintenance b

[Python-Dev] list of constants -> tuple of constants

2005-02-06 Thread Skip Montanaro
In a python-checkins message, Raymond stated: Raymond> Replace list of constants with tuples of constants. I understand the motivation here (the peephole optimizer can convert a tuple of constants into a single constant that need not be constructed over and over), but is the effort worth the

RE: [Python-Dev] list of constants -> tuple of constants

2005-02-06 Thread Skip Montanaro
Raymond> [Skip] >> If lists are conceptually like vectors or arrays in other languages >> and tuples are like C structs or Pascal records, then by converting >> from list to tuple form you've somehow muddied the data structure >> water just to take advantage of tuples' immutabi

Re: [Python-Dev] Other library updates

2005-02-07 Thread Skip Montanaro
Raymond> Any objections to replacing the likes of types.IntType and Raymond> types.ListType with int and list? +1 Skip ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mai

Re: [Python-Dev] Patch review: [ 1098732 ] Enhance tracebacks and stack traces with vars

2005-02-09 Thread Skip Montanaro
Phillip> I was just responding to the OP, who was advocating it for Phillip> Python default behavior, or behavior controlled by the command Phillip> line. That's why I said, "Yes, but not as a default behavior." My original intent was that it would probably not fly as default behavio

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

2005-02-11 Thread Skip Montanaro
>> Maybe some ambitious PSF activitst could contact Roskind and Steve >> Kirsch and see if they know who at Disney to talk to... Or maybe the >> Disney guys who were at PyCon last year could help. Matthias> please could somebody give me a contact address? Steve's easy enough to

[Python-Dev] Five review rule on the /dev/ page?

2005-02-17 Thread Skip Montanaro
I am frantically trying to get ready to be out of town for a week of vacation. Someone sent me some patches for datetime and asked me to look at them. I begged off but referred him to http://www.python.org/dev/ and made mention of the five patch review idea. Can someone make sure that's explain

Re: [Python-Dev] Five review rule on the /dev/ page?

2005-02-18 Thread Skip Montanaro
aahz> This should go into Brett's survey of the Python dev process, not aahz> as official documentation. It's simply an offer made by some of aahz> the prominent members of python-dev. As long as it's referred to from www.python.org/dev that's fine. Skip ___

Re: [Python-Dev] Re: Prospective Peephole Transformation

2005-02-18 Thread Skip Montanaro
>> Based on some ideas from Skip, I had tried transforming the likes of >> "x in (1,2,3)" into "x in frozenset([1,2,3])" Fredrik> savings in what? time or bytecode size? constructed Fredrik> micro-benchmarks, or examples from real-life code? Fredrik> do we have any stat

RE: [Python-Dev] Re: Prospective Peephole Transformation

2005-02-18 Thread Skip Montanaro
>> > Raymond then >> translated >> > >> > for x in [1,2,3]: >> > >> > to >> > >> > for x in frozenset([1,2,3]): Raymond> That's not right. for-statements are not touched. Thanks for the correction. My apologies for the misstep. Skip

[Python-Dev] Urllib code or the docs appear wrong

2005-03-07 Thread Skip Montanaro
It seems to me that either urllib's docs are wrong or its code is wrong w.r.t. how the User-agent header is handled. In part, the docs say: By default, the URLopener class sends a User-Agent: header of "urllib/VVV", where VVV is the urllib version number. Applications can define thei

Re: [Python-Dev] os.access and Unicode

2005-03-10 Thread Skip Montanaro
Brett> If there was no other way to get os.access-like functionality, I Brett> would say it should be backported. But since there are other Brett> ways to figure out everything that os.access can tell you I say Brett> don't backport... I don't think you can tell (certainly not eas

Re: [Python-Dev] Urllib code or the docs appear wrong

2005-03-10 Thread Skip Montanaro
>> It seems to me that either urllib's docs are wrong or its code is >> wrong w.r.t. how the User-agent header is handled. Guido> I propose fixing the docs... Done (also backported to 2.4 branch). Skip ___ Python-Dev mailing list Python-Dev

Re: No new features (was Re: [Python-Dev] Re: [Python-checkins] python/dist/src/Modules ossaudiodev.c, 1.35, 1.36)

2005-03-10 Thread Skip Montanaro
Anthony> Initially, I was inclined to be much less anal about the Anthony> no-new-features thing. But since doing it, I've had a quite Anthony> large number of people tell me how much they appreciate this Anthony> approach - vendors, large companies with huge installed bases An

Re: [Python-Dev] rationale for the no-new-features approach

2005-03-10 Thread Skip Montanaro
Anthony> Goal 4: Try and prevent something like Anthony> try: Anthony> True, False Anthony> except NameError: Anthony> True, False = 1, 0 Anthony> from ever ever happening again. I will point out that

<    1   2   3   4   >