Re: [Python-Dev] Syntax suggestion for imports

2008-01-03 Thread Christian Heimes
try: import name2 as target except ImportError: target = None from name[, or name2 ...] [, or None] import target translates into try: from name import target except ImportError: try: from name2 import target except Impor

Re: [Python-Dev] Contributing to Python

2008-01-03 Thread Christian Heimes
ve a C coder a hand by writing documentation and unit tests for the C coder. This way the C coder can concentrate on the C code and you can enhance your unit testing Fu. :) Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.o

Re: [Python-Dev] Contributing to Python

2008-01-03 Thread Christian Heimes
s discussed two threads "Bug tracker: meaning of resolution keywords" and "1324 bugs in the tracker" lately. I don't want to repeat the arguments here but Brett's answer http://permalink.gmane.org/gmane.comp.python.devel/90137 is worth reading. Christian _

Re: [Python-Dev] Return type of round, floor, and ceil in 2.6

2008-01-03 Thread Christian Heimes
ted). It's not guaranteed that it will work from 2.5. The transition plan for 2to3 is: * Get your code working under python2.6 -3 without Python 3.0 deprecation warnings * Use 2to3 to migrate the code from 2.6 to 3.0 Christian ___ Python-Dev m

[Python-Dev] long(float('nan')) conversion

2008-01-04 Thread Christian Heimes
t it's the default on some platforms. Today an user pointed out that he doesn't like the patch, too. How should the problem be solved? In my humble opinion long(float('nan')) should return 0L in Python 2.5.2 for b/w compatibility and raise a ValueError or OverflowError in Python 2.6

Re: [Python-Dev] Bug day tasks

2008-01-04 Thread Christian Heimes
to their existing > setup. It'd be nice if we can also get a bot into #python-dev to broadcast svn commits and bug tracker changes. The Twisted guys have good bot with decent msg coloring but IIRC it's tight into TRAC. For svn we could probably use CIA bot and tie it into a sv

Re: [Python-Dev] Bug day tasks

2008-01-04 Thread Christian Heimes
Christian Heimes wrote: > It'd be nice if we can also get a bot into #python-dev to broadcast svn > commits and bug tracker changes. The Twisted guys have good bot with > decent msg coloring but IIRC it's tight into TRAC. For svn we could > probably use CIA bot and tie it

Re: [Python-Dev] Contributing to Python

2008-01-05 Thread Christian Heimes
Even a perfect patch costs several minutes of our life time. The patch must be reviewed, applied, compiled, the entire unit test suite must pass and finally it must be committed and the issues needs to be closed, too. Christian ___ Python-Dev mailin

[Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-06 Thread Christian Heimes
kage into sys.path before Lib/ ? Christian [1] http://www.python.org/dev/peps/pep-0365/ ___ 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] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-06 Thread Christian Heimes
d of thing to become common > practice. I like to give 3rd party software a chance to *extend* a name space package like xml rather then to overwrite it. As far as I understand your problem pyxml is overwriting the name space and claiming it for itself rather

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-06 Thread Christian Heimes
oint of a namespace package is to > reserve that namespace for packages produced by a particular > organization, similar to the way e.g. the 'org.apache.projectname' > packages in Java work. The initial idea behind the new packages for Python 3.0 weren't really based on

Re: [Python-Dev] Backport PEP 3129: Class Decorators

2008-01-07 Thread Christian Heimes
ort. Christian ___ 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] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-07 Thread Christian Heimes
have an API to get the directories from the registry. Is somebody interested in having a module for the task? I've some code for the job on disk. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Backport PEP 3129: Class Decorators

2008-01-08 Thread Christian Heimes
grammer and ASDL check it out, please? Christian ___ 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] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-08 Thread Christian Heimes
m this, so I'd be > +0 on theoretical grounds only. Python's _winreg module and pywin32 expose several functions to get the paths from the registry but I don't think it has a simple function like get_mydocuments(). Christian ___ Python-Dev ma

