Re: [Python-Dev] [Python-3000] New proposition for Python3 bytes filename issue

2008-09-30 Thread Michael Urman
will map the ANSI bytestring to a Unicode filename via the active code page, and call CreateFileW accordingly. The active code page cannot be set to something as useful as UTF-8, so given any actual code page (1252, 932, etc.) there are Unicode strings that cannot be represented with a bytestrin

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-10-30 Thread Michael Foord
on ctypes would be enormously useful for PyPy, IronPython and Jython, but ctypes is not yet as portable as Python itself which could be an issue (although one worth resolving). Michael Foord [1] http://code.google.com/p/ironclad [2] Strictly speaking they are managed objects of unmanaged t

Re: [Python-Dev] Fwd: Removal of GIL through refcounting removal.

2008-10-31 Thread Michael Foord
ems) simply turn to other languages. All the best, Michael Foord I worry, if it is ever actually removed, that I won't be able to convince these people that you really don't need to spawn twenty threads to write an IRC bot. On Fri, Oct 31, 2008 at 2:24 AM, Nick Coghlan <[EMA

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

2008-11-19 Thread Michael Foord
o automate testing all the installers in various scenarios - each running simultaneously in a VM. Michael [1] Doesn't Windows have a way to send synthetic GUI events to a program? There ought to be a way to really script that, as the Python installer process presumbly doesn't change m

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

2008-11-26 Thread Michael Foord
:-) It would work well with the files being generated from an XML templating language like Mako which is what we will be switching to at Resolver Systems. http://wix.sourceforge.net/ Michael Foord I'm sure the Python Software Foundation would easily get a free license of one of

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-05 Thread Michael Urman
ere the idea of encoding filenames and environment > variables any other way is seen as crazy, then the Python 3 approach > will work seamlessly. > > In the meantime, raw bytes APIs will provide an alternative for those > that disagree with that philosophy. And until that

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-05 Thread Michael Urman
ey're still bytes no matter how much we want them to be characters. This difference, and secondarily the way python 3 tries to sweep it under the rug, seem to be the roots of the problem. -- Michael Urman ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Python-3.0, unicode, and os.environ

2008-12-07 Thread Michael Urman
Adam, for sending this only to you the first time] -- Michael Urman ___ 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] Psyco for -OO or -O

2008-12-13 Thread Michael Foord
his really belongs on Python-ideas and not Python-dev. The main reason why not is that someone(s) from the Python core team would then need to 'own' maintaining Psyco (which is x86 only as well). Psyco is so hard to maintain that even the original author wants to drop it. :-) Mich

Re: [Python-Dev] The endless GIL debate: why not remove thread support instead?

2008-12-13 Thread Michael Foord
x27;s needed, it has it's uses, just not the one *you* want. That's an interesting assertion about what threads were designed for. Do you have anything to back it up? Michael -- http://www.ironpythoninaction.com/ http://www.voidsp

Re: [Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)

2008-12-20 Thread Michael Foord
knows we're trying to exit anyway?". Because finalizers are only called when an object is destroyed presumably. Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Getting importlib into the standard library for 3.1

2009-01-10 Thread Michael Foord
, get the code set up to be run by regrtest, and then check the code in! I am going to set PyCon as a hard deadline such that no matter how much more file churn I have left I will still check it into py3k by then (along with importlib.import_module() into 2.7). +1 :-) Michael On Thu, Jan 8

Re: [Python-Dev] socket.create_connection slow

2009-01-14 Thread Michael Foord
This is something of a bugbear on Vista in general. Doing local web-development with localhost can be really painful until you realise that switching to 127.0.0.1 solves the problem... Michael ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Strategies for debugging buildbot failures?

2009-01-18 Thread Michael Foord
o make the changes permanent unless they are particularly intrusive. Michael Foord Alternatively, is it reasonable to create a new branch solely for the purpose of tracking down one particular problem? Again, I don't see this sort of thing happening, but it seems like an attractive strategy, since it a

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Michael Foord
) and this is presumed to apply to parts of software like header files and interface descriptions - which could easily apply to ABCs in Python. I recommend his book by the way - I'm about half way through so far and it is highly readable Michael Foord -- http://www.ironpythonin

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Michael Foord
n there are real annotations you have a conflict on how to indicate that in the documentation. Michael -Brett ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/ma

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Michael Foord
r for anyone who incorporates Python in an existing MSVC-based development environment. When in Rome... There would also be a significant performance cost. The PGO (Profile Guided Optimisation) compilation of Visual Studio is impressive. Michael -- http://www.ironpythoninactio

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Michael Foord
Stephen J. Turnbull wrote: M.-A. Lemburg writes: > On 2009-01-20 11:02, Michael Foord wrote: > > Mere collections of facts are not copyrightable as they are not > > creative (the basis of copyright) That's incorrect in the U.S.; what is copyrightable is an *original work

