[Python-Dev] Re: What is a public API?

2019-07-31 Thread Glyph
d an extremely small project called "publication" (https://pypi.org/project/publication/ <https://pypi.org/project/publication/>, https://github.com/glyph/publication <https://github.com/glyph/publication>) which attempts to harmonize the lofty ideal of "only the names e

Re: [Python-Dev] Yearly PyPI breakage

2016-05-04 Thread Glyph
On May 3, 2016, at 9:15 PM, Stefan Krah wrote: > >> [cut overlong post] > > Glyph, > > nice sneaky way to try to divert from the original issue. The original issue, as I understood it, at the start of the thread was "which hoops I have to jump through this year in o

Re: [Python-Dev] Yearly PyPI breakage

2016-05-03 Thread Glyph
;t even need to build C code. cdecimal users may wish to retrieve it via this mechanism until there's a secure way to get the proper upstream distribution. If anyone wants package-index access to this name to upload Windows or manylinux wheels just let me know; however, as this is just a pr

Re: [Python-Dev] PEP 481 - Migrate Some Supporting Repositories to Git and Github

2014-11-30 Thread Glyph
quiring newcomers to learn our weird technology religion before they can contribute creates a real barrier to entry, which in turn makes our community more insular and homogenous. Some days you get the Git, and some days the Github gets you. The sooner we, as a community and a culture, can a

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Glyph Lefkowitz
uld be made, but for me personally it's a lot easier to justify that everyone should use Twisted (at least since 14+) because transport security in the stdlib is such a wreck and even if it gets fixed it's going to have easy options to turn it off unilaterally so your application can

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Glyph Lefkowitz
lidation, or tolerate expired certificates. > The API already supports both of these things. What I believe you're implicitly saying is that there needs to be a way to do this without editing code, and... no, there really doesn't. Not to mention the fact

Re: [Python-Dev] PEP 476: Enabling certificate validation by default!

2014-09-02 Thread Glyph Lefkowitz
is a valid configuration option, and OpenSSL already provides it via the SSL_CERT_DIR environment variable, so there's no need for Python to provide anything beyond that. -glyph ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Language Summit Follow-Up

2014-05-28 Thread Glyph Lefkowitz
; back as an alias for 'str'. Just today I was writing some documentation where I had to resort to some awkward encoding tricks just to get a bytes object out without explaining the whole 2/3 dichotomy in some unrelated prose. We'd like to thank all the individuals who gave input a

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

2013-03-25 Thread Glyph
On Mar 25, 2013, at 1:40 PM, Benjamin Peterson wrote: > ... Assuming PEP 343 becomes policy ... Are you sure you got this PEP number right? The 'with' statement? -glyph___ Python-Dev mailing list Python-De

Re: [Python-Dev] About issue 6560

2013-03-16 Thread Glyph
ease file a bug (at <http://twistedmatrix.com/>). -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] built-in Python test runner (was: Python Language Summit at PyCon: Agenda)

2013-03-05 Thread Glyph
testing SIG someone from Twisted ought to be a member of, to represent Trial, and to get consensus on these points going forward? -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-26 Thread Glyph
On Feb 26, 2013, at 5:25 AM, Eli Bendersky wrote: > Glyph, thanks for the input. I mentioned Twisted because in its code I found > a number of places with simple string enumerations used to represent state. I > was not aware of twisted.python.constants, but it doesn't ap

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-25 Thread Glyph
On Feb 25, 2013, at 12:32 PM, Barry Warsaw wrote: >> Dumb question, but are flufl.enums ordered? That's also an important use >> case. > > Kind of. Ordered comparisons are explicitly not supported, but iteration over > the Enum is guaranteed to be returned in int-value order. Sorry to jump i

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

2013-01-30 Thread Glyph
On Jan 30, 2013, at 2:01 PM, Cameron Simpson wrote: > Speaking for myself, I've been having some usefulness with making "URL" > objects that are subclasses of str. That lets me pass them to all the > things that already expect strs, while still having convenience methods. str subclasses are prob

Re: [Python-Dev] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-09 Thread Glyph
g 'write' in the name. I should add, if you don't already know what this means you really shouldn't be trying to do it ;-). -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listin

Re: [Python-Dev] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-04 Thread Glyph
On Jan 4, 2013, at 8:51 PM, Guido van Rossum wrote: > On Fri, Jan 4, 2013 at 8:19 PM, Glyph wrote: >> >> On Jan 4, 2013, at 3:56 PM, Guido van Rossum wrote: >> >>> On Mon, Dec 24, 2012 at 2:58 PM, Glyph wrote: >>>> In my humble (but entirely, ver

Re: [Python-Dev] PEP 3156 - Asynchronous IO Support Rebooted

2013-01-04 Thread Glyph
On Jan 4, 2013, at 3:56 PM, Guido van Rossum wrote: > On Mon, Dec 24, 2012 at 2:58 PM, Glyph wrote: >> In my humble (but entirely, verifiably correct) opinion, thinking of this as >> a "default" is propagating a design error in the BSD sockets API. Datagram &

Re: [Python-Dev] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-24 Thread Glyph
On Dec 21, 2012, at 1:10 PM, Guido van Rossum wrote: > > > TBD: Need an interface to wait for the first of a collection of Futures. > > > > Have you looked at Twisted's DeferredList? > > http://twistedmatrix.com/documents/12.1.0/api/twisted.internet.defer.DeferredList.html > > No, I am trying t

Re: [Python-Dev] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-24 Thread Glyph
ransport should write the bytes as soon as > > the fd is ready for writing, and it should write the same chunks as > > given by the user, not a concatenation of them. > > I asked Glyph about this. It depends on the OS... Mac syscalls are so slow > that it is better to jo

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

2012-12-20 Thread Glyph
ation of underlying concepts. It will help > people grasp the concepts behind and different problems much faster (as well > as gain an ability to compare different reactors). I would love for someone to do this, of course, but now we're _really_ off topic. -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

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

2012-12-19 Thread Glyph
On Dec 19, 2012, at 2:14 PM, anatoly techtonik wrote: > On Sun, Dec 9, 2012 at 7:14 AM, 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 b

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

2012-12-08 Thread Glyph
On Dec 8, 2012, at 8:37 PM, Gregory P. Smith wrote: > Is twisted's spawnProcess thread safe and async signal safe by using > restricted C code for everything between the fork() and exec()? I'm not > familiar enough with the twisted codebase to find things easily in it but I'm > not seeing su

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

2012-12-08 Thread Glyph
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 or to those? > > On Windows it is WriteFile/ReadFil

Re: [Python-Dev] Socket timeout and completion based sockets

2012-11-28 Thread Glyph
On Nov 28, 2012, at 12:04 PM, Guido van Rossum wrote: >> Anyway, as for concrete requirements: The issue I have always seen with >> various asynchronous libraries is their lack of composability. Everyone >> writes their own application loop and event queue. Merely having a standard >> spec

Re: [Python-Dev] Socket timeout and completion based sockets

2012-11-26 Thread Glyph
. The use case it supports is when you have a little tool that just needs to fetch a URL or something really simple, but wants to be able to get on with things if that doesn't work or takes too long. -glyph ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] Memoryviews should expose the underlying memory address

2012-09-20 Thread Glyph
Le Sep 20, 2012 à 11:35 AM, David Beazley a écrit : > Well, if it's supposed to do that, it certainly doesn't work for me in 3.3. > I get a type error about it wanting a ctypes pointer object.Even if this > worked, it still doesn't address the need to get the pointer value possibly > for

Re: [Python-Dev] A new JIT compiler for a faster CPython?

2012-07-17 Thread Glyph
On Jul 17, 2012, at 11:38 AM, Victor Stinner wrote: > IMO PyPy is complex and hard to maintain. PyPy has a design completly > different than CPython and is much faster and has a better memory > footprint. I don't expect to be as fast as PyPy, just faster than > CPython. I think this criticism i

Re: [Python-Dev] TZ-aware local time

2012-06-05 Thread Glyph
Le Jun 5, 2012 à 6:16 PM, Nick Coghlan a écrit : > Personally, I'd like to see the datetime module make an explicit > assumption that "all naive datetime objects are considered to be UTC", > with the interactions between naive and aware objects updated > accordingly I would absolutely love it if

Re: [Python-Dev] docs.python.org pointing to Python 3 by default?

2012-05-19 Thread Glyph
(for example, see <http://twistedmatrix.com/documents/10.2.0/api/twisted.internet.defer.inlineCallbacks.html>) across the top of all the old versions would be pretty visible. -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-de

Re: [Python-Dev] cpython: Issue #11750: The Windows API functions scattered in the _subprocess and

2012-04-19 Thread Glyph
legal name on file somewhere for copyright provenance purposes, but this should not need to be the same name that is present in commit logs, as long as there's a mapping recorded that can be made available to any interested lawyer. (Hopefully this is not a pra

Re: [Python-Dev] Require loaders set __package__ and __loader__

2012-04-15 Thread Glyph
On Apr 15, 2012, at 6:38 PM, Barry Warsaw wrote: > On Apr 15, 2012, at 02:12 PM, Glyph wrote: > >> Twisted has such a thing, mostly written by me, called >> twisted.python.modules. >> >> Sorry if I'm repeating myself here, I know I've brought it up on t

Re: [Python-Dev] Require loaders set __package__ and __loader__

2012-04-15 Thread Glyph
On Apr 14, 2012, at 3:32 PM, Guido van Rossum wrote: > Funny, I was just thinking about having a simple standard API that > will let you open files (and list directories) relative to a given > module or package regardless of how the thing is loaded. Twisted has such a thing, mostly written by m

Re: [Python-Dev] Require loaders set __package__ and __loader__

2012-04-15 Thread Glyph
es, and I had to do lots of unpacking stuff either from things tacked on to a .exe or inside a zip file. (I don't know how common this is any more in that world but I suspect "very".) Unfortunately all the examples I can think of of

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

2012-04-07 Thread Glyph Lefkowitz
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 adjustment, at least not in the sense this thread has mostly been talki

Re: [Python-Dev] this is why we shouldn't call it a "monotonic clock" (was: PEP 418 is too divisive and confusing and should be postponed)

2012-04-05 Thread Glyph Lefkowitz
gt; second concept is that POSIX does so, but since Mac OS X, Solaris, > Windows, and C++ have all avoided following POSIX's mistake, I think > Python should too. Do you just mean that the APIs don't have "monotonic" in the name? They all use different words, which strikes me as more of a f

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-04-02 Thread Glyph Lefkowitz
e.comp.python.devel/131487/>. -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Glyph
On Mar 30, 2012, at 10:25 PM, Glyph wrote: > > On Mar 30, 2012, at 10:17 PM, Victor Stinner wrote: > >>> (...) >>> By contrast, stepping only happens if your local clock is just set >>> incorrectly and the re-sync delta has more to do with administrativ

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Glyph
cy. > > Are you talking about CLOCK_REALTIME or CLOCK_MONOTONIC? My understanding is: CLOCK_REALTIME is both stepped and slewed. CLOCK_MONOTONIC is slewed, but not stepped. CLOCK_MONOTONIC_RAW is neither slewed nor stepped. -glyph ___ Pyth

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Glyph
hing better than your PC's $3 quartz crystal, after all. So, slew tends to correct for minor defects in your local timekeeping mechanism, and will compensate for its tendency to go too fast or too slow. By contrast, stepping only happens if you

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-03-30 Thread Glyph
/en-us/library/ms644904> mentions SetThreadAffinityMask for this reason, despite the fact that it is usually steady for longer than that. -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Un

Re: [Python-Dev] PEP 418: Add monotonic clock

2012-03-27 Thread Glyph
On Mar 27, 2012, at 3:17 AM, Glyph wrote: > I don't think they can fully fix it without kernel changes I got really curious about this and went and did some research. With some really platform-specific hackery on every platform, you can mostly figure it out; completely on OS X and

Re: [Python-Dev] PEP 418: Add monotonic clock

2012-03-27 Thread Glyph
r correcting this type of discrepancy. (<https://developer.apple.com/library/mac/#qa/qa1340/_index.html>, <http://msdn.microsoft.com/en-us/library/aa394362.aspx>, <http://upower.freedesktop.org/docs/UPower.html#UPower::Sleeping>). -glyph

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-26 Thread Glyph
rous. > > If someone has a use case which fits the "steady or else fall back to > wall clock" pattern, I would like to learn about it. I feel that this should be emphasized. Zooko knows what he's talking about here. Listen to him :). (Antoine has the right idea. I think it&#

Re: [Python-Dev] Issue 13524: subprocess on Windows

2012-03-23 Thread Glyph
On Mar 23, 2012, at 1:26 PM, Brad Allen wrote: > Thanks, Glyph. In that case maybe the Python subprocess docs need not > single out SystemRoot, but instead plaster a big warning around the > use of the 'env' parameter. I agree. I'm glad that my bitter experience here mi

Re: [Python-Dev] Drop the new time.wallclock() function?

2012-03-23 Thread Glyph
On Mar 23, 2012, at 12:55 PM, Zooko Wilcox-O'Hearn wrote: >> I merged the two functions into one function: time.steady(strict=False). >> >> time.steady() should be monotonic most of the time, but may use a fallback. >> >> time.steady(strict=True) fails with OSError or NotImplementedError if >>

Re: [Python-Dev] Issue 13524: subprocess on Windows

2012-03-22 Thread Glyph Lefkowitz
t you're given, perhaps with a few specific light additions whose meaning you understand. If you're spawning a process as an administrator or root, you should probably initialize the environment for the user you want to spawn that process as using an OS-specific mechanism like login

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

2012-03-22 Thread Glyph Lefkowitz
some decisions who will make some people happy. I'm fairly certain it's not possible to create a design that's optimal for all readers in all cases. -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

Re: [Python-Dev] cpython: Issue #10278: Add an optional strict argument to time.steady(), False by default

2012-03-20 Thread Glyph
On Mar 20, 2012, at 3:33 AM, Matt Joiner wrote: > I believe we should make a monotonic_time method that assures monotonicity > and be done with it. Forward steadiness can not be guaranteed. No parameters. > I think this discussion has veered off a bit into the overly-theoretical. Python cann

Re: [Python-Dev] sharing sockets among processes on windows

2012-03-14 Thread Glyph Lefkowitz
what I have: Just in case anyone is interested, we also have a ticket for this in Twisted: <http://twistedmatrix.com/trac/ticket/4389>. It would be great to share code as much as possible. -glyph ___ Python-Dev mailing list Python-Dev@python.or

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

2012-02-01 Thread Glyph Lefkowitz
On Feb 1, 2012, at 12:46 PM, Guido van Rossum wrote: > I understand that you're hesitant to just dump your current mess, and > you want to clean it up before you show it to us. That's fine. (...) And > remember, it doesn't need to be > perfect (in fact perfectionism is probably a bad idea here).

Re: [Python-Dev] Packaging and setuptools compatibility

2012-01-24 Thread Glyph Lefkowitz
On Jan 24, 2012, at 12:54 PM, Alexis Métaireau wrote: > I'm wondering if we should support that (a way to have plugins) in the new > packaging thing, or not. If not, this mean we should come with another > solution to support this outside of packaging (may be in distribute). If yes, > then we s

Re: [Python-Dev] Coroutines and PEP 380

2012-01-19 Thread Glyph
On Jan 19, 2012, at 4:41 PM, Greg wrote: > Glyph wrote: >> [Guido] mentions the point that coroutines that can implicitly switch out >> from under you have the same non-deterministic property as threads: you >> don't know where you're going to need a lock or lo

Re: [Python-Dev] Coroutines and PEP 380

2012-01-18 Thread Glyph
On Jan 18, 2012, at 4:23 AM, Mark Shannon wrote: > Glyph wrote: >> On Jan 17, 2012, at 5:03 PM, Mark Shannon wrote: >>> Lets start controversially: I don't like PEP 380, I think it's a kludge. >> Too late; it's already accepted. There's not much point

Re: [Python-Dev] Coroutines and PEP 380

2012-01-17 Thread Glyph
ages your proposed implementation provides over those. I would guess that one of the first things you should address on python-ideas is why adopting your implementation would be a better idea than just bundling one of those with the standard library :). -glyph _

Re: [Python-Dev] devguide: Backporting is obsolete. Add details that I had to learn.

2012-01-10 Thread Glyph
ely and immediately associate with "middle dot-separated digit increment by one". If you want to emphasize the importance of a release, just choose a subjective term aside from "major" or "minor". -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Fixing the XML batteries

2011-12-10 Thread Glyph Lefkowitz
, so someone should fix that rather than worrying about parsing HTML right now. (I doubt that many subscribers to this list would share this opinion, though.) Third, you could believe that parsing HTML is not a difficult domain-specific problem. But only a crazy person would believe that, so yo

Re: [Python-Dev] Fixing the XML batteries

2011-12-10 Thread Glyph Lefkowitz
imes to implement useful things. But much more effort has been poured into this problem since then, and the problems are better understood now.) -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-d

Re: [Python-Dev] readd u'' literal support in 3.3?

2011-12-09 Thread Glyph
2to3 though, "drop everything prior to 2.6" was always supposed to be step 0, so "single codebase" adds much less of a burden than I thought. -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/

Re: [Python-Dev] readd u'' literal support in 3.3?

2011-12-08 Thread Glyph
Zooming back in to the actual issue this thread is about, I think the u""-vs-"" issue is a bit of a red herring, because the _real_ problem here is that 2to3 is slow and buggy and so migration efforts are starting to work around it, and therefore want to run the same code on 3.x and all the way

Re: [Python-Dev] readd u'' literal support in 3.3?

2011-12-08 Thread Glyph
hired to migrate that python 2.x code to python 3 (or 4, or 5, whatever we have by then). If they're not, it will be because they're being hired to try to migrate it to Javascript instead, not because the Python 3 migration is "done" by then. -glyph _

Re: [Python-Dev] Warnings

2011-11-30 Thread Glyph
s off into a section that can be referred to later, once the developer has had an opportunity to grasp the basics. Any section with security implications can easily say "please refer to the 'security considerations' section for important information on how to avoid common mi

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-11-30 Thread Glyph
ing on accidents of current directory and script location. This will in turn vastly decrease confusion among new python developers taking on large projects with a bunch of libraries, who mostly don't care what the rules for where files are supposed to go are, and just want to put them

Re: [Python-Dev] cpython (3.2): Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

2011-10-07 Thread Glyph
On Oct 7, 2011, at 7:10 AM, Cameron Simpson wrote: > The point here is security, not test coverage: if a procedure is known > to be broken as a regular user, is it not highly unsafe to then run it > as root? No. As I mentioned previously, any environment where the tests are run should be isolat

Re: [Python-Dev] cpython (3.2): Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

2011-10-07 Thread Glyph
On Oct 7, 2011, at 6:40 AM, Cameron Simpson wrote: > I think that the build and the tests should be different security > scopes/zones/levels: different users or different VMs. Andrew's > suggestion of a VM-for-tests sounds especially good. To me, "build" and "test" are largely the same function,

Re: [Python-Dev] cpython (3.2): Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

2011-10-07 Thread Glyph
On Oct 7, 2011, at 5:10 AM, Stephen J. Turnbull wrote: > The principle here is "ran as root" without further explanation is a > litmus test for "not bothering about security", even today. It's > worth asking for explanation, or at least a comment that "all the > buildbot contributors I've talked

Re: [Python-Dev] cpython (3.2): Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

2011-10-06 Thread Glyph
On Oct 6, 2011, at 10:11 PM, Cameron Simpson wrote: > Hmm. Glyph seemed to be arguing both ways - that everything should be > tested as root, and also that root is not special. I have unease over the > former and disagreement over the latter. Your reply to Stephen suggests that we are

Re: [Python-Dev] cpython (3.2): Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

2011-10-06 Thread Glyph
ts were running on somebody's public-facing production system in an "unprivileged" context, I'd be far more concerned about that than about it having root on some throwaway VM. -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-11 Thread Glyph Lefkowitz
proxy to make certain buggy client software work.) Of course you could have something like {b"CONNECTION-LOST": b"Connection-Lost", ...} somewhere at module scope, but that feels a bit sillier than just having a nice '.title()' method. -glyph

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-07 Thread Glyph Lefkowitz
d time defending 'swapcase', which is never used _at all_ within Twisted, on text or bytes. The only use-case I can think of for that method is goofy joke text filters, and it wouldn't be very good at that either. -glyph ___ Python-Dev ma

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

2011-09-01 Thread Glyph Lefkowitz
On Sep 1, 2011, at 5:23 AM, Cesare Di Mauro wrote: > A simple solution: when tracing is enabled, the new instruction format will > never be executed (and information tracking disabled as well). Correct me if I'm wrong: doesn't this mean that no profiler will accurately be able to measure the p

Re: [Python-Dev] Ctypes and the stdlib (was Re: LZMA compression support in 3.3)

2011-08-28 Thread Glyph Lefkowitz
On Aug 28, 2011, at 7:27 PM, Guido van Rossum wrote: > In general, an existing library cannot be called > without access to its .h files -- there are probably struct and > constant definitions, platform-specific #ifdefs and #defines, and > other things in there that affect the linker-level callin

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Glyph Lefkowitz
On Aug 12, 2011, at 2:33 PM, P.J. Eby wrote: > At 01:09 PM 8/12/2011 -0400, Glyph Lefkowitz wrote: >> Upon further reflection, PEP 402 _will_ make dealing with namespace packages >> from this code considerably easier: we won't need to do AST analysis to look >> f

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Glyph Lefkowitz
On Aug 12, 2011, at 11:24 AM, P.J. Eby wrote: > That is, the above code hardocdes a variety of assumptions about the import > system that haven't been true since Python 2.3. Thanks for this feedback. I honestly did not realize how old and creaky this code had gotten. It was originally develo

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-11 Thread Glyph Lefkowitz
On Aug 11, 2011, at 11:39 AM, Barry Warsaw wrote: > On Aug 11, 2011, at 04:39 PM, Éric Araujo wrote: > >>> * XXX what is the __file__ of a "pure virtual" package? ``None``? >>> Some arbitrary string? The path of the first directory with a >>> trailing separator? No matter what we put, *some*

Re: [Python-Dev] HTMLParser and HTML5

2011-07-29 Thread Glyph Lefkowitz
hat, and there are just a few spec updates and bugfixes that need to be applied, by all means, ignore my comment. -glyph ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pyt

Re: [Python-Dev] HTMLParser and HTML5

2011-07-29 Thread Glyph Lefkowitz
disaagree. >> Having proper html parsing out of the box is part of the "batteries >> included" thing. > > Well, you can easily prove me wrong by implementing this. > > Stefan Please don't implement this just to profe Stefan wrong :). The thing to do, if you

Re: [Python-Dev] Comments of the PEP 3151

2011-07-26 Thread Glyph Lefkowitz
On Jul 26, 2011, at 6:49 PM, Antoine Pitrou wrote: > On Mon, 25 Jul 2011 15:28:47 +1000 > Nick Coghlan wrote: >> There may be some error codes that we choose to map to these generic >> errors, even if we don't give them their own exception types at this >> point (e.g. ECONSHUTDOWN could map dire

Re: [Python-Dev] The socket HOWTO

2011-06-07 Thread Glyph Lefkowitz
On Jun 5, 2011, at 3:35 PM, Martin v. Löwis wrote: > And that's all fine. I still claim that you have to *understand* > sockets in order to use it properly. By this, I mean stuff like > "what is a TCP connection? how is it established?", "how is UDP > different from TCP?", "when data arrives, what

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Glyph Lefkowitz
On Jun 4, 2011, at 11:32 PM, Martin v. Löwis wrote: > b) telling people to use Twisted or asyncore on the server side > if they are new to sockets is bad advice. People *first* have > to understand sockets, and *then* can use these libraries > and frameworks. Those libraries aren't made to b

Re: [Python-Dev] Python 3.x and bytes

2011-05-19 Thread Glyph Lefkowitz
On May 19, 2011, at 1:43 PM, Guido van Rossum wrote: > -1; the result is not a *character* but an integer. Well, really the result ought to be an octet, but I suppose adding an 'octet' type is beyond the scope of even this sprawling discussion :). > I'm personally favoring using b'a'[0] and po

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Glyph Lefkowitz
onserve cache" approach. You can see this pretty clearly by running your favorite Python benchmark of choice on machines which are similar except for cache size. The newer machine, with the bigger cache, will run Python considerably faster, but doesn't help the average trivial C benchma

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Glyph Lefkowitz
On May 6, 2011, at 12:31 PM, Michael Foord wrote: > pypy and .NET choose to arbitrarily break cycles rather than leave objects > unfinalised and memory unreclaimed. Not sure what Java does. I think that's a mischaracterization of their respective collectors; "arbitrarily break cycles" implies t