Re: [Python-Dev] Backport PEP 3129: Class Decorators

2008-01-08 Thread Christian Heimes
.exposed = True ... >>> type(Root.index) >>> Root.index.exposed True >>> Root.index.exposed = False Traceback (most recent call last): File "", line 1, in AttributeError: 'instancemethod' object has no attribute

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-08 Thread Christian Heimes
to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA. Christian ___ 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

[Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Christian Heimes
I've attached the first public draft of my first PEP. A working patch against the py3k branch is available at http://bugs.python.org/issue1576 Christian PEP: 369 Title: Lazy importing and post import hooks Version: $Revision$ Last-Modified: $Date$ Author: Christian Heimes Status: Draft

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Christian Heimes
7;ve mentioned zope.deferredimport in my PEP. :) Christian ___ 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: Lazy module imports and post import hook

2008-01-08 Thread Christian Heimes
he basic infrastructure for lazy imports. For example imp.lazy_import("a.b.c") doesn't put "a" and "a.b" in sys.modules. It neither doesn't cover the replacement __import__ hook provided by Hg nor the deprecat

[Python-Dev] Import by filename with __import__ ?

2008-01-08 Thread Christian Heimes
example") >>> mod >>> mod.__name__ '/tmp/example' >>> mod.__file__ '/tmp/example.py' >>> mod.test 23 Is it just a coincidence? Is it a desired feature? Why isn't it documented? Christian ___

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-09 Thread Christian Heimes
function from ShlObj.h. It's the preferred way to get shell folder paths like CLSID_PERSONAL (my documents). It's compatible with 2000 and newer (maybe even older, but we don't support ME, NT4 or older) and works on Vista, too. Christian

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-09 Thread Christian Heimes
alone by the > user. It's not an issue for experienced users. For the rest we can put a link in the start menu under Python 2.5 which opens a new explorer with the user package directory. Christian ___ Python-Dev mailing list Python-Dev@python.org ht

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

2008-01-09 Thread Christian Heimes
I read the announcement of the Python Users list and figured out that some of the other core developers might be interested in the news, too. Among other projects Python was upgraded to Rung 2 on the Coverity Scan list: http://scan.coverity.com/ Christian

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

2008-01-09 Thread Christian Heimes
Joseph Armbruster wrote: > Christian, > > Is there any way you (or someone else) could post up the results? It > looks like you need a log in to check them out. I haven't figured out how to access the results. Who has a login and access to the

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

2008-01-09 Thread Christian Heimes
ve access to the Python project on their site and the project is currently under maintenance. Maybe Neal can sheds some light on the Coverity Scan project. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/lis

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-09 Thread Christian Heimes
a nor MyDocuments fulfill our requirements. I don't argue for AppData, I only argue against UserProfile as the base directory for a user package directory. I'm open for any suggestion which doesn't violate MS' style guides. (I don't want to imply that I like the style guide b

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-09 Thread Christian Heimes
Brett Cannon wrote: > I agree with Nick and Nick. This should really be two separate PEPs. I'm fine with the proposal and I'm going to chop the PEP in two parts tonight. Somehow I suspect that the lazy import PEP will be postponed or rejec

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

2008-01-09 Thread Christian Heimes
on. > > Last run at 2007-12-27: 11 Outstanding Defects, 6 of them marked > "uninspected", > 3 marked "pending", and 2 marked "bug". My dict says: rung (of a ladder)- Leitersprossen Python has climbed up one step (or rung) of the ladder. Do y

[Python-Dev] PEP: Post import hooks

2008-01-09 Thread Christian Heimes
I've parted the former PEP as promised. Here is the post import hook. I'll tackle the other half of the PEP later. PEP: 369 Title: Post import hooks Version: $Revision$ Last-Modified: $Date$ Author: Christian Heimes Status: Draft Type: Standards Track Content-Type: text/x-rst Creat

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

2008-01-10 Thread Christian Heimes
ct names so I can batch up the request. Count me in! Christian ___ 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] Coverity Scan, Python upgraded to rung 2

2008-01-10 Thread Christian Heimes
-1 && fstat(fd, &st) == 0 && S_ISREG(st.st_mode)) Christian ___ 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: Post import hooks