Re: [Python-Dev] PEP 374 (DVCS) now in reST

2009-01-25 Thread Michael Foord
til a clear winner springs up. Well, that sounds like an ideal situation to end up in. Is there a downside other than the work it creates for you? Michael -Brett ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

Re: [Python-Dev] Python 3.0.1

2009-01-28 Thread Michael Foord
27;t think we do users any favours by being cautious in removing / fixing things in the 3.0 releases. Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog ___ Python-Dev mailing list Python-Dev@python.org http://mail.py

Re: [Python-Dev] pprint(iterator)

2009-01-29 Thread Michael Foord
for Python 2.7, too. Don't we have a pretty-print API - and isn't it spelled __str__ ? Michael Foord -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog ___ Python-Dev mailing list Python-Dev@python.org http://mail.py

Re: [Python-Dev] Python 3.0.1

2009-01-29 Thread Michael Foord
Feldman """ I suspect that the use of significant whitespace is too deeply ingrained in Python for us to change it now - even in Python 3. ;-) Michael Raymond ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.

[Python-Dev] The interpreter accepts f(**{'5':'foo'}); is this intentional?

2009-02-05 Thread Michael Haggerty
>>> f(**{'1':2}) {'1': 2} Is this behavior required somewhere by the Python language spec, or is it an error that just doesn't happen to be checked, or is it intentionally undefined whether this is allowed? Michael __

Re: [Python-Dev] [Python-checkins] cpython: Fix closes Issue11281 - smtplib.STMP gets source_address parameter, which adds

2011-07-31 Thread Michael Foord
TIME > technically inaccurate? > It does mean that users will expect to be able to call with an explicit timeout=None and get the default behaviour. Just use the numeric value of the global timeout perhaps? MIchael Foord > FWIW, I see similar style (...,[,timeout], kw=val) adopte

Re: [Python-Dev] unittest bug

2011-08-03 Thread Michael Foord
TestCase and main and everything should work fine. Using "import *" is not recommended except at the interactive interpreter and it doesn't play well with unittest.main which does magic introspection to find tests to run. Michael > class MyTest(TestCase): >def tes

Re: [Python-Dev] unittest bug

2011-08-03 Thread Michael Foord
On 3 Aug 2011, at 22:58, Ethan Furman wrote: > Michael Foord wrote: >> On 3 Aug 2011, at 21:36, Ethan Furman wrote: >>> My apologies for posting here first, but I'm not yet confident enough in my >>> bug searching fu, and duplicates are a pain. >>> >

Re: [Python-Dev] Coding guidelines for os.walk filter

2011-08-30 Thread Michael Urman
mented behavior. http://docs.python.org/dev/library/os.html#os.walk shows a similar example: for root, dirs, files in os.walk('python/Lib/email'): # ... dirs.remove('CVS') # don't visit CVS directories -- Michael Urman __

[Python-Dev] Maintenance burden of str.swapcase

2011-09-05 Thread Michael Foord
is too late for Python 2.x, it *is* (in my opinion) worth removing unused and unneeded APIs. Even if the effort to remove them is more than any effort saved on the part of users it helps other implementations down the road that no longer need to provide these APIs. All the best, Michael Foord

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

2011-09-06 Thread Michael Foord
; 'Aaaa Bbbb' > >>> k[0].swapcase()+k[1:].lower() > 'Aaaa ' > > >> If k is uppercase, previous .upper() is redundant. If k is mixed case, code >> may have problems. > > "May" have problems? > > > pERSONNALLY,

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

2011-09-06 Thread Michael Foord
which I don't expect until 2020. We still have our standard deprecation policy that we can follow in Python 3. We don't have to wait until Python 4 to remove things. Changing semantics or syntax is harder because you can't really deprecate. Just removing methods is straightforward

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

2011-09-11 Thread Michael Foord
Does anyone *actually* use .title() for this? (And why not just use the correct casing in the string literal...) Michael > You might say that the protocol "has" to be case-insensitive so > this is a silly frill: Not me, sir. My whole point about the "bytes should b

Re: [Python-Dev] Packaging in Python 2 anyone ?

2011-09-13 Thread Michael Foord
whole branch. This works pretty well. All the best, Michael Foord Another question: What about the docs? Can we just point people to docs.python.org and tell them to mentally replace packaging with distutils2? If that is judged unacceptable, then I’ll synchronize the docs in the d2 repo, but t

Re: [Python-Dev] Packaging in Python 2 anyone ?

2011-09-15 Thread Michael Foord
On 15/09/2011 17:23, Éric Araujo wrote: Le 13/09/2011 18:34, Michael Foord a écrit : On 13/09/2011 16:57, Éric Araujo wrote: (IIRC PyPI will require us to play games to have both 2.x and 3.x versions of distutils2.) What I'm doing for unittest2. [...] 2) I have a pypi project c

Re: [Python-Dev] cpython: Issue #1172711: Add 'long long' support to the array module.

2011-09-21 Thread Michael Foord
;m not a big fan of skipUnless, but there you go. I find "skip if not" readable too and always have to "work out" what skipUnless means. It's probably just that "if" and "if not" are such Python idioms and "unless" isn't. Michael ___

Re: [Python-Dev] unittest missing assertNotRaises

2011-09-28 Thread Michael Foord
xception do_something() All the best, Michael Foord Thanks Wilfred ___ 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/fuzzyman%40vo

Re: [Python-Dev] unittest missing assertNotRaises

2011-09-28 Thread Michael Foord
seful distinction... I'm becoming more sympathetic to that view. All the best, Michael ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/

Re: [Python-Dev] Python compatibility issue with Windows Developer Preview

2011-10-04 Thread Michael Foord
ce for support would be the pywin32 bug tracker and mailing lists (as they're not part of core Python). Michael I'd like to connect directly with a developer on the project so that we can work closesly to resolve this issue. There aren't many Windows devs around here,

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

2011-10-07 Thread Michael Foord
correctly as admin (without an obvious good reason). It would seem that for this use case it is more important that all tests pass when run as a *non-admin* user. Michael Therefore builders should be set up in both configurations, running the full test suite, to ensure that all code runs

Re: [Python-Dev] Bring new features to older python versions

2011-10-09 Thread Michael Foord
support for older versions of python at will. Ditto. unittest2 and the mock test suite both have a subset of this in for some of the newer Python standard library features they use (plus putting back into Python 3 some of the things that disappeared like callable and apply). All the best, Mic

Re: [Python-Dev] Packaging and binary distributions for Python 3.3

2011-10-09 Thread Michael Foord
file that contains all the bits they need to > install a distribution. Just to agree with Paul, a typical Windows Python user will not be able to install a non-binary version of a distribution that includes C code. Even on the Mac it is common to distribute binaries. Michael > > My expectation

Re: [Python-Dev] Bring new features to older python versions

2011-10-11 Thread Michael Foord
+ features then projects that also support Python 3 can still use new features without having to worry about compatibility (it solves the same problem). All the best, Michael Foord --- Giampaolo http://code.google.com/p/pyftpdlib/ http://code.google.com/p/psutil/ __

Re: [Python-Dev] Bring new features to older python versions

2011-10-11 Thread Michael Foord
been backported to Python 2.4 (although use of the with statements in the tests themselves will have to be changed still). All the best, Michael Foord -Toshio ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

[Python-Dev] Fwd: Issue with the link to python modules documentation

2011-10-17 Thread Michael Foord
Hey folks, The title of the "Global Module Index" for 3.2 documentation is "Python 3.1.3 documentation". http://docs.python.org/py3k/modindex.html See the report below (attached screenshot removed). All the best, Michael Foord Original Message Subjec

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-23 Thread Michael Urman
On Sun, Oct 23, 2011 at 17:15, Mark Hammond wrote: > How about abusing the existing flags for this purpose - eg: > > % py -3? > % py -2.7? I would have expected that to launch an interactive python shell of the appropriate version. Does it do something else tod

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-23 Thread Michael Urman
On Sun, Oct 23, 2011 at 20:58, Mark Hammond wrote: > On 24/10/2011 12:56 PM, Michael Urman wrote: >> >> On Sun, Oct 23, 2011 at 17:15, Mark Hammond >>  wrote: >>> >>> How about abusing the existing flags for this purpose - eg: >>> >>> %

[Python-Dev] ctypes: alignment of (simple) types

2011-11-07 Thread Michael Walle
e overrides the hardcoded align property of that type? -- Michael ___ 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] Python 3, new-style classes and __class__

2011-11-19 Thread Michael Foord
lass__ There must be something else going on here. All the best, Michael Foord Thanks and regards, Vinay Sajip [1] http://goo.gl/1Jlbj ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] Python 3, new-style classes and __class__

2011-11-19 Thread Michael Foord
On 19 November 2011 23:11, Vinay Sajip wrote: > Michael Foord voidspace.org.uk> writes: > > > That works fine in Python 3 (mock.Mock does it): > > > > >>> class Foo(object): > > ... @property > > ... def __class__(self): > > ... retur

Re: [Python-Dev] Python 3, new-style classes and __class__

2011-11-20 Thread Michael Foord
stand correctly, ABCs are great for allowing classes of objects to pass isinstance checks (etc) - what proxy, lazy and mock objects need is to be able to allow individual instances to pass different isinstance checks. All the best, Michael Foord > --Guido > > On Sat, Nov 19, 2011 at 6

Re: [Python-Dev] Python 3, new-style classes and __class__

2011-11-21 Thread Michael Foord
On 20/11/2011 21:41, Guido van Rossum wrote: On Sun, Nov 20, 2011 at 10:44 AM, Michael Foord wrote: On 20 Nov 2011, at 16:35, Guido van Rossum wrote: Um, what?! __class__ *already* has a special meaning. Those examples violate that meaning. No wonder they get garbage results. The correct

Re: [Python-Dev] webmas...@python.org address not working

2011-11-24 Thread Michael Foord
On 25/11/2011 00:20, Jesus Cea wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 When mailing there, I get this error. Not sure where to report. The address works fine. It would be nice if someone fixed the annoying bounce however. :-) Michael """ Final-Recipie

