[Python-Dev] EuroPython: Early Bird will end in 2 days!

2011-05-11 Thread Palla
Hi all,

If you plan to attend, you could save quite a bit on registration fees!

The end of Early bird is on May 12th, Friday, 23:59:59 CEST. We'd like
to ask to you to forward this post to anyone that you feel may be
interested.

We have an amazing lineup of tutorials, events and talks. We have some
excellent keynote speakers and a very complete partner program... but
early bird registration ends in 2 days!

Right now, you still get discounts on talks and tutorials so if you
plan to attend Register Now:

http://ep2011.europython.eu/registration/

While you are booking, remember to have a look at the partner program
and our offer for a prepaid, data+voice+tethering SIM.

We'd like to ask to you to forward this post to anyone that you feel
may be interested.

All the best,


-- 
-PALLA
___
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] Commit changelog: issue number and merges

2011-05-11 Thread Éric Araujo

Le 09/05/2011 19:54, R. David Murray a écrit :

No it isn't.  The commit message isn't pulled into the new branch.

 Sorry, your terminology does not make sense.  If you mean that the
 commit message is not reused in the new commit after the merge, 
it’s

 true.  However, the commit message with the relevant information is
 available as part of the changesets that have been pulled and 
merged.


The changesets are in the repository and there are pointers to them
from the merge changeset, sure, but the data isn't in the checkout
(that's how I understood pulled in to the new branch).


No commit message is ever in the checkout, so I don’t follow you.

If I do 'hg log' and search for a revno (that I got from hg 
annotate),
the commit message describing the change is not attached to that 
revno,


Ah, I understand your problem now.  I would not object to a policy 
requiring to put helpful information in merge changesets commit 
messages, like “Merge fixes for # and #” or “Merge doc fixes” 
when there are no bug reports.


I’m not sure about the “atomic” merge changesets idea that someone else 
expressed; I don’t think it would be that useful.


nor as far as I know is there a tool that makes it easy to get from 
that
revno to the explanatory commit message.  That's what Victor and I 
are

talking about.  Is there a tool that fixes this problem?


I tend to use graphical tools for history viewing.  I like the GTK
version of TortoiseHg, or failing that the graph displayed by “hg 
serve”

if you enable the graphlog extension and use a browser with JavaScript.
___
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] Problems with regrtest and with logging

2011-05-11 Thread Éric Araujo

Hi,

That's right, though it's OK to provide a documented convenience API 
for adding

handlers.


I think I’ll aim for simplicity.  We’ll document that we use the logger 
“packaging” throughout and let people use getLogger and  addHandler with 
that.


You don't necessarily need to set the level on the handler - why can 
you not
just set it on the logger? The effect would often be the same: the 
logger's

level is checked first, and then the handler's level.


I thought that if we set the level on the logger, we would prevent 
third-party code to get some messages.  E.g., we set level to INFO but 
pip uses some packaging functions and would like to get DEBUG messages.


Regards
___
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] Commit messages: please avoid temporal ambiguity

2011-05-11 Thread Éric Araujo

Le 10/05/2011 16:46, R. David Murray a écrit :
On Tue, 10 May 2011 17:45:44 +0400, Oleg Broytman p...@phdru.name 
wrote:
   Why fixed is in the past tense, but improve, and change are 
in

present tense?
   I use past tense to describe what I did on the code, and present
simple to describe what the new code does when running. For example:


Funny, I always use the present tense, to convey what the code does 
now.

___
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-checkins] cpython (2.7): (Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional

2011-05-11 Thread Éric Araujo

Le 10/05/2011 01:52, victor.stinner a écrit :

http://hg.python.org/cpython/rev/3c87a13980be
changeset:   70001:3c87a13980be
branch:  2.7
parent:  69996:c9f07c69b138
user:Victor Stinner victor.stin...@haypocalc.com
date:Tue May 10 01:52:03 2011 +0200
summary:
  (Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional


“(Merge 3.1)” is inaccurate for 2.7.

Regards
___
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] Commit messages: please avoid temporal ambiguity

2011-05-11 Thread Terry Reedy

On 5/11/2011 12:39 PM, Éric Araujo wrote:


Funny, I always use the present tense, to convey what the code does now.


Which code ;-).

At the moment you write a push message, your private clone does 
something different from the public repository (and other private 
clones). At the moment people read a push message, they may not have 
pulled the change, so that there is a difference between the repository 
and *their* clone. Besides the ambiguity, there is also inconsistency 
between writers. Hence my request for a few clarifying keystrokes when 
needed.


--
Terry Jan Reedy