2008-01-10 Thread Christian Heimes
llbacks are occurring from the import machinery. (Which > means that the notification API should probably set the hooks entry > to None while it's running, so that if it's called from inside a > hook, it will not double-run the hooks, and new hooks registered > wh

Re: [Python-Dev] PEP: Post import hooks

2008-01-10 Thread Christian Heimes
ot; is loaded: hook1 hook2 -> registers hookX for "foo" hookX is called directly hook3 hook4 > An error while running the hooks should also set the hook list to None > and discard all the hooks. There isn't any sane way to recover from an > error in

Re: [Python-Dev] PEP: Post import hooks

2008-01-10 Thread Christian Heimes
r() notices when a new element is appended. In the above sample can hook_aX be called after hook_ab1 or should it be called after hook_ab2? > In general, if you think something in peak.util.imports isn't required, > you're probably wrong. ;) *g* ok. I'll check your impleme

Re: [Python-Dev] PEP: Post import hooks

2008-01-10 Thread Christian Heimes
Phillip J. Eby wrote: > At 11:45 PM 1/10/2008 +0100, Christian Heimes wrote: >> In my version a hook is immediately called when the the registry value >> is set to None. When a hook is registered for a module during the >> execution of the callback then the hook is fired d

Re: [Python-Dev] PEP: Post import hooks

2008-01-11 Thread Christian Heimes
failing test would at least show the incorrectness. I'm still not sure which way is the correct way in your opinion and I hate guessing what you are trying to explain to me. Christian PS: I've a pending patch that queues new registrations while hooks are processe

Re: [Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread Christian Heimes
d one for easy tasks. May "beginner task", "easy" or "novice level" makes a good keyword. We could also mark complex/hard tasks, tasks which require C programming and documentation only tasks, even though I'm not sure how useful the additional tags would be.

[Python-Dev] PEP: per user site-packages directory

2008-01-11 Thread Christian Heimes
: $Date$ Author: Christian Heimes Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 11-Jan-2008 Python-Version: 2.6, 3.0 Post-History: Abstract This PEP proposes a new a per user site-packages directory to allow users the local installation of Python packages in their

Re: [Python-Dev] Bug day preparations: tagging bugs?

2008-01-11 Thread Christian Heimes
he developer role. I guess one needs to be a coordinator to add new keywords. Christian ___ 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] PySequence_Concat for dicts

2008-01-12 Thread Christian Heimes
tches. It'd stick to 2.6 because it's easy to port a 2.6 patch to 3.0, if the new feature won't make it into 2.6. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-12 Thread Christian Heimes
Christian Heimes wrote: > MA Lemburg has suggested a per user site-packages directory in the > "pkgutil, pkg_resource and Python 3.0 name space packages" thread. I've > written a short PEP about it for Python 2.6 and 3.0. Addition: An user has requested a new option t

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-13 Thread Christian Heimes
sy implementable idea, at least on Unix. Windows doesn't have getuid() and geteuid(). On the other hand Windows doesn't have the suid bit, too. I also tried to check if os.stat(__main__.__file__).st_uid == os.getuid() but the real __main__ is not available in site.py. It's loaded and a

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-13 Thread Christian Heimes
ailable, too. The 'site' module is imported by Py_Initialize(). sys.argv and the real __main__ module are set much later in Modules/main.c. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-13 Thread Christian Heimes
I've uploaded a new patch: http://bugs.python.org/issue1799 Christian ___ 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%4

Re: [Python-Dev] r59947 - in python/trunk:Lib/test/test_structseq.py Misc/NEWS