Re: [Python-Dev] the role of assert in the standard library ?

2011-04-28 Thread Glyph Lefkowitz
On Apr 28, 2011, at 12:59 PM, Guido van Rossum wrote: > On Thu, Apr 28, 2011 at 12:54 AM, Tarek Ziadé wrote: >> In my opinion assert should be avoided completely anywhere else than >> in the tests. If this is a wrong statement, please let me know why :) > > I would turn that around. The assert

Re: [Python-Dev] python and super

2011-04-14 Thread Glyph Lefkowitz
On Apr 14, 2011, at 12:59 PM, Ronald Oussoren wrote: > What would the semantics be of a super that (...) I think it's long past time that this move to python-ideas, if you don't mind. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python

Re: [Python-Dev] Supporting Visual Studio 2010

2011-04-05 Thread Glyph Lefkowitz
On Apr 5, 2011, at 8:52 AM, exar...@twistedmatrix.com wrote: > On 09:58 am, mar...@v.loewis.de wrote: >>> Won't that still be an issue despite the stable ABI? Extensions on >>> Windows should be linked to the same version of MSVCRT used to compile >>> Python >> >> Not if they use the stable ABI.

Re: [Python-Dev] Policy for making changes to the AST

2011-04-04 Thread Glyph Lefkowitz
On Apr 4, 2011, at 2:00 PM, Guido van Rossum wrote: > On Mon, Apr 4, 2011 at 10:05 AM, fwierzbi...@gmail.com > wrote: >> As a re-implementor of ast.py that tries to be node for node >> compatible, I'm fine with #1 but would really like to have tests that >> will fail in test_ast.py to alert me!