___
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-checkins] cpython (2.7): (Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional

2011-05-11 Thread Victor Stinner
Le mercredi 11 mai 2011 à 19:05 +0200, Éric Araujo a écrit :
 Le 10/05/2011 01:52, victor.stinner a écrit :
  http://hg.python.org/cpython/rev/3c87a13980be
  changeset:   70001:3c87a13980be
  branch:  2.7
  parent:  69996:c9f07c69b138
  user:Victor Stinner victor.stin...@haypocalc.com
  date:Tue May 10 01:52:03 2011 +0200
  summary:
(Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional
 
  “(Merge 3.1)” is inaccurate for 2.7.

Ah, why? I did not use hg merge command (but hg export|hg import), but
it's a merge between two branches. Which term would you use?

Victor

___
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] Commit messages: please avoid temporal ambiguity

2011-05-11 Thread Guido van Rossum
On Wed, May 11, 2011 at 9:39 AM, Éric Araujo mer...@netwok.org wrote:
 Funny, I always use the present tense, to convey what the code does now.

Yeah, and that's exactly what I am objecting to. Please describe what
changed how, since that is the focus of the patch.

-- 
--Guido van Rossum (python.org/~guido)
___
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] Problems with regrtest and with logging

2011-05-11 Thread Vinay Sajip
Éric Araujo merwok at netwok.org writes:

  I thought that if we set the level on the logger, we would prevent 
  third-party code to get some messages.  E.g., we set level to INFO but 
  pip uses some packaging functions and would like to get DEBUG messages.

Then pip can set the level of the packaging logger as it wishes, perhaps in
response to command-line arguments for verbosity. It'd be easier for pip to do
that, regardless of which handlers are attached. And pip itself might be being
used, say by virtualenv. It's hard in general to say what the top-level code
will be, and generally that's the code which should set the handlers.

The levels set by a library for its loggers are merely defaults. Applications
using the library can choose to override those levels as they wish.

Regards,

Vinay Sajip



___
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-checkins] cpython (2.7): (Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional

2011-05-11 Thread Terry Reedy

On 5/11/2011 2:08 PM, Victor Stinner wrote:

Le mercredi 11 mai 2011 à 19:05 +0200, Éric Araujo a écrit :

Le 10/05/2011 01:52, victor.stinner a écrit :

http://hg.python.org/cpython/rev/3c87a13980be
changeset:   70001:3c87a13980be
branch:  2.7
parent:  69996:c9f07c69b138
user:Victor Stinnervictor.stin...@haypocalc.com
date:Tue May 10 01:52:03 2011 +0200
summary:
   (Merge 3.1) Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional


  “(Merge 3.1)” is inaccurate for 2.7.


Ah, why? I did not use hg merge command (but hg export|hg import), but
it's a merge between two branches. Which term would you use?


export/import sounds like transport: (transport from 3.1) would be 
clear enough to me.


--
Terry Jan Reedy


___
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] py3k buffered I/O - flush() required between read/write?

2011-05-11 Thread Genstein

Hi all,

Sincere apologies for posting a question without lurking for a while 
first. I'm not sure whether I'm being dumb (which is very plausible) or 
whether this is a potential bug. I asked on comp.lang.python but 
responses were equivocal, so I'm following the README.txt advice and 
asking here. If I'm out of line, do feel free to slap me down viciously, 
remove me from the list, or whatever seems most appropriate.


Under py3k, is it necessary to flush() a file between buffered 
read/write calls in order to see consistent results? I have a case under 
Python 3.2 (r32:88445) where I see different results depending on 
whether buffering is active, on Gentoo Linux and Windows Vista. Perusing 
the docs and PEPs I couldn't seem to find an answer; I did find 
bufferedio.c's comment: BufferedReader, BufferedWriter and 
BufferedRandom...share a single buffer...this enables interleaved reads 
and writes without flushing which is suggestive but I may be taking it 
out of context.


The following is the smallest code I can conjure which demonstrates the 
issue I'm seeing:


[code]
START = 0
MID = 1
LENGTH = 4

def test(buffering):
f = open(test.bin, w+b, buffering = buffering)
for i in range(LENGTH):
f.write(b'\x00')
f.seek(MID)
f.read(1)
f.write(b'\x00')
f.seek(MID)
f.write(b'\x01')
f.seek(START)
f.seek(MID)
print(f.read(1))
f.close()

print(Buffered result: )
test(-1)
print(Unbuffered result:)
test(0)
[end code]

Output on both Gentoo and Vista is:
Buffered result:
b'\x00'
Unbuffered result:
b'\x01'

I expected the results to be the same, but they aren't. The issue is 
reproducible with larger files provided that the constants are increased 
~proportionally (START 0, MID 500, LENGTH 1000 for example). Transposing 
the buffered/unbuffered tests and/or using different buffer sizes for 
the buffered test seem have no effect.


Apologies once more if I'm wasting your time.

All the best,

-eg.


PS. By way of entirely belated introduction, I'm a UK software developer 
with a background mostly in C#, C++ and Lua in both real software and 
commercial games. In my spare time I mostly write code (curiously I 
don't know many developers who do; I suspect I just know the wrong 
people.) I perpetrated the Trizbort mapper for interactive fiction which 
doubtless nobody will have heard of, and with good reason. I'm toying 
with Python as a genuinely portable alternative to C# for my own 
projects, and so far loving it.


___
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