Re: [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Christian Heimes
Guido van Rossum schrieb:
> I like this, except one issue: I really don't like the .local
> directory. I don't see any compelling reason why this needs to be
> ~/.local/lib/ -- IMO it should just be ~/lib/. There's no need to hide
> it from view, especially since the user is expected to manage this
> explicitly.

The directory name has been commented on by glyph in great length
(again). Thanks glyph! I'm all on his side. The base directory for
Python related files should be a dot directory in the root directory of
the users home dir. I slightly prefer ~/.local/ over other suggestions
but I'm also open to ~/.python.d/

Should I wait with the commit until we have agreed on a directory name
or do you want me to commit the code now?

> I might look at this later; but it seems to me to be a pure
> optimization and thus not required to be in before the first beta.

Correct, it's an optimization to enhance the memory utilization.

Christian
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Steve Holden

Guido van Rossum wrote:

I stand corrected on a few points. You've convinced me that ~/lib/ is
wrong. But I still don't like ~/.local/; not in the last place because
it's not any more local than any other dot files or directories. The
"symmetry" with /usr/local/ is pretty weak, and certainly won't help
beginning users.


So it's the *name* you don't like rather than the invisibility?


As a compromise, I'm okay with ~/Python/. I would like to be able to
say that the user explicitly has to set an environment variable in
order to benefit from this feature, just like with $PYTHONPATH and
$PYTHONSTARTUP. But that might defeat the point of making this easy to
use for noobs.

Groan. Then everyone else realizes what a "great idea" this is, and we 
see ~/Perl/, ~/Ruby/, ~/C# (that'll screw the Microsoft users, a 
directory with a comment market in its name), ~/Lisp/ and the rest? I 
don't think people would thank us for that in the long term.


I'm about +10 on invisibility, for the simple reason that "hiding the 
mechanism" is the right thing to do for naive users, who are the most 
likely to screw things up if given the chance and the most likely to be 
unaware of dot-name directories. If you don't like ~/.local/ then please 
consider ~/.private/ or ~/.personal/ or something else, but don't 
gratuitously add a visible subdirectory.



On OS X I think we should put this somewhere under ~/Library/. Just
put it in a different place than where the Python framework puts its
stuff.


Nothing to say about OS X.

One day Windows might start to respect the "hidden dot" convention, but 
perhaps in the interim we could create a (Windows-hidden) ~/.private/? 
Assuming we could work out where to put it ;-)



On Thu, May 1, 2008 at 8:25 PM,  <[EMAIL PROTECTED]> wrote:

[much good sense]

regards
 Steve
--
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Christian Heimes
Steve Holden schrieb:
> Nothing to say about OS X.
> 
> One day Windows might start to respect the "hidden dot" convention, but
> perhaps in the interim we could create a (Windows-hidden) ~/.private/?
> Assuming we could work out where to put it ;-)

Windows and Mac OS X have dedicated directories for application specific
libraries. That is ~/Library on Mac and Application Data on Windows. The
latter is i18n-ed and called "Anwendungsdaten" in German. Fortunately
Windows sets an environment var to the application data directory.

Christian
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Christian Heimes
Jeroen Ruigrok van der Werven schrieb:
> "Windows uses the Roaming folder for application specific data, such as
> custom dictionaries, which are machine independent and should roam with the
> user profile. The AppData\Roaming folder in Windows Vista is the same as the
> Documents and Settings\username\Application Data folder in Windows XP."
> 
> I think that's different from what you meant above though, since I doubt
> you'd want this (the libraries) to roam with the user.

In a matter of fact I *want* to roam the libraries. On the other hand
this might become an issue if a user roams between a 32bit and 64bit
system ...

___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Displaying strings containing unicode escapes

2008-05-02 Thread Nick Coghlan

Terry Reedy wrote:
I think standard Python should somehow have two options: escape everything 
but ASCII (for unambuguity and old display systems) and escape nothing that 
is potentially printable (leaving partially capable systems to fare as they 
will).  In-between solutions will ultimately be programmer and system 
specific.