Re: [Python-Dev] Differences among Emacsen

2011-03-30 Thread Glyph Lefkowitz
On Mar 30, 2011, at 2:54 PM, Barry Warsaw wrote: > On Mar 30, 2011, at 09:43 AM, Ralf Schmitt wrote: > >> Barry Warsaw writes: >>> >>> In case you missed it, there are now *three* Python modes. Tim Peters' >>> original and best (in my completely unbiased opinion ) python-mode.el >>> which is

Re: [Python-Dev] Embedded Python startup is slow

2011-03-24 Thread Glyph Lefkowitz
On Mar 24, 2011, at 4:06 AM, bruce bushby wrote: > I have previously asked this question in python-list, however I think it > belongs here. As the saying goes, this list is for development of python, not with python. So it would be appropriate to make a suggestion as to some direction for Pyt

Re: [Python-Dev] Finally switch urllib.parse to RFC3986 semantics?

2011-03-18 Thread Glyph Lefkowitz
On Mar 18, 2011, at 8:41 PM, Guido van Rossum wrote: > Really. Do they still call them URIs? :-) Well, by RFC 398*7* they're calling them IRIs instead. 'irilib', perhaps? ;-) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

Re: [Python-Dev] funky buildbot

2011-03-10 Thread Glyph Lefkowitz
d since 8.2. I'm not 100% sure this is a Twisted issue but you may want to try upgrading to 10.2.0 and see if that fixes things. (I have a dim memory of similar issues which were eventually fixed by something in our subprocess support...) -glyph __