2008-01-13 Thread Christian Heimes
rned your request into an issue: http://bugs.python.org/issue1820 It's a feasible yet challenging task for a new CPython coder. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: htt

Re: [Python-Dev] [Python-checkins] r59947 - in python/trunk:Lib/test/test_structseq.py Misc/NEWS

2008-01-14 Thread Christian Heimes
Guido van Rossum wrote: > And I see no need for the new sys.flags object to be a tuple at all. Correct. We don't need item access anymore. However the struct seq should still be slice-able for functions like time.mktime(). Christian ___ Py

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-14 Thread Christian Heimes
g ~/bin for Unix (including Mac) and %APPDATA%/Python/Scripts for Windows. The Windows installer could then add the directory to the PATH environment and install a minimal bat file "@C:\Python26\python.exe %*" as python26.bat, too. Christian ___ Pyth

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-14 Thread Christian Heimes
iscussion point easy for me. I let the others decide! :) I don't feel like wasting my time on a bike shed discussion unless it's painted in a different color than blue. I like blue ... *g* Christian ___ Python-Dev mailing list Python-Dev@python

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-14 Thread Christian Heimes
PEP. Can I just submit the PEP or do I have to follow a procedure before I can add it to the PEP list? Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailma

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-14 Thread Christian Heimes
The PEP is now available at http://www.python.org/dev/peps/pep-0370/. The reference implementation is in svn, too: svn+ssh://[EMAIL PROTECTED]/sandbox/trunk/pep370 Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-15 Thread Christian Heimes
tory or use a usercustumize.py. * easy_install packages to the user site directory. Setuptools are not part of the Python stdlib. I'm confident that Phil is going to add the feature as soon as the feature is implemented for Python 2.6 What's missing? Christian ___

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-15 Thread Christian Heimes
while to find a reference to .local. It's part of the FreeDesktop.Org standards: http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/py

Re: [Python-Dev] PEP: Post import hooks

2008-01-15 Thread Christian Heimes
None hook(module) else: hooks = [] sys.post_import_hook_register[name] = hooks hooks.append(hook) def notify_loaded(mod_or_name): notification_in_progress = True try: ... finally: notificati

Re: [Python-Dev] PEP: Post import hooks

2008-01-15 Thread Christian Heimes
Phillip J. Eby wrote: > At 10:14 PM 1/15/2008 +0100, Christian Heimes wrote: >> My code queues up new hooks while a sequence of hooks is processed. It >> makes sure that hooks for a parent aren't called in the middle of a >> child's hook chain. > > Noti

Re: [Python-Dev] Python-Dev Digest, Vol 54, Issue 57

2008-01-15 Thread Christian Heimes
Bill Janssen wrote: > Good point, but I prefer ~/Library/Python to either of these. ~/Library/ is a Mac OS X thing. I haven't seen it on other Unix systems. I *could* add yet another environment variable PYTHONUSERHOME to set the base path but I prefer not. C

Re: [Python-Dev] Python-Dev Digest, Vol 54, Issue 57

2008-01-15 Thread Christian Heimes
ring in some useful, constructive criticism and use cases not covered by my PEP. Have you read the PEP at all? Christian ___ 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: Post import hooks

2008-01-15 Thread Christian Heimes
h my tests. The ref leak tests don't show a single missing reference. Christian ___ 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: Post import hooks

2008-01-15 Thread Christian Heimes
patch and explain why the implementation does all the crazy stuff. Christian ___ 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

[Python-Dev] PEP 370, open questions

2008-01-16 Thread Christian Heimes
ONUSERHOME? A CC of the mail goes to the authors of setuptools, virtual python, working env and virtual env. What's your opinion on the PEP? Do you have some input and advice for me? Christian ___ Python-Dev mailing list Python-Dev@python.org http://

Re: [Python-Dev] PEP 370, open questions