If repr() is made to work as Martin suggests (i.e. only escape the 
unprintable stuff), then the unicode_escape codec can be used fairly 
easily to restore the 2.x escape everything non-ASCII behaviour.


Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
http://www.boredomandlaziness.org
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Nick Coghlan

Jeroen Ruigrok van der Werven wrote:

-On [20080502 10:50], Steve Holden ([EMAIL PROTECTED]) wrote:
Groan. Then everyone else realizes what a "great idea" this is, and we see 
~/Perl/, ~/Ruby/, ~/C# (that'll screw the Microsoft users, a directory with 
a comment market in its name), ~/Lisp/ and the rest? I don't think people 
would thank us for that in the long term.


I'm +1 on just using $HOME/.local, but otherwise $HOME/.python makes sense
too. $HOME/.python.d doesn't do it for me, too clunky (and hardly used if I
look at my .files in $HOME).

But I agree with Steve that it should be a hidden directory.


This sums up my opinion pretty well. Hidden by default, but easy to 
expose (e.g. via a local -> .local symlink) for the more experienced 
users that want it more easily accessible.


Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
http://www.boredomandlaziness.org
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Barry Warsaw

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On May 2, 2008, at 1:48 AM, [EMAIL PROTECTED] wrote:

etc, though.  In the long term, if everyone followed suit on  
~/.local, that would be great.  But I don't want a ~/Python, ~/Java,  
~/Ruby, ~/PHP, ~/Perl, ~/OCaml and ~/Erlang and a $PATH as long as  
my arm just so I can run a few applications without system- 
installing them.


I hate to send a "me too" messages, but I have to say Glyph is exactly  
right here.


- -Barry

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iQCVAwUBSBr75XEjvBPtnXfVAQIHAgP+JDpOymVEKfFvzZQZd8WtTpY6jsjvntAA
2J38LslMAXJSs3BcRBU/ELcbvTpr/JoEButktAQJCJpIhsmRTV0y3KcS/d/d+Sao
9V3ME2/yZ94qeQheB7jJIhfihNlC7VhG+CjSOMZrRZwm3k2drGGDdfdgGeSGZJOl
B6uCEB0i0iI=
=gup1
-END PGP SIGNATURE-
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


[Python-3000] warnings.showwarning (was Re: [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008)

2008-05-02 Thread Jean-Paul Calderone

On Thu, 1 May 2008 19:31:20 -0700, Brett Cannon <[EMAIL PROTECTED]> wrote:


[snip]

I just closed the release blocker I created (the
backwards-compatibility issue with warnings.showwarning() ). I would
like to add a PendingDeprecationWarning (or stronger) to 2.6 for
showwarning() implementations that don't support the optional 'line'
argument. I guess the best way to do it in C code would be to see if
PyFunction_GetDefaults() returns a tuple of length two (since
showwarning() already has a single optional argument as it is).


Hi Brett,

I'm still seeing some strange behavior from the warnings module,  This
can be observed on the community buildbot for Twisted, for example:

http://python.org/dev/buildbot/community/trunk/x86%20Ubuntu%20Hardy%20trunk/builds/171/step-Twisted.zope.stable/0

The log ends with basically all of the warning-related tests in Twisted
failing, reporting that no warnings happened.

There is also some strange behavior that can be easily observed in the REPL:

   [EMAIL PROTECTED]:~/Projects/python/trunk$ ./python 
/home/exarkun/Projects/Divmod/trunk/Combinator/combinator/xsite.py:7: DeprecationWarning: the sets module is deprecated

 from sets import Set
   Python 2.6a2+ (trunk:62636M, May  2 2008, 09:19:41) 
   [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2

   Type "help", "copyright", "credits" or "license" for more information.
   >>> import warnings
   >>> warnings.warn("foo")
   :1: UserWarning: foo   # Where'd the module name go?
   >>> def f(*a):
   ... print a
   ... 
   >>> warnings.showwarning = f

   >>> warnings.warn("foo")
   >>># Where'd the warning go?

Any ideas on this?

Jean-Paul
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] warnings.showwarning (was Re: Reminder: last alphas next Wednesday 07-May-2008)

2008-05-02 Thread Jean-Paul Calderone

On Fri, 2 May 2008 09:32:49 -0400, Jean-Paul Calderone <[EMAIL PROTECTED]> 
wrote:

On Thu, 1 May 2008 19:31:20 -0700, Brett Cannon <[EMAIL PROTECTED]> wrote:


[snip]

I just closed the release blocker I created (the
backwards-compatibility issue with warnings.showwarning() ). I would
like to add a PendingDeprecationWarning (or stronger) to 2.6 for
showwarning() implementations that don't support the optional 'line'
argument. I guess the best way to do it in C code would be to see if
PyFunction_GetDefaults() returns a tuple of length two (since
showwarning() already has a single optional argument as it is).


Hi Brett,

I'm still seeing some strange behavior from the warnings module,  This
can be observed on the community buildbot for Twisted, for example:

http://python.org/dev/buildbot/community/trunk/x86%20Ubuntu%20Hardy%20trunk/builds/171 
/step-Twisted.zope.stable/0


The log ends with basically all of the warning-related tests in Twisted
failing, reporting that no warnings happened.


Just to follow up on this part, the failures are due to the tests expecting
to be able to override a different function in the warnings module, not
showwarning (warn_explicit).  We used warn_explicit because there's no way
to clear way to disable the filtering that gets applied to showwarning.
warn_explicit doesn't claim to be a public hook, so I guess I won't complain
about this. :)