Re: [Python-Dev] file.readinto performance regression in Python 3.2 vs. 2.7?

2011-11-25 Thread Michael Foord
ially unwise to base benchmarks on it working :-)) Note that this string optimization hack is still present in Python 3, but it now acts on *unicode* strings, not bytes. Ah, yes. That makes sense. Although for concatenating immutable bytes presumably the same hack would be *possible*.

Re: [Python-Dev] PEP 380

2011-11-25 Thread Michael Foord
ecode instructions: http://bugs.python.org/issue11816 Is it necessary to test parts of PEP 380 through bytecode structures rather than semantics? Those tests aren't going to be usable by other implementations. Michael > > I find Meador's suggestion to change the name of the new AP

Re: [Python-Dev] PEP 380

2011-11-26 Thread Michael Foord
On 26/11/2011 07:46, Maciej Fijalkowski wrote: On Sat, Nov 26, 2011 at 6:39 AM, Nick Coghlan wrote: On Sat, Nov 26, 2011 at 8:14 AM, Michael Foord wrote: On 24 Nov 2011, at 04:06, Nick Coghlan wrote: On Thu, Nov 24, 2011 at 10:28 AM, Guido van Rossum wrote: Mea culpa for not keeping

Re: [Python-Dev] Deprecation policy

2011-11-28 Thread Michael Foord
APIs around can require effort just to keep them working and may actively *prevent* other changes / improvements. All the best, Michael Foord So, I think we should have a clear and working deprecation policy, and Ezio's suggestion sounds good to me. There should be a clean way to state, i