2008-01-17 Thread Christian Heimes
-build and > framework-build that share the same site-packages directory. Have you read glyph's posting? He brought up some good points why Python on Mac should use ~/.local. Framework builds have an additional import directory in ~/Library/Python Christian ___

Re: [Python-Dev] PEP 370, open questions

2008-01-17 Thread Christian Heimes
to the installer, where such global issues are considered > in a wider context" would do :) *hehe* I love your idea. It should be trivial to write a view lines of Python code which modify PATH in HKCU. I'm going to write a simple example and drop it into Tools/scripts/. Christian

Re: [Python-Dev] PEP 370, open questions

2008-01-17 Thread Christian Heimes
roblems. For example the user can use the -E flag or set up sudo to ignore the environment. The uid and gid tests aren't really required. They just provide an extra safety net if a user forgets to add the -s flag to a suid app. Christian

Re: [Python-Dev] PEP 370, open questions

2008-01-17 Thread Christian Heimes
Tim Golden wrote: > Christian Heimes wrote: >> I'll justify why I view Python as a roaming app. All >> company and university Linux boxes I've used in the past had exported >> $HOME via NFS. So ~/.local is roamed. > > I think there is a slight subtlety h

Re: [Python-Dev] PEP 370, open questions

2008-01-17 Thread Christian Heimes
thon setup.py install --user thing. ;) Christian ___ 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 370, open questions

2008-01-17 Thread Christian Heimes
g considerable amounts to a network-based profile. 3) is sensible but I'd prefer 4): 4) Default to the %APPDATA% env var but give the user a chance to overwrite the policy with the env var PYTHONUSERBASE, or whatever is a good name for it. Did I mention that I'm not good in naming things?

Re: [Python-Dev] PEP 370, open questions

2008-01-17 Thread Christian Heimes
Paul Moore wrote: > The one downside of following expanduser is that Christian's code is > in C, where ntpath.expanduser is in Python, so there are 2 versions to > keep in sync. Maybe Christian could expose his C implementation, which > ntpath.expanduser could then reuse?

Re: [Python-Dev] ntpath r54364 (was: PEP 370, open questions)

2008-01-17 Thread Christian Heimes
a\alpha or c:\users\groupa\name. The proper way for a ~user implementation is a bunch of Win32 API calls. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.or

Re: [Python-Dev] PEP 370, open questions

2008-01-17 Thread Christian Heimes
I thought it was a typo but I see the > same typo in the PEP. I have often wished for something like this for > debugging, and it might have other uses, but there should be a caution > against abuse :). Yeah! I've a tendency to drag typos through my code because I heavil

Re: [Python-Dev] ntpath r54364

2008-01-17 Thread Christian Heimes
wing the code posted the other day > on c.l.py [1] (although I'm now not sure about the l10n > aspects which Christian mentioned). Any technique of > going up one (from your own profile) and then down one > is no better than assuming that all users are in /home >

Re: [Python-Dev] PEP 370, open questions

2008-01-17 Thread Christian Heimes
On my box it's only used for some desktop related apps like ~/.local/share/Trash or XFC4. http://www.freedesktop.org/wiki/Specifications/basedir-spec Contrary to ~/local, the dot local directory doesn't show up, unless the user unhides dot files. Christian

Re: [Python-Dev] What to do for bytes in 2.6?

2008-01-18 Thread Christian Heimes
ing for `` (back ticks) were added. The feature is deprecated but the migration is very simple. A 2to26 fixer may be worth implementing, too. It could migrate minor changes like `` -> repr and "except egg, spam" -> "except egg as spam". Christian

Re: [Python-Dev] building _ctypes in trunk fails first time around

2008-01-18 Thread Christian Heimes
xes this -- it seems a simple matter of > _ctypes being built before _weakref. I applied a quick fix in r60043. Christian ___ 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 370, open questions

2008-01-18 Thread Christian Heimes
s (and companies) to adjust the user directory for all Python versions. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-de

Re: [Python-Dev] What to do for bytes in 2.6?

2008-01-18 Thread Christian Heimes
ause. That is a true semantic change that 2to3 cannot easily fix or > flag. Consider this an example of how 2to3 and -3 should augment each > other. Several warnings have to be removed: ``, callable and maybe more. Christian ___ Python-Dev mailing

Re: [Python-Dev] What to do for bytes in 2.6?

2008-01-18 Thread Christian Heimes
Christian Heimes wrote: > Ah, you like to keep it simple. The aliases are easily to implement. > Give me twenty minutes to implement it and write some unit tests. http://bugs.python.org/issue1865 ___ Python-Dev mailing list Python-Dev@python.or

Re: [Python-Dev] Initial Development

2008-01-19 Thread Christian Heimes
out with. We are having a bug day today. Please join us in #python-dev on irc.freenode.net Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/o

Re: [Python-Dev] What to do for bytes in 2.6?

2008-01-19 Thread Christian Heimes
uot; or "license" for more information. >>> b'a' 'a' >>> br'\a' '\\a' >>> bytes Christian ___ 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] Bug Day outcome