The below behavior still seems wrong to me, though.


There is also some strange behavior that can be easily observed in the REPL:

   [EMAIL PROTECTED]:~/Projects/python/trunk$ ./python 
/home/exarkun/Projects/Divmod/trunk/Combinator/combinator/xsite.py:7: 
DeprecationWarning: the sets module is deprecated

 from sets import Set
   Python 2.6a2+ (trunk:62636M, May  2 2008, 09:19:41)[GCC 4.1.3 
20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2

   Type "help", "copyright", "credits" or "license" for more information.
   >>> import warnings
   >>> warnings.warn("foo")
   :1: UserWarning: foo   # Where'd the module name go?
   >>> def f(*a):
   ... print a
   ...
   >>> warnings.showwarning = f
   >>> warnings.warn("foo")
   >>># Where'd the warning go?

Any ideas on this?

Jean-Paul

___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Guido van Rossum
I'm withdrawing my opposition in the light of the sheer number of
words that have already been written with this.

On Fri, May 2, 2008 at 1:30 AM, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Guido van Rossum schrieb:
>
> > I like this, except one issue: I really don't like the .local
>  > directory. I don't see any compelling reason why this needs to be
>  > ~/.local/lib/ -- IMO it should just be ~/lib/. There's no need to hide
>  > it from view, especially since the user is expected to manage this
>  > explicitly.
>
>  The directory name has been commented on by glyph in great length
>  (again). Thanks glyph! I'm all on his side. The base directory for
>  Python related files should be a dot directory in the root directory of
>  the users home dir. I slightly prefer ~/.local/ over other suggestions
>  but I'm also open to ~/.python.d/
>
>  Should I wait with the commit until we have agreed on a directory name
>  or do you want me to commit the code now?
>
>
>  > I might look at this later; but it seems to me to be a pure
>  > optimization and thus not required to be in before the first beta.
>
>  Correct, it's an optimization to enhance the memory utilization.
>
>  Christian
>



-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Nick Coghlan

Barry Warsaw wrote:
> Time is running short to get any new features into Python 2.6 and 3.0.
> The release after this one is scheduled to be the first beta release, at
> which time we will institute a feature freeze.  If your feature doesn't
> make it in by then, you'll have to wait until 2.7/3.1.  If there is
> something that absolutely must go into 2.6/3.0 be sure that there is a
> bug issue open for it and that the Priority is set to 'release
> blocker'.  I may reduce it to critical for the next alpha, but we'll
> review all the release blocker and critical issues for the first 2.6 and
> 3.0 beta releases.

I tried to bump http://bugs.python.org/issue643841 ("New class special 
method lookup change") up to release blocker, but the bug tracker still 
appears to be a bit flaky (it keeps giving me an error when I try to 
submit the change - unfortunately I can't submit anything about it to 
the metatracker, because I've forgotten my password for it and the 
metatracker is getting a connection refused when it tries to send the 
reminder email :P).


Here's the comment I was trying to submit along with the bug priority 
change:


"""Bumping the priority on this to release blocker for 3.0 - I think we 
need to have a good answer for the folks who've written old-style 
__getattr__ based auto-delegating classes before removing old-style 
classes entirely in 3.0.


We could get away with ignoring the issue in the past because people had 
the option of just using an old-style class rather than having to deal 
with the difficulties of doing this with a new-style class. With 3.0, 
that approach is being eliminated.


A ProxyMixin class written in Python would address that need (and 
shouldn't be particularly hard to write), but I'm not sure where it 
would go in the standard library."""


Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
http://www.boredomandlaziness.org
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Fred Drake

On May 1, 2008, at 7:54 PM, Barry Warsaw wrote:
Interesting.  I'm of the opposite opinion.  I really don't want  
Python dictating to me what my home directory should look like (a  
dot file doesn't count because so many tools conspire to hide it  
from me).  I guess there's always $PYTHONUSERBASE, but I think I  
will not be alone. ;)