[Python-Dev] Unicode re support in Python 3

2011-12-09 Thread Michael Foord
issue it's not clear to me what needs to be done for it to be accepted (or rejected), beyond a general "it's a big change". All the best, Michael Foord -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others

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

2011-12-09 Thread Michael Foord
tion (and even found bugs in Python 3 because of it). The exception handling is the worst - no compatible syntax between 2.4-5 and Python 3. So you have to use sys.exc_info. Other than that it isn't too hard / bad. All the best, Michael > -Barry > __

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

2011-12-13 Thread Michael Foord
rts code that doesn't need converting". Could you clarify? Thanks, Michael Laurence ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opti

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

2011-12-13 Thread Michael Foord
something else? Michael -- Nick Coghlan (via Gmail on Android, so likely to be more terse than usual) On Dec 13, 2011 11:46 PM, "Michael Foord" <mailto:fuzzy...@voidspace.org.uk>> wrote: On 13/12/2011 13:33, Laurence Rowe wrote: On Mon, 12 Dec 2011 22

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

2011-12-13 Thread Michael Foord
On 13/12/2011 14:28, Laurence Rowe wrote: On Tue, 13 Dec 2011 14:42:12 +0100, Michael Foord wrote: On 13/12/2011 13:33, Laurence Rowe wrote: On Mon, 12 Dec 2011 22:18:40 +0100, Chris McDonough wrote: On Mon, 2011-12-12 at 09:50 -0500, PJ Eby wrote: As someone who ported WebOb

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