2008-01-20 Thread Christian Heimes
Quentin Gallet-Gilles wrote: > Excellent ! When will be the next one ? :-) Everyday can be a bug day. :) Nobody is going to stop you from squalling through the bug tracker. Christian ___ Python-Dev mailing list Python-Dev@python.org h

Re: [Python-Dev] Bug Day outcome

2008-01-20 Thread Christian Heimes
Malte Helmert wrote: > One question there: Will the "easy" keyword in roundup be maintained > further, i.e. will new easy bugs be marked in the future? That would be > very useful for neophyte contributors. Yes, we will keep marking easy bugs with the "e

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-20 Thread Christian Heimes
Jan Claeys wrote: > What do you mean by "configuration directory"? IMHO configuration files > on linux/unix should go into ~/.python2.6 or ~/.config/python2.6 or > something like that? It's already renamed in the PEP: http://www.python.org/dev/peps/pep-0370/#

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-20 Thread Christian Heimes
Jan Claeys wrote: > There should be a way for distro developers to make sure the users local > 'site-packages' is *not* used when running those tools. There is an option. Those tools should use the -E and -s argument: #!/usr/bin/env python

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-20 Thread Christian Heimes
n't have as much experience with Unix as we? Christian ___ 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: per user site-packages directory

2008-01-20 Thread Christian Heimes
Jan Claeys wrote: > So this is stuff that should never be changed by the user? ~/.local/lib/python2.6 has the same semantics as /usr/local/lib/python2.6 except it's a per user directory and not per machine. Christian ___ Python-Dev mailing lis

Re: [Python-Dev] #! magic

2008-01-20 Thread Christian Heimes
147483647, interactive=-2147483647, optimize=0, dont_write_bytecode=0, no_user_site=1, no_site=0, ingnore_environment=1, tabcheck=0, verbose=0, unicode=0) Christian ___ 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] Priorities in the tracker

2008-01-20 Thread Christian Heimes
Georg Brandl wrote: > Christian currently does a good job of assigning the correct properties > to new bugs. In any case, I'd prefer to keep a way to mark a bug as > "high-priority" (meaning that it should be fixed before the next release) > even if most of the bugs don&

Re: [Python-Dev] #! magic

2008-01-21 Thread Christian Heimes
; > And also, /usr/bin won't work, FreeBSD uses /usr/local/bin since Python is > installed through ports and is not a system binary. The -s option is part of my PEP and is not available in the trunk yet. The arg -Es may work because Python's arg parser doesn't recognize

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-21 Thread Christian Heimes
#!"): return for i in (1, 2): data = data[data.find('\n'):] if data.startswith("# -*- py-paranoid -*-"): return True return False Christian [1] Cygwin discussion thread about #! env http://www.cygwin.com/ml/cygwin/2002-02/msg00657.html/ _

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-21 Thread Christian Heimes
ncreasing take-up. setuptools and easy_install won't be included in Python 2.6 and 3.0: http://www.python.org/dev/peps/pep-0365/ Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] PEP: per user site-packages directory