Re: [Python-Dev] Support the /usr/bin/python2 symlink upstream

2011-03-04 Thread Glyph Lefkowitz
On Fri, Mar 4, 2011 at 10:03 AM, Westley Martínez wrote: > On Fri, 2011-03-04 at 00:54 -0800, Aaron DeVore wrote: > > On Thu, Mar 3, 2011 at 11:44 PM, Kerrick Staley > wrote: > > > That way, if the sysadmin does decide to replace the installed "python" > file, he can do so without inadvertently d

Re: [Python-Dev] Import and unicode: part two

2011-01-20 Thread Glyph Lefkowitz
On Jan 20, 2011, at 11:46 AM, Guido van Rossum wrote: > On Thu, Jan 20, 2011 at 5:16 AM, Nick Coghlan wrote: >> On Thu, Jan 20, 2011 at 10:08 PM, Simon Cross >> wrote: >>> I'm changing my vote on this to a +1 for two reasons: >>> >>> * Initially I thought this wasn't supported by Python at all

Re: [Python-Dev] Import and unicode: part two

2011-01-19 Thread Glyph Lefkowitz
On Jan 20, 2011, at 12:19 AM, Glenn Linderman wrote: > Now if the stuff after m_ was the hex UTF-8 of "café", that could get > interesting :) (As it happens, it's the hex digest of the MD5 of the UTF-8 of café... ;-))___ Python-Dev mailing list Pytho

Re: [Python-Dev] Import and unicode: part two

2011-01-19 Thread Glyph Lefkowitz
On Jan 20, 2011, at 12:02 AM, Glenn Linderman wrote: > But for local code, having to think up an ASCII name for a module rather than > use the obvious native-language name, is just brain-burden when creating the > code. Is it really? You already had to type 'import', presumably if you can thi

Re: [Python-Dev] devguide: Point out that OS X users need to change examples to use python.exe instead of

2011-01-10 Thread Glyph Lefkowitz
On Jan 10, 2011, at 1:37 PM, Łukasz Langa wrote: > I'm using the case-sensitive variant of HFS+ since 10.4. It works, I like it > and you get ./python with it. I realize that this isn't a popularity contest for this feature, but I feel like I should pipe up here and mention that it breaks some

Re: [Python-Dev] Checking input range in time.asctime and time.ctime

2011-01-05 Thread Glyph Lefkowitz
On Jan 5, 2011, at 4:33 PM, Guido van Rossum wrote: > Shouldn't the logic be to take the current year into account? By the > time 2070 comes around, I'd expect "70" to refer to 2070, not to 1970. > In fact, I'd expect it to refer to 2070 long before 2070 comes around. > > All of which makes me t

Re: [Python-Dev] Possible optimization for LOAD_FAST ?

2011-01-03 Thread Glyph Lefkowitz
On Jan 2, 2011, at 10:18 PM, Guido van Rossum wrote: > On Sun, Jan 2, 2011 at 5:50 PM, Alex Gaynor wrote: >> No, it's singularly impossible to prove that any global load will be any >> given >> value at compile time. Any optimization based on this premise is wrong. > > True. > > My proposed

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-25 Thread Glyph Lefkowitz
On Nov 24, 2010, at 10:55 PM, Stephen J. Turnbull wrote: > Greg Ewing writes: >> On 24/11/10 22:03, Stephen J. Turnbull wrote: >>> But >>> if you actually need to remember positions, or regions, to jump to >>> later or to communicate to other code that manipulates them, doing >>> this stuff the st

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-25 Thread Glyph Lefkowitz
On Nov 24, 2010, at 4:03 AM, Stephen J. Turnbull wrote: > You end up proliferating types that all do the same kind of thing. Judicious > use of inheritance helps, but getting the fundamental abstraction right is > hard. Or least, Emacs hasn't found it in 20 years of trying. Emacs hasn't even

Re: [Python-Dev] len(chr(i)) = 2?

2010-11-23 Thread Glyph Lefkowitz
buffer anyway; you can't do better than linear time there. So you're going to iterate through the buffer, using one of the techniques that James proposed, and remember some locations. Why not just have those locations be opaque cursors into your data? In summary: you're

  1   2   3   4   5   >