Using ~/.local/ for user-managed content doesn't seem right to me at  
all, because it's hidden by default.


If user-local package installs went to ~/ by default (~/bin/ for  
scripts, ~/lib/python/ or ~/lib/pythonX.Y/ for modules and packages),  
with a way to set an alternate "prefix" instead of ~/ using a  
distutils configuration setting, I'd be happy enough.


I'd be even happier if there were no default per-user location, but a  
required configuration setting (in the existing distutils config  
locations) in order to enable per-user installation.



  -Fred

--
Fred Drake   




___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Bill Janssen
> I slightly prefer ~/.local/ over other suggestions
> but I'm also open to ~/.python.d/

Guido's point about it not being necessarily "local" is a good one.  I
use lots of computers; they all automount my home directory (~) from a
network file server.  Nothing under that directory should be
machine-specific.  My .login and .xinitrc scripts check the machine ID
and do different things on different machines.

Bill
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread Bill Janssen
> Windows and Mac OS X have dedicated directories for application specific
> libraries. That is ~/Library on Mac and Application Data on Windows.

In fact, I had to write code for this, and had to read the specs for each.
Here's the code (I've substituted Python for UpLib):

if sys.platform == 'darwin':
listdir = os.path.expanduser(os.path.join("~", "Library", "Application 
Support", "org.python"))
elif sys.platform == 'win32':
if os.environ.has_key('APPDATA'):
listdir = os.path.join(os.environ['APPDATA'], 'Python')
elif os.environ.has_key('USERPROFILE'):
listdir = os.path.join(os.environ['USERPROFILE'], 'Application Data', 
'Python')
elif os.environ.has_key('HOMEDIR') and os.environ.has_key('HOMEPATH'):
listdir = os.path.join(os.environ['HOMEDIR'], os.environ['HOMEPATH'], 
'Python')
else:
listdir = os.path.join(os.path.expanduser("~"), 'Python')
else:
# pretty much has to be unix
listdir = os.path.expanduser(os.path.join("~", ".python"))



___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


[Python-3000] Special offer! Ten code reviews

2008-05-02 Thread Guido van Rossum
I'd like to get some more people trying out codereview.appspot.com, so
I'm offering the first 10 people to submit a new patch there for my
review to do the review by Monday.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


[Python-3000] ~/.local [was: Reminder: last alphas next Wednesday 07-May-2008]

2008-05-02 Thread Stephen J. Turnbull
Bill Janssen replied to Christian Heimes as follows::

 > > I slightly prefer ~/.local/ over other suggestions
 > > but I'm also open to ~/.python.d/
 > 
 > Guido's point about it not being necessarily "local" is a good one.

Christian Heimes (I think) wrote:

> Windows and Mac OS X have dedicated directories for application specific
> libraries. That is ~/Library on Mac and Application Data on Windows.

You're both missing the point of what's wanted here, I suspect.  I
can't speak for others, but I do want "~/.local" and I agree with the
uses Glyph suggests for it.  I grant that "local" may not be a good
word for it in the context of a personal system in a corporate
environment, but here's how I think about it.

What it means (to me in the context of Unix-y system organization) is
"this is where I put stuff that I would be happy to have as part of
the system I was given (by some authority: my boss, Microsoft, or
Brett Cannon's stdlib PEP), but for some reason I'm not comfortable/
permitted to install it as system software."

It could physically reside on the moon (given a tachyon backbone
) and unlike Mac-ish ~/Library or "Application Data" on Windows
data *about me* or my use of the application *does not* go there.

___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] ~/.local [was: Reminder: last alphas next Wednesday 07-May-2008]

2008-05-02 Thread Bill Janssen
> What it means (to me in the context of Unix-y system organization) is
> "this is where I put stuff that I would be happy to have as part of
> the system I was given (by some authority: my boss, Microsoft, or
> Brett Cannon's stdlib PEP), but for some reason I'm not comfortable/
> permitted to install it as system software."

Yeah, I was just pointing out that for me, "~" ports across a number
of different machines, and putting stuff specific to any particular
machine in there needs more thought.  For UpLib, I generate machine
UUIDs from characteristics of the machine, using uuidgen, and store
compiled code and other machine specific things in a subdirectory with
that UUID.  Otherwise, we end up trying to execute PPC compiled shared
libraries on a SPARC platform, or Python 2.5 extensions with Python 2.3.

Bill
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Special offer! Ten code reviews

2008-05-02 Thread Antoine Pitrou
Guido van Rossum  python.org> writes:
> 
> I'd like to get some more people trying out codereview.appspot.com, so
> I'm offering the first 10 people to submit a new patch there for my
> review to do the review by Monday.

I just tried to submit a patch using the Web form, and got a 500 Server Error...


___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Invitation to try out open source code review tool

2008-05-02 Thread Benjamin Peterson
On Thu, May 1, 2008 at 11:41 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Some of you may have seen a video recorded in November 2006 where I
>  showed off Mondrian, a code review tool that I was developing for
>  Google (http://www.youtube.com/watch?v=sMql3Di4Kgc). I've always hoped
>  that I could release Mondrian as open source, but it was not to be:
>  due to its popularity inside Google, it became more and more tied to
>  proprietary Google infrastructure like Bigtable, and it remained
>  limited to Perforce, the commercial revision control system most used
>  at Google.

I was salivating over that video, so I'm really excited be able to try
out something like it now.

>  Don't hesitate to drop me a note with feedback -- note though that
>  there are a few known issues listed at the end of the Help page. The
>  Help page is really a wiki, so feel free to improve it!

My request at the moment is to let people use their real names for
display; my email address does not at all resemble my name.



-- 
Cheers,
Benjamin Peterson
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Special offer! Ten code reviews

2008-05-02 Thread Benjamin Peterson
On Fri, May 2, 2008 at 3:32 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote:
>  I just tried to submit a patch using the Web form, and got a 500 Server 
> Error...

It's been fixed.


-- 
Cheers,
Benjamin Peterson
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Invitation to try out open source code review tool

2008-05-02 Thread Guido van Rossum
On Fri, May 2, 2008 at 2:09 PM, Benjamin Peterson
<[EMAIL PROTECTED]> wrote:
> On Thu, May 1, 2008 at 11:41 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>  > Some of you may have seen a video recorded in November 2006 where I
>  >  showed off Mondrian, a code review tool that I was developing for
>  >  Google (http://www.youtube.com/watch?v=sMql3Di4Kgc). I've always hoped
>  >  that I could release Mondrian as open source, but it was not to be:
>  >  due to its popularity inside Google, it became more and more tied to
>  >  proprietary Google infrastructure like Bigtable, and it remained
>  >  limited to Perforce, the commercial revision control system most used
>  >  at Google.
>
>  I was salivating over that video, so I'm really excited be able to try
>  out something like it now.
>
>
>  >  Don't hesitate to drop me a note with feedback -- note though that
>  >  there are a few known issues listed at the end of the Help page. The
>  >  Help page is really a wiki, so feel free to improve it!
>
>  My request at the moment is to let people use their real names for
>  display; my email address does not at all resemble my name.

I've noticed. Surely there's an interesting story there. :-)

The feature request is on my TODO list. The design is a bit involved,
since I'd have to ask people to register and maintain a userid ->
nickname mapping; the Google Account API we're piggybacking on only
gives you the email address. Once it's open sourced (Monday?) I'd love
to see contributions like this!

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Invitation to try out open source code review tool

2008-05-02 Thread Benjamin Peterson
On Fri, May 2, 2008 at 4:25 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>  >  My request at the moment is to let people use their real names for
>  >  display; my email address does not at all resemble my name.
>
>  I've noticed. Surely there's an interesting story there. :-)

Maybe I tell you why next PyCon...

One more question: What's the number on the upper right hand corner by
my username?



-- 
Cheers,
Benjamin Peterson
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] warnings.showwarning (was Re: Reminder: last alphas next Wednesday 07-May-2008)

2008-05-02 Thread Brett Cannon
On Fri, May 2, 2008 at 6:47 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
[SNIP]
> > Hi Brett,
> >
> > I'm still seeing some strange behavior from the warnings module,  This
> > can be observed on the community buildbot for Twisted, for example:
> >
> >
> http://python.org/dev/buildbot/community/trunk/x86%20Ubuntu%20Hardy%20trunk/builds/171
> /step-Twisted.zope.stable/0
> >
> > The log ends with basically all of the warning-related tests in Twisted
> > failing, reporting that no warnings happened.
> >
>
>  Just to follow up on this part, the failures are due to the tests expecting
>  to be able to override a different function in the warnings module, not
>  showwarning (warn_explicit).  We used warn_explicit because there's no way
>  to clear way to disable the filtering that gets applied to showwarning.
>  warn_explicit doesn't claim to be a public hook, so I guess I won't
> complain
>  about this. :)
>

Yeah, you guys are being naughty by replacing that and expecting stuff
still to work. =)