2008-01-22 Thread Christian Heimes
?". People see that I invest a fair share of time into the PEP. So they hope I'm going to solve loosely connected issues, too. Personally I'm not going to solve every security issue with my PEP. I suggest that all the people, who were in

Re: [Python-Dev] #! magic

2008-01-22 Thread Christian Heimes
error or a typo in the code ^ ? It's a typo in the code. It's already fixed in the trunk but it was not fixed in the 370 branch. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubs

Re: [Python-Dev] why is mmap a builtin module on windows?

2008-01-23 Thread Christian Heimes
tead of creating standalone dlls. I also suspect that it's much faster because relocation is slow (see PC/dllbase_nt.txt). Martin or Mark can give you a better answer. Why do you want to overwrite the existing module instead of using a different name like ralfmmap? import ralfmmap as mmap

Re: [Python-Dev] why is mmap a builtin module on windows?

2008-01-23 Thread Christian Heimes
#x27;s sufficient to add the alias at the entry point of your application (the script that starts your app). Once the alias sys.modules]'mmap'] = ralfmmap is set, every import mmap gets your ralfmmap. Christian ___ Python-Dev mailing list Pyt

[Python-Dev] math and numerical fixes (was: When is min(a, b) != min(b, a)?)

2008-01-23 Thread Christian Heimes
ead local or global flag for NaN support. Depending on a flag Python turns a NaN into an exception. The feature needs a proper PEP. Maybe Mark has time to write a PEP in time. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.

Re: [Python-Dev] trunc()

2008-01-24 Thread Christian Heimes
onally the math module is a tiny wrapper around the system's libm. Functions for magic hooks like __trunc__ usually end up in builtins. In this particular case I don't mind where the function is going to live. Christian ___ Python-Dev mailing

Re: [Python-Dev] why is mmap a builtin module on windows?

2008-01-25 Thread Christian Heimes
the dll. At last the new modules must be integrated into the MSI installer script. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-

Re: [Python-Dev] trunc()

2008-01-25 Thread Christian Heimes
ceil(n), round(n), trunc(n), int(n))) ... Python 3:0 2.4 ( 2, 3, 2, 2, 2) 2.6 ( 2, 3, 3, 2, 2) -2.4 (-3, -2, -2, -2, -2) -2.6 (-3, -2, -3, -2, -2) Python 2.6: 2.4 ( 2.0, 3.0, 2.0, 2, 2) 2.6 ( 2.0, 3.0, 3.0, 2, 2) -2.4 (-3.0, -2.0, -2.0, -2, -2) -2.6 (-3.0, -2.0, -3.0, -2, -2)

Re: [Python-Dev] [Python-checkins] r60283 - in python/trunk: Include/longintrepr.h Include/longobject.h Include/unicodeobject.h Misc/NEWS Modules/_fileio.c Objects/longobject.c Objects/unicodeobject.c

2008-01-26 Thread Christian Heimes
tearray and the new buffer interface from 3.0 * write a replacement for 2.6 * replace the bytearray code with new code bytearray is a new type that has no equivalent in Python 2.6. Python 3.0's byte type is basically a modified string type. I don't see a problem with

Re: [Python-Dev] trunc()

2008-01-26 Thread Christian Heimes
Jeffrey Yasskin wrote: > This interpretation implies that complex should provide __float__() to > return the non-imaginary portion of a complex number. Is that what you > intend? No, please don't. If somebody wants to implement __float__ for complex numbers please define it as hypot(complex) / sqr

Re: [Python-Dev] trunc()

2008-01-27 Thread Christian Heimes
g wrong are common. ;) It's astonishing how many major rounding and division bugs are found by newbies. Christian ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pytho

<    3   4   5   6   7   8   9   10   11   12   >