2011-12-13 Thread Michael Foord
of Benjamin Peterson's support package to help write code that works on both 2 and 3. So the idea is that the conversion isn't just a straight syntax conversion - but that it [could] generate code using this library. All the best, Michael [1] http://packages.python.org/six/ Beyond t

[Python-Dev] Potential NULL pointer dereference in descrobject.c

2011-12-17 Thread Michael Mueller
Hi Guys, We've been analyzing CPython with our static analysis tool (Sentry) and a NULL pointer dereference popped up the other day, in Objects/descrobject.c: if (descr != NULL) { Py_XINCREF(type); descr->d_type = type; descr->d_name = PyUnicode_InternFromString(name);

Re: [Python-Dev] Potential NULL pointer dereference in descrobject.c

2011-12-17 Thread Michael Mueller
On Sat, Dec 17, 2011 at 5:02 AM, Benjamin Peterson wrote: > 2011/12/17 Michael Mueller : >> >> Hopefully someone can take a look and determine the appropriate fix. > > Fixed. > > -- > Regards, > Benjamin Excellent! -- Mike Mueller Phone: (401) 405-1525 Ema

Re: [Python-Dev] Anyone still using Python 2.5?

2011-12-21 Thread Michael Foord
still supporting 2.4. The *major* syntax feature you lose by targeting 2.4 is the with statement, so it will be nice to drop 2.4 support. The next releases of mock and unittest2 will still support 2.4, but the ones after that will be 2.5+. Thankfully tox makes testing across multiple versions

Re: [Python-Dev] Anyone still using Python 2.5?

2011-12-21 Thread Michael Foord
for research projects. They switched to using Python 3 a while ago. All the best, Michael Foord > Mark > > On 21/12/2011 6:16 PM, Chris Withers wrote: >> What's the python-dev view on this? >> >> Original Message >> Subject: Anyone still

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

2011-12-28 Thread Michael Foord
original report didn't make it onto the security list because it was held in a moderation queue). The same vulnerability was reported against various languages and web frameworks, and is already fixed in some of them. Their recommended fix is to randomize the hash function. All the best

Re: [Python-Dev] Writable __doc__

2012-01-19 Thread Michael Foord
made it a de-facto feature. But what of the discrepancy between the 'type' metaclass and any other Python metaclass? There are many discrepancies between built-in types and any Python class. Writable attributes are (generally) one of them. Michael Given that we haven't had a

Re: [Python-Dev] python build failed on mac

2012-01-22 Thread Michael Foord
to be that way, but it's fine by me as >> both ways work fine. > > I am not sure, that was just try and worked for me, with first option > suggested by you was throwing same compile error then I tried with this that > worked :) The problems compiling Python 3 on th

Re: [Python-Dev] python build failed on mac

2012-01-22 Thread Michael Foord
On 22 Jan 2012, at 17:43, Łukasz Langa wrote: > Wiadomość napisana przez Michael Foord w dniu 22 sty 2012, o godz. 14:14: > >> ./configure CC=gcc-4.2 --prefix=/dev/null --with-pydebug > > Why the phony prefix? Heh, it's what I've always done - I think copied

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

2012-01-27 Thread Michael Foord
rts of the standard library after first being a third party library (sometimes under a different name, e.g. simplejson -> json): try: from __preview__ import thing except ImportError: import thing So no need to target a very specific version of Python. Michael chee

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

2012-01-27 Thread Michael Foord
accessible through __preview__ too? +1 The point about pickling is one good reason, minimising code breakage (due to package name changing) is another. Michael Benefits for the core development team -- Currently, the core developers are really reluctant to add

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

2012-01-27 Thread Michael Foord
t will graduate at some point - __preview__ is a place for apis to stabilise and mature, not a place for dubious libraries that we may or may not want in the standard library at some point. Michael -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself an

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