>  The below behavior still seems wrong to me, though.
>
>
> > There is also some strange behavior that can be easily observed in the
> REPL:
> >
> >   [EMAIL PROTECTED]:~/Projects/python/trunk$ ./python
> /home/exarkun/Projects/Divmod/trunk/Combinator/combinator/xsite.py:7:
> DeprecationWarning: the sets module is deprecated
> > from sets import Set
> >   Python 2.6a2+ (trunk:62636M, May  2 2008, 09:19:41)[GCC 4.1.3
> 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
> >   Type "help", "copyright", "credits" or "license" for more information.
> >   >>> import warnings
> >   >>> warnings.warn("foo")
> >   :1: UserWarning: foo   # Where'd the module name go?
> >   >>> def f(*a):
> >   ... print a
> >   ...
> >   >>> warnings.showwarning = f
> >   >>> warnings.warn("foo")
> >   >>># Where'd the warning go?
> >
> > Any ideas on this?

If you run this in a stock 2.5 interpreter I get something similar
except the missing '__main__'. If I run it with PYTHONSTARTUP set it
actually uses that module for some reason as the source.

I created issue2743 to fix the output at the interpreter, but I made
it a critical bug since it is only at the interpreter (and thus
breaking people's code will be small), but it should still be fixed
since 'warnings' is a core piece of infrastructure.

-Brett

-Brett
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Invitation to try out open source code review tool

2008-05-02 Thread Guido van Rossum
On Fri, May 2, 2008 at 2:28 PM, Benjamin Peterson
<[EMAIL PROTECTED]> wrote:
>  One more question: What's the number on the upper right hand corner by
>  my username?

It's a debugging counter. It gets reset each time a new service
instance is created.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Displaying strings containing unicode escapes

2008-05-02 Thread Terry Reedy

"Nick Coghlan" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| Terry Reedy wrote:
| > I think standard Python should somehow have two options: escape 
everything
| > but ASCII (for unambuguity and old display systems) and escape nothing 
that
| > is potentially printable (leaving partially capable systems to fare as 
they
| > will).  In-between solutions will ultimately be programmer and system
| > specific.
|
| If repr() is made to work as Martin suggests (i.e. only escape the
| unprintable stuff), then the unicode_escape codec can be used fairly
| easily to restore the 2.x escape everything non-ASCII behaviour.

so print(s.encode('unicode_escape)) ?
Fine with me, especially if that or whatever is added to the repr() doc. 



___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] ~/.local [was: Reminder: last alphas next Wednesday 07-May-2008]

2008-05-02 Thread Stephen J. Turnbull
Bill Janssen writes:

 > Yeah, I was just pointing out that for me, "~" ports across a number
 > of different machines, and putting stuff specific to any particular
 > machine in there needs more thought.

Sure.  But AIUI that's not the problem that "~/.local" is intended to
solve.  Also, it's a generic problem of networked environments, not in
any way limited to "~", which should be susceptible to the usual
solutions for multiarchitecture installations (eg subdirectories named
by GNU's CPU-OS-VENDOR convention, or your UUID convention).  In
particular, "pure Python" programs shouldn't much care, right?
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] ~/.local [was: Reminder: last alphas next Wednesday 07-May-2008]

2008-05-02 Thread Bill Janssen
> In particular, "pure Python" programs shouldn't much care, right?

With the addition of ctypes, "pure" Python programs aren't so pure
anymore.  But even that should work across architectures, right?

> Also, it's a generic problem of networked environments, not in
> any way limited to "~", which should be susceptible to the usual
> solutions for multiarchitecture installations (eg subdirectories named
> by GNU's CPU-OS-VENDOR convention, or your UUID convention).

Yep.  I'm just pointing out that networked environments are becoming
more common, not less common.

Bill
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] [Python-Dev] Reminder: last alphas next Wednesday 07-May-2008

2008-05-02 Thread skip

Fred> If user-local package installs went to ~/ by default ... with a
Fred> way to set an alternate "prefix" instead of ~/ using a distutils
Fred> configuration setting, I'd be happy enough.

+1 from me.

Skip
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


Re: [Python-3000] Displaying strings containing unicode escapes

2008-05-02 Thread Atsuo Ishimoto
On Sat, May 3, 2008 at 7:33 AM, Terry Reedy <[EMAIL PROTECTED]> wrote:
>  so print(s.encode('unicode_escape)) ?
>  Fine with me, especially if that or whatever is added to the repr() doc.
>

I don't recommend repr(obj).encode('unicode_escape'), because
backslash characters in the string will be escaped again by the codec.

>>> print(repr("\\"))
'\\'
>>> print(str(repr("\\").encode("unicode-escape"), "ASCII"))
''

'ASCII' codec with 'backslashreplace' error handler works better.

>>> print(str(repr("\\").encode("ASCII", "backslashreplace"), "ASCII"))
'\\'

Looks complicated to get same result as Python 2.x. I originally
proposed to allow print(repr('\\'), encoding="ASCII",
errors="backslashreplace") to get same result, but this is hard to
implement.

If requirement for ASCII-repr is popular enough, we can provide a
built-in function like this:

def repr_ascii(obj):
return str(repr(obj).encode("ASCII", "backslashreplace"), "ASCII")

2to3 can use repr_ascii() for better compatibility.

Is new built-in function desirable, or just document is good enough?
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com


[Python-3000] PEP 8 Style Guide and Python 3

2008-05-02 Thread Terry Reedy
At least one of the style recommendations in PEP 8 -- use class rather that 
string exceptions -- is obsolete in Py 3.  And there are others, and 
perhaps others where the spirit of the recommendation is the same but 
details are different.

For a new Python 3 programmer who does not need or want to know anything 
about Python 2, reading about 'string exceptions' would be confusing.

One possibility for isolation is for each major section to have separate 
2.x and 3.x subsections.  But where there are several scattered changes, 
this would require large chunks of duplication.  For instance, under

Prescriptive: Naming Conventions
 Package and Module Names
  Modules should have...

becomes Modules must have ... (I presume, hence the renaming project).
But all three paragraphs would have to be duplicated in 2.x and 3.x to be 
coherent, and then they would not be in their sensible place.

A couple of paragraphs on, 'because exceptions should be classes' becomes 
'because exceptions are classes'.  Again, moving two variants to 2.x and 
3.x sections would be awkward.

So, especially if PEP 8 is considered more or less frozen, I suggest the 
possibility of a new PEP 3008, Python 3 style guide.

Terry Jan Reedy



___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com