2012-01-27 Thread Michael Foord
ept ImportError: import json as json It's trivial to wrap in a function though - or do the import in one place and then import the package from there. Michael Perhaps the versioned import stuff could be implemented (whatever the syntax may be), in order that something like this can

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

2012-01-27 Thread Michael Foord
view__ adds nothing to the process. Sure. __preview__ is for things that *need* previewing. All the best, Michael Foord Even when there are candidates for inclusion with relatively stable APIs, like regex, we should *assume* that there will be API differences between __preview__.regex and

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

2012-01-27 Thread Michael Foord
f use cases it works fine (simplejson and json aren't *identical*, but it works for most people). Michael try: result = thing.foo(a, b, c) + thing.bar(x) except AttributeError: # Must be the preview version result = thing.foobar(a, c, b, x) -- http://www.voidspace.org.uk

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

2012-01-28 Thread Michael Foord
tees in the next release". +1. Yep, nice way of putting it - and summing up the virtues of the approach. (Although I might say "most likely it will move into the main part of the standard library with full backwards compatibility guarantees in a future release".) Michael Paul. _

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

2012-01-28 Thread Michael Foord
eeds to change because the version of some library has now changed.) Plus having a package in __preview__ has no bearing on whether or not the system packages the third party version, so I think it's a bit of a red-herring. Michael On the other hand, __preview__ would clearly signal that

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

2012-01-28 Thread Michael Foord
know where you got that impression. :-) One of the reasons for __preview__ is that it means integrating libraries with the Python build and test systems, for all platforms. Packaging for [some-variants-of] Linux only doesn't do anything for this. All the best, Michael -- stuffing the

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

2012-01-28 Thread Michael Foord
ard library is distributed or versioned. A separate proposal about standard library versioning has been floated but is *much* more controversial and therefore much less likely to happen. So I wouldn't hold your breath on it... All the best, Michael Foord ___

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

2012-01-28 Thread Michael Foord
On 28/01/2012 04:44, Stephen J. Turnbull wrote: Michael Foord writes: > >> Assuming the module is then promoted to the the standard library proper in > >> release ``3.X+1``, it will be moved to a permanent location in the library:: > >>

Re: [Python-Dev] A new dictionary implementation

2012-02-02 Thread Michael Foord
e for instances, which may be overridden by an instance attribute on *some* instances. All the best, Michael Foord Chris -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you giv

Re: [Python-Dev] A new dictionary implementation

2012-02-09 Thread Michael Foord
is 12% faster. 2to3, which seems to be the only "realistic" benchmark that runs on Py3, shows no change in speed and uses 10% less memory. In your first version 2to3 used 28% less memory. Do you know why it's worse in this version? Michael All benchmarks and tests perform

[Python-Dev] Links to last binary builds to download pages

2012-02-19 Thread Michael Foord
eleases could include similar links in future. All the best, Michael -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/

Re: [Python-Dev] PEP 414 - Unicode Literals for Python 3

2012-02-26 Thread Michael Foord
gs. There is no single *syntax* that is compatible with both Python 2 and Python 3 that permits this. (If you use "u" for Unicode in Python 2 and no prefix for native strings then your code is Python 3 incompatible, if you use the future import so that your strings are unicode in

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

2012-03-12 Thread Michael Foord
Hello all, At the Python Language Summit adding the "mock" library to the Python Standard Library was discussed and agreed. Here is a very brief PEP covering the decision and rationale. All the best, Michael Foord PEP: 417 Title: Including mock in the Standard Library Version:

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

2012-03-12 Thread Michael Foord
s a context manager). Beyond that the api is stable. A bunch of Python 2 compatibility code can also be removed in the standard library version. All the best, Michael Foord > Good luck! > > --Guido > > On Mon, Mar 12, 2012 at 4:01 PM, Gregory P. Smith wrote: >&g

Re: [Python-Dev] Unpickling py2 str as py3 bytes (and vice versa) - implementation (issue #6784)

2012-03-13 Thread Michael Foord
thon2 'unicode' > python3 'bytes' -> python2 '__builtins__.bytes object' > It does seem unfortunate that by default it is impossible for a developer to "do the right thing" as regards pickling / unpickling here. Binary data on Python 2 being unpickl

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

2012-03-13 Thread Michael Foord
I want the highest resolution cross platform measure of wallclock time - and time.wallclock() looked ideal. If monotonic may not exist or can fail why would that be better? Michael > -- > > monotonic() has 3 implementations: > * Windows: QueryPerformanceCounter() with Qu

Re: [Python-Dev] [Python-checkins] cpython: PEP 417: Adding unittest.mock

2012-03-14 Thread Michael Foord
or pointing it out. I'm maintaining a "clean" (no Python 2 compatibility code) version in the standard library. I'll be maintaining mock, so I'd like to be assigned any issues on it and at least talked to before changes are made. I am maintaining a backport still, but th

Re: [Python-Dev] cpython: PEP 417: Adding unittest.mock

2012-03-14 Thread Michael Foord
On 14 Mar 2012, at 12:33, Georg Brandl wrote: > On 14.03.2012 20:25, michael.foord wrote: >> http://hg.python.org/cpython/rev/2fda048ee32a >> changeset: 75632:2fda048ee32a >> user:Michael Foord >> date:Wed Mar 14 12:24:34 2012 -0700 >&

Re: [Python-Dev] [Python-checkins] cpython: PEP 417: Adding unittest.mock

2012-03-14 Thread Michael Foord
On 14 Mar 2012, at 13:46, Terry Reedy wrote: > On 3/14/2012 4:22 PM, Michael Foord wrote: >> >> On 14 Mar 2012, at 13:08, Terry Reedy wrote: >> >>> On 3/14/2012 3:25 PM, michael.foord wrote: >>>> +# mock.py +# Test tools for mocking and patching

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

2012-03-17 Thread Michael Foord
vailable. If *strict* is True, raise an :exc:`OSError` on error or >> + :exc:`NotImplementedError` if no monotonic clock is available. > > This is not clear to me. Why wouldn't it raise OSError on error even with > strict=False? Please clarify which exception is raised

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

2012-03-17 Thread Michael Foord
On 17 Mar 2012, at 15:04, Georg Brandl wrote: > On 03/17/2012 09:47 PM, Michael Foord wrote: >> >> On 17 Mar 2012, at 08:49, Georg Brandl wrote: >> >>> On 03/15/2012 01:17 AM, victor.stinner wrote: >>>> http://hg.python.org/cpython/rev/27441e0d6a

Re: [Python-Dev] cpython: PEP 417: Adding unittest.mock

2012-03-18 Thread Michael Foord
On 16 Mar 2012, at 11:54, Nick Coghlan wrote: > On Thu, Mar 15, 2012 at 6:27 AM, Michael Foord > wrote: >> On the topic of docs mock documentation is about eight pages long. My >> intention was to strip this down to just the api documentation, along with a >> lin

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

2012-03-25 Thread Michael Urman
hen the text next to it reflows to a new length, the bar can become longer or shorter than necessary. On the one hand this makes it hard to get the sidebar content to show at the bottom of the page; on the other, I believe it mitigates potential problems if sidebar content is t

Re: [Python-Dev] cpython: Adding unittest.mock documentation

2012-03-26 Thread Michael Foord
On 26 Mar 2012, at 08:11, Georg Brandl wrote: > On 26.03.2012 00:13, michael.foord wrote: >> http://hg.python.org/cpython/rev/adc1fc2dc872 >> changeset: 75938:adc1fc2dc872 >> user:Michael Foord >> date:Sun Mar 25 23:12:55 2012 +0100 >>

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

2012-03-27 Thread Michael Foord
ule and pybench program). It is this always-having-to-manually-fallback-depending-on-os that I was hoping your new functionality would avoid. Is time.try_monotonic() suitable for this usecase? Michael As well, certain kinds of scheduling/timeouts would be better implemented with the C++0x

Re: [Python-Dev] datetime module and pytz with dateutil

2012-03-31 Thread Michael Foord
y) would need to be modified to use the system database on Windows. This is my (potentially flawed) understanding, anyway. Michael > > //Lennart > ___ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/list

Re: [Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)

2012-04-06 Thread Michael Urman
r systems where another user has locked the clock. Thus the exception cannot tell you anything more than None tells you. (Of course, if my assumption is wrong, I'm not sure whether my reasoning still applies.) -- Michael Urman ___ Python

Re: [Python-Dev] outdated info on download pages for older versions

2012-05-02 Thread Michael Foord
bottom of > pages). We develop CPython but do not directly manage the website. Not true. The download pages are administered by the release managers not the web team. For the record, the best way of contacting the web team (such as it is) is the pydotorg-w

<    8   9   10   11   12   13   14   15   16   17   >