[issue19135] Check out my profile on LinkedIn

2013-10-01 Thread Andre M. Descombes

New submission from Andre M. Descombes:

LinkedIn


I'd like to include you in my network to share updates and stay in touch.

- Andre

Andre Descombes
DQM at Coheris
Paris Area, France

Confirm that you know Andre Descombes:
https://www.linkedin.com/e/-3qcne3-hm8s7jcj-8/isd/16969775744/B54_m0Jy/?hs=falsetok=0vJyT35US96RY1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-3qcne3-hm8s7jcj-8/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I5638997180_1/?hs=falsetok=2uJc6djm696RY1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

--
messages: 198751
nosy: amdescombes
priority: normal
severity: normal
status: open
title: Check out my profile on LinkedIn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19135
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19136] CSV, builtin open(), newline arg. Docs broken again.

2013-10-01 Thread Graham Wideman

New submission from Graham Wideman:

The docs appear to be incorrect for CSV at: 
http://docs.python.org/3.3/library/csv.html.

Per issue http://bugs.python.org/issue7198 , there's a long history of 
contention between os.open and csv.writer, in which, on Windows, the default 
result is an unwanted additional '\r'. That was 'fixed' by using the newline='' 
argument to open(). 

This is reflected in the docs at the above link:

with open('eggs.csv', 'w', newline='') as csvfile:
spamwriter = csv.writer(csvfile, delimiter=...)

However, in python 3.3.2 use of the newline argument returns: TypeError: 
'newline' is an invalid keyword argument for this function.

In brief testing, it appears that a correct result can be obtain by calling 
open as follows:

with open(somepath, 'wb') as writerfile: 
writer = csv.writer(writerfile, delimiter=...)

Note: binary mode, not text as previously needed and currently documented.

--
assignee: docs@python
components: Documentation
messages: 198752
nosy: docs@python, gwideman
priority: normal
severity: normal
status: open
title: CSV, builtin open(), newline arg. Docs broken again.
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19136
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19135] Spam

2013-10-01 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy:  -amdescombes
resolution:  - invalid
stage:  - committed/rejected
status: open - closed
title: Check out my profile on LinkedIn - Spam

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19135
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19135] Spam

2013-10-01 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
Removed message: http://bugs.python.org/msg198751

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19135
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18594] C accelerator for collections.Counter is slow

2013-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6aef095fdb30 by Raymond Hettinger in branch '3.3':
Issue #18594: Fix the fast path for collections.Counter().
http://hg.python.org/cpython/rev/6aef095fdb30

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19099] struct.pack fails first time with unicode fmt

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

struct.Struct() should be changed instead of struct.pack(). Here is a patch.

--
stage:  - patch review
type: behavior - enhancement
Added file: http://bugs.python.org/file31931/struct_unicode_fmt.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19099
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-10-01 Thread Stefan Behnel

Stefan Behnel added the comment:

Antoine, I really don't like this attitude of adding code and then saying 
well, it's there, I won't change it when others complain about breakage. 
Please undo your change that broke the ability of using (non-trivial) wrapper 
scripts for the Python runtimes. If you think that that change provides an 
important feature, then please implement that feature in a way that does not 
break existing usages of the benchmark runner.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19108
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18594] C accelerator for collections.Counter is slow

2013-10-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Attaching a patch for the slow path.  Makes the code exactly match the pure 
python version.  This kicks in whether someone has subclassed Counter and 
overridden either __getitem__ or __setitem__.

--
Added file: http://bugs.python.org/file31932/fix_counter2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18594] C accelerator for collections.Counter is slow

2013-10-01 Thread Stefan Behnel

Stefan Behnel added the comment:

Can you update the benchmark numbers to show what the difference is compared to 
pure Python (and to the fastpath) now?

One more thing: the fastpath depends on .__getitem__() and friends, whereas the 
fallback path depends on .get(). What if someone overrides .get() but not 
.__getitem__()?  (Might be a hypothetical case...)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19099] struct.pack fails first time with unicode fmt

2013-10-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Serhiy, you don't want to clear the cache in the test to simulate the bug?

struct._clearcache()

Other than that, should we raise struct.error instead of ValueError? Right now, 
the current behaviour in python 2.7 is:

 struct.pack('\x80', 3)
Traceback (most recent call last):
  File stdin, line 1, in module
struct.error: bad char in struct format

But you are right. Struct() should have been changed instead of struct.pack.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19099
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19099] struct.pack fails first time with unicode fmt

2013-10-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Nevermind about my comment about clearing cache. It only happens if we use 
struct.pack not struct.Struct.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19099
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Antoine, I really don't like this attitude of adding code and then
 saying well, it's there, I won't change it when others complain
 about breakage.

Well, I don't care whether you like this attitude. Your own
attitude has irked several developers enough that they're more or
less ignoring you. That includes me. If you're not willing to
be respectful and constructive, the situation won't improve.

As for the present issue, the benchmark suite is meant to work
with an actual Python interpreter. Not a wrapper script that
can pretend to be one for a single invocation mode.

If you think otherwise, you can of course provide evidence, and
a patch to fix things.
(and hope for someone to apply the patch)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19108
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Brett, I'm leaving you with this, if you're wanting to do anything about it :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19108
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-10-01 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy:  -pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19108
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-10-01 Thread Stefan Behnel

Stefan Behnel added the comment:

 I'm leaving you with this, if you're wanting to do anything about it

Sorry, but weren't you just asking *me* to be constructive?

I'm aware that getting this change right isn't trivial. But that doesn't mean 
we should happily break other people's code and then leave the cleanup to them. 
This isn't a green-field project, the code is actually being used by other 
projects than CPython. In fact, the whole purpose of this code is to be used by 
other projects as well. That means that there may be some additional 
restrictions on what we should expect from a benchmarked runtime. Previously, 
the requirements were can run a Python script from the command line. Now, the 
additional requirements are accepts the -c switch and can execute a line of 
Python code passed on the command line. That is substantially harder to handle 
in a script.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19108
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18040] SIGINT catching regression on windows in 2.7

2013-10-01 Thread Gabi Davar

Changes by Gabi Davar grizzly@gmail.com:


--
nosy: +Gabi.Davar

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18040
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12641] Remove -mno-cygwin from distutils

2013-10-01 Thread Oscar Benjamin

Oscar Benjamin added the comment:

Thanks Antoine!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-10-01 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Wouldn't it be possible to use the old version as fallback solution
in case the -c switch approach fails or have a command line option
to pass in the version in order to bypass all of this ?

Stefan: Why don't you propose a patch which implements this ?

--
nosy: +lemburg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19108
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-01 Thread STINNER Victor

STINNER Victor added the comment:

The issue #16742 must be fixed to be able to trace memory blocks allocated by 
PyMem_RawMalloc().

--
dependencies: +PyOS_Readline drops GIL and calls PyOS_StdioReadline, which 
isn't thread safe

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18874
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18948] deliberately crashing tests should prevent core dumps

2013-10-01 Thread STINNER Victor

STINNER Victor added the comment:

 Perhaps it would be best to either combine SuppressCoreFiles
 and suppress_crash_popup

Yes, these two tools must be merged into one unique portable tool. Example of 
names:

 * ignore_fatal_errors()
 * dont_report_crashes()
 * ignore_crashes()

Doc: On Windows, don't display the Windows Error Reporting dialog. On UNIX, 
disable the creation of coredump file.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18948
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-01 Thread STINNER Victor

STINNER Victor added the comment:

For the development, it would also be nice to fix #18948.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18874
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18948] deliberately crashing tests should prevent core dumps

2013-10-01 Thread STINNER Victor

STINNER Victor added the comment:

test.support.SuppressCoreFiles was added by #18623.

I implemented a similar tool in my tracemalloc fork:
http://hg.python.org/features/tracemalloc/rev/b91450e51388

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18948
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19099] struct.pack fails first time with unicode fmt

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Other than that, should we raise struct.error instead of ValueError?

Python 3 raises UnicodeEncodeError. And Python 2 raises UnicodeEncodeError when 
coerce non-ASCII unicode to str.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19099
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15964] SyntaxError in asdl when building 2.7 with system Python 3

2013-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 56ed149e597a by Eli Bendersky in branch 'default':
Mention 'make touch' in the devguide.
http://hg.python.org/devguide/rev/56ed149e597a

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15964
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 56ed149e597a by Eli Bendersky in branch 'default':
Mention 'make touch' in the devguide.
http://hg.python.org/devguide/rev/56ed149e597a

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-10-01 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
assignee:  - ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19092
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15964] SyntaxError in asdl when building 2.7 with system Python 3

2013-10-01 Thread Eli Bendersky

Eli Bendersky added the comment:

`make touch` was added to the bots in #19106 and is now also recommended in the 
devguide for folks running into this problem. IMHO this is all we need here, 
because there's no point toiling to make the auto-generation scripts in every 
version to work with any other version of Python. It's error prone and keeps us 
back (there's no reason not to use modern Python practices in the ASDL 
generator of 3.4, say, and instead cling to Python 2.4).

So I'm going to close this issue in a few days unless new feedback emerges.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15964
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Eli Bendersky

Eli Bendersky added the comment:

I've updated the devguide about `make touch`.

As for the buildbot configuration, I agree we shouldn't document a static 
snapshot and also there's the passwords problem.

I was talking to Antoine about this the other day, and maybe there's sense to 
create an infrastructure section in the devguide that will explain how to log 
into the buildbot server and look at the configuration. This should be enough 
for folks who really need to figure it out and is also safe w.r.t. getting out 
of date and exposing passwords.

Also, IMHO #15964 can be closed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2013-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 423736775f6b by Nick Coghlan in branch '3.3':
Close #19092: ExitStack now reraises exceptions from __exit__
http://hg.python.org/cpython/rev/423736775f6b

New changeset 451f5f6151f5 by Nick Coghlan in branch 'default':
Merge #19092 from 3.3
http://hg.python.org/cpython/rev/451f5f6151f5

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19092
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I was talking to Antoine about this the other day, and maybe there's
 sense to create an infrastructure section in the devguide that
 will explain how to log into the buildbot server and look at the
 configuration.

IMHO it would make more sense to create a separate infrastructure
guide. There's no need to bloat the devguide with such information,
which could quickly become quite complicated.

--
title: Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots - Prepare 
.hgtouch and Tools/hg/hgtouch.py to run on thebots

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16040] nntplib: unlimited readline() from connection

2013-10-01 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

 New changeset 731abf7834c4 by Barry Warsaw in branch '2.6':
 - Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to
 http://hg.python.org/cpython/rev/731abf7834c4
 
 New changeset 36680a7c0e22 by Barry Warsaw in branch '2.7':
 - Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to
 http://hg.python.org/cpython/rev/36680a7c0e22

s/lenght/length/ in new comment in Lib/nntplib.py

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16040
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19136] CSV, builtin open(), newline arg. Docs broken again.

2013-10-01 Thread R. David Murray

R. David Murray added the comment:

You must have a different 'open' in your namespace when you execute that.  
Dropping a keyword argument like that is something we would never do without a 
deprecation period.

Your example works fine for me.

--
nosy: +r.david.murray
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19136
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Eli Bendersky

Eli Bendersky added the comment:

I'm not sure a separate document is right here because that's one more 
repository to have. The devguide already contains sections for somewhat more 
esoteric things like compiler internals guide, coverity scans. Besides, section 
18 already has some material about the buildbots.

But I don't feel strongly enough about this to argue :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-10-01 Thread Nick Coghlan

Nick Coghlan added the comment:

The committed patched was based directly on Katie's last version, without my 
enum changes.

Raymond - feel free to tweak the wording on the docs notes or the explanatory 
comment if you see anything that could be improved.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad9f207645ab by Nick Coghlan in branch 'default':
Close #10042: functools.total_ordering now handles NotImplemented
http://hg.python.org/cpython/rev/ad9f207645ab

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I'm not sure a separate document is right here because that's one
 more repository to have. The devguide already contains sections for
 somewhat more esoteric things like compiler internals guide,
 coverity scans. Besides, section 18 already has some material about
 the buildbots.

Well, ideally the more esoteric things wouldn't really be there.
Perhaps other people have different opinions?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Eli Bendersky

Eli Bendersky added the comment:

On Tue, Oct 1, 2013 at 7:00 AM, Antoine Pitrou rep...@bugs.python.orgwrote:


 Antoine Pitrou added the comment:

  I'm not sure a separate document is right here because that's one
  more repository to have. The devguide already contains sections for
  somewhat more esoteric things like compiler internals guide,
  coverity scans. Besides, section 18 already has some material about
  the buildbots.

 Well, ideally the more esoteric things wouldn't really be there.


I still see the current situation better than the previous one, where this
was scattered around PEPs, Wikis and just random web pages. Having it all
in the same repository is not ideal from a taxonomical point of view,
perhaps, but as a single collection of everything related to the
development *of* Python it's not too bad since keeping it in a single
place makes it easier to maintain and review; mostly, there's a somewhat
smaller chance that things will be forgotten and rot.

To put it differently, maintaining the devguide is kind-of a chore for devs
as it is; splitting it into multiple topical repositories will just make
the burden higher so we'll end up not maintaining it at all :)

 Perhaps other people have different opinions?


--
title: Prepare .hgtouch and Tools/hg/hgtouch.py to run on the   bots - Prepare 
.hgtouch and Tools/hg/hgtouch.py to run on the bots

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19094] urljoin should raise a TypeError if URL is not a string

2013-10-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Okay, attached the patch based on your comment, Senthil Kumaran. Thanks.

The reason I use isinstance to check the type is because I want to support the 
inheritance as much as possible.

 class new_str(str):
...   pass
 urljoin(new_str('http://python.org') + new_str('hehe'))
will not work with the newest patch.

Also, in Lib/urllib/parse.py, most of the time, we use isinstance(x, str) not 
type(x) == str.

But I don't know. Maybe it does not matter.

--
Added file: http://bugs.python.org/file31933/urljoin_throws_type_error_v3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19094
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Eli Bendersky

Eli Bendersky added the comment:

+nick,guido,benjamin: in case you're interested in the discussion that takes 
place in the most recent messages of this issue

--
nosy: +benjamin.peterson, gvanrossum, ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Documenting the pydotorg setup is a field of ongoing discussions. If you ask 
three people involved, you get three answers where this should be documented, 
with no chance for consensus.

From an infrastructure point of view, it is up to the infrastructure head 
(i.e. Noah Kantrowitz) to rule on where this should be documented. I can see 
the python-dev view, to, although the documentation might be as short as ask 
Noah.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Where to document the infrastructure setup (including the buildbots) is up to 
Noah/infrastructure-sig, as the devguide just covers CPython development, while 
the PSF infrastructure team covers a lot more than that.

A pointer from the devguide docs to the appropriate infrastructure docs would 
make sense, but it isn't the right home for the docs themselves.

The interim solution I use is ask on python-dev or ask on python-committers 
:)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I still see the current situation better than the previous one, where
 this
 was scattered around PEPs, Wikis and just random web pages. Having it
 all
 in the same repository is not ideal from a taxonomical point of view,
 perhaps, but as a single collection of everything related to the
 development *of* Python it's not too bad since keeping it in a
 single
 place makes it easier to maintain and review;

Well, precisely, it's putting everything in a single collection that
I find bad, because it could become dreadful for beginner contributors.

The devguide is primarily meant to ensure contributors don't get lost,
even though it can serve as a reminder for core developers too.

--
title: Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots - Prepare 
.hgtouch and Tools/hg/hgtouch.py to run on thebots

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19137] pprint wrongly format set and frozenset subclasses

2013-10-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Example:

 import pprint
 class S(set): pass
... 
 S('abc')
S({'a', 'b', 'c'})
 pprint.pprint(S('abc'))
S({'a', 'b', 'c'})
 pprint.pprint(S('abc'), width=1)
{'a',
 'b',
 'c'}

And same for frozenset.

Here is a patch which fixes this issue. With a patch:

 pprint.pprint(S('abc'), width=1)
S({'a',
   'b',
   'c'})

--
files: pprint_set_subclass.patch
keywords: patch
messages: 198788
nosy: fdrake, pitrou, rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: pprint wrongly format set and frozenset subclasses
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31934/pprint_set_subclass.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19137
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19132] Add compact mode to pprint

2013-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 As noted in the review, I'm not as keen on having dictionaries displayed
 in compact form.

Agreed with David.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19132
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19132] Add compact mode to pprint

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch doesn't compactify dicts.

--
Added file: http://bugs.python.org/file31935/pprint_compact_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19132
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19137] pprint wrongly formats set and frozenset subclasses

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
title: pprint wrongly format set and frozenset subclasses - pprint wrongly 
formats set and frozenset subclasses

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19137
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue16040] nntplib: unlimited readline() from connection

2013-10-01 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Oct 01, 2013, at 01:44 PM, Arfrever Frehtes Taifersar Arahesis wrote:

s/lenght/length/ in new comment in Lib/nntplib.py

Fixed, thanks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16040
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19138] doctest.IGNORE_EXCEPTION_DETAIL doesn't match when no detail exists

2013-10-01 Thread John Murphy

New submission from John Murphy:

The doctest.IGNORE_EXCEPTION_DETAIL optionflag does not seem to have the
desired behavior when the exception does not provide a message, due to the
regular expressions in doctest.DocTestRunner.__run expecting a colon in the
second group::

elif self.optionflags  IGNORE_EXCEPTION_DETAIL:
m1 = re.match(r'(?:[^:]*\.)?([^:]*:)', example.exc_msg)
m2 = re.match(r'(?:[^:]*\.)?([^:]*:)', exc_msg)
if m1 and m2 and check(m1.group(1), m2.group(1),
   self.optionflags):
outcome = SUCCESS

Normally this wouldn't matter, as there's no need to ignore the exception
detail if there is no detail to normalize, but since
http://bugs.python.org/issue7490 it looks like the blessed method of
normalizing Python 2 and 3 exceptions in doctests is to use
IGNORE_EXCEPTION_DETAIL.  This doesn't work for any exceptions which do
not have a message.

Example::

 def f(x):
... r'''
...  from http.client import HTTPException
...  raise HTTPException() #doctest: +IGNORE_EXCEPTION_DETAIL
... Traceback (most recent call last):
... foo.bar.HTTPException
... '''
 test = doctest.DocTestFinder().find(f)[0]
 doctest.DocTestRunner(verbose=True).run(test)
Failed example:
raise HTTPException() #doctest: +IGNORE_EXCEPTION_DETAIL
Expected:
Traceback (most recent call last):
foo.bar.HTTPException
Got:
Traceback (most recent call last):
...
http.client.HTTPException

I've attached a test and a very naive fix of the regular expression.

--
components: Tests
files: exception_normalize.patch
keywords: patch
messages: 198792
nosy: jamur2
priority: normal
severity: normal
status: open
title: doctest.IGNORE_EXCEPTION_DETAIL doesn't match when no detail exists
type: behavior
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file31936/exception_normalize.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19138
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7434] general pprint rewrite

2013-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7434
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19137] pprint wrongly formats set and frozenset subclasses

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added an additional test to check the output layout for set/frozenset 
subclasses as Antoine suggested.

--
Added file: http://bugs.python.org/file31937/pprint_set_subclass_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19137
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18092] Python 2.7.5 installation broken on OpenSuse 12.2

2013-10-01 Thread Tom Gross

Tom Gross added the comment:

I guess you are on a 64bit os an the issue is a variant of issue1294959. Some 
of the components (scripts) are installed in the $PREFIX/lib folder and some 
are (libs) installed in the $PREFIX/lib64 folder. a workaround which worked for 
me (on OpenSuse 12.3 which faced the same issue) is specifying a lib directory 
on configure like this:

 ./configure --prefix=/opt/Python275 --libdir=/opt/Python275/lib

All components (scripts  libs) are in the $PREFIX/lib folder then.

--
nosy: +Tom.Gross

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18092
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19139] In venv, __VENV_NAME__ is the prompt, not the name

2013-10-01 Thread Paul Moore

New submission from Paul Moore:

The documentation for venv states that __VENV_NAME__ in scripts is replaced by 
the name of the virtualenv. In fact, it is replaced by context.prompt, which is 
the prompt, rather than the name.

The various activate scripts are not consistent with this behaviour. Most seem 
to expect a prompt, but activate.csh does not.

I would prefer __VENV_NAME__ to actually *be* the name, and either have an 
extra substitution variable __VENV_PROMPT__ or just leave it to the scripts 
themselves to format the prompt using the name.

I could supply a patch (it's not hard) but would need agreement on the right 
approach.

--
assignee: vinay.sajip
components: Library (Lib)
messages: 198795
nosy: pmoore, vinay.sajip
priority: normal
severity: normal
status: open
title: In venv, __VENV_NAME__ is the prompt, not the name
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19139
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly

2013-10-01 Thread Senthil Kumaran

Senthil Kumaran added the comment:

FieldStorage(foo, bar) is invalid because the first argument is supposed to
be file-like object and second one headers. Here we are sending invalid 
headers. By
default, if the headers is none, the content-type is urlencoded.

The right way of using FieldStorage is either using the keyword arguments in a 
tightly couple manner. Or use it as default instance (fs = cgi.FieldStorage())

So the expectation could be:

fs = cgi.FieldStorage()
bool(fs)
False


 # sending correct fs, env
 # http://hg.python.org/cpython/file/32de3923bb94/Lib/test/test_cgi.py#l259
 fs = cgi.FieldStorage(fs, environ=env)
 bool(fs)
True 

The TypeError failure in python3 for bool(fs) is, in the absence of __bool__, 
it is trying to do
a len() and which ultimately ends up calling keys():
http://hg.python.org/cpython/file/32de3923bb94/Lib/cgi.py#l579

The proper fix in Python3 IMO is the just define __bool__ instead of 
__nonzero__ and that will be return False instead of TypeError.

--
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19097
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19139] In venv, __VENV_NAME__ is the prompt, not the name

2013-10-01 Thread Vinay Sajip

Vinay Sajip added the comment:

Makes sense to me. Adding Carl Meyer to nosy, to see if he has a different view.

--
nosy: +carljm

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19139
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19109] 'TestTCPServer' is not defined

2013-10-01 Thread Vinay Sajip

Vinay Sajip added the comment:

From the fact that 3.4a3 is out I assume it's OK to close this issue. The 
buildbots are no longer showing this error.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19109
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19139] In venv, __VENV_NAME__ is the prompt, not the name

2013-10-01 Thread Carl Meyer

Carl Meyer added the comment:

Makes sense to me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19139
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19139] In venv, __VENV_NAME__ is the prompt, not the name

2013-10-01 Thread Paul Moore

Paul Moore added the comment:

Cool. Patch attached (this fixes __VENV_NAME__ and implements __VENV_PROMPT__)

--
keywords: +patch
Added file: http://bugs.python.org/file31938/venv_prompt.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19139
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18468] re.group() should never return a bytearray

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file31737/re_group_type.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18468] re.group() should never return a bytearray

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Fixed a typo.

Could anyone please make a review?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18468] re.group() should never return a bytearray

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file31939/re_group_type.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly

2013-10-01 Thread Guido van Rossum

Guido van Rossum added the comment:

I believe you that the example invocation is wrong. But then shouldn't it raise 
an exception? I still think that if len() raises KeyError, bool() should raise 
KeyError too.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19097
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
components: +Unicode

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please make a review Ezio?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12892
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What would you say about this patch Terry?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What would you say about this patch Terry?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18512] sys.stdout.write does not allow bytes in Python 3.x

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
status: open - pending

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18512
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
Removed message: http://bugs.python.org/msg198805

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19140] inspect.Signature.bind() inaccuracies

2013-10-01 Thread Yann Kaiser

New submission from Yann Kaiser:

A pair of inconsistencies I've found using Signature.bind:

(a=0).bind() -* TypeError
Letting the default value of a positional-only parameter be used raises a 
TypeError with message that 'a' was passed by name.

(a, *args).bind(a=0, args=1) - BoundArguments({'a': 0, 'args': 1})
Should positional arguments not be enough for bind() to reach the parameter 
before *args, bind() will process the *args parameter while looking for named 
arguments, and eventually bind the *args parameter to any named argument for 
it, instead of leaving that named argument for **kwargs or erroring out.

I've attached a patch that tests and fixes both issues.

I've taken the liberty of extending 
test_inspect.TestSignatureBind.test_signature_bind_positional_only as it 
already did all the setup needed but overlooked to check the condition where a 
defaulted positional-only parameter is left out.

--
components: Library (Lib)
files: sig_bind_posodefa_varargs.patch
keywords: patch
messages: 198806
nosy: epsy
priority: normal
severity: normal
status: open
title: inspect.Signature.bind() inaccuracies
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31940/sig_bind_posodefa_varargs.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19140
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19130] PCbuild/readme.txt not up-to-date

2013-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks Christian!

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19130
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19140] inspect.Signature.bind() inaccuracies

2013-10-01 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19140
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19094] urljoin should raise a TypeError if URL is not a string

2013-10-01 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Vajrasky, you're right. Comparing against type(obj) is an anti-pattern. 
isinstance is better. Duck typing is even better (in many cases).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19094
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18468] re.group() should never return a bytearray

2013-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch addressed Antoine's comments.

--
Added file: http://bugs.python.org/file31941/re_group_type_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18037
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17839] base64 module should use memoryview

2013-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Allow memoryview.cast() for empty views

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17839
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19136] CSV, builtin open(), newline arg. Docs broken again.

2013-10-01 Thread Graham Wideman

Graham Wideman added the comment:

David:
Yes, as it turns out you are absolutely right, in a manner of speaking.  I have 
retested this exhaustively today, and here's the root cause.

It turns out that in testing, I must have activate a particular simplified test 
script by invoking only scriptname.py rather than invoking 'python 
scriptname.py'. (And then repeating that mistake by reinvoking via console 
history... doh!)

The latter reliably invokes python 3.3.2, because that's the only python in my 
PATH.  The former, it turns out, invokes the Windows Python Launcher, which 
finds a previously installed Python 2.7.1, despite that not being on the PATH. 

So, in my mind, the possibility of launching any version other than Python 
3.3.2 did not enter the picture.

Prior to this, I was only vaguely aware that Windows Python Launcher existed. 
Ironically, it was probably installed by Python 3.3.2.

Sorry for the bogus bug alert.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19136
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename

2013-10-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I cannot say much since I do not know what .split and .splitlist do or are 
supposed to do. They have no docstrings. They are methods of tkinter.Tk().tk, 
the app or 'interpreter' returned by _tkinter.create. Modules/_tkinker.c maps 
then to the C functions TkappSplit(List), which have no comments.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19020
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19141] Windows Launcher fails to respect PATH

2013-10-01 Thread Graham Wideman

New submission from Graham Wideman:

Python Launcher for Windows provides some important value for Windows users, 
but its ability to invoke python versions not on the PATH is a problem.

py.exe chooses a version of Python to invoke, in more or less this order of 
decreasing priority; it is the *last* one that occurs by default in a new 
install of python 3.3.x:

1. Shebang line in myscript.py

2. py.exe -n argument (n can be 2, 3, 3.2 etc). Launcher chooses the latest 
installed version so specified.

3. PY_PYTHON environment variable

4. py.ini in C:\WINDOWS or user's %LOCALAPPDATA% directory

5. Launcher hunts through registry for ALL previously installed pythons, and 
picks the latest version in the 2.x series. DEFAULT.

The first issue to note is that, to my knowledge, the exact precedence order is 
not documented... it would greatly help if this were done.

That said, the focus in this report is case 5, which as noted is the default 
behavior when python 3.3.2 is installed (and py.exe invoked with scripts having 
no launcher-aware shebang line).

In case 5, py.exe completely ignores the PATH environment variable. So, whereas 
PATH is used to find py.exe, or when the user invokes 'python' on the command 
line, py.exe ignores PATH and launches a version of python that is not 
necessarily in the PATH.

In case 2 where the user supplies a value for 'n', finding a non-PATH version 
of python is excusable on the basis that the user deliberately requests a 
version.

However, in case 5, the user is not invoking py explicitly, and is not 
necessarily aware of py's algorithm for finding all installed versions. The 
user might reasonably expect that invoking a script or double clicking it would 
just invoke 'python' the same as the 'python' command, using PATH.

In particular, if the user understands how PATH works (as reviewed in the docs 
here: 
http://docs.python.org/3/using/windows.html#finding-the-python-executable), 
then upon installing 3.3.x, he or she might explicitly *remove* python 2.x from 
PATH in the expectation that this will disable python 2.x. It is surprising and 
potentially harmful that py.exe does not abide by that choice.

A potential improvement is to interpose an item '4.5' in the above list, in 
which py.exe looks for a version of python on the PATH before falling back to 
searching for latest 2.x python ever installed.

(It is not clear that py.exe should *ever* fallback to just picking the latest 
2.x in the registry (item 5). It is conceivable that a user may have configured 
one of those pythons to do something destructive or insecure on startup, and it 
will be a great surprise if py.exe randomly invokes it just because it has 
the highest version number.)

--
components: Windows
messages: 198812
nosy: gwideman
priority: normal
severity: normal
status: open
title: Windows Launcher fails to respect PATH
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19141
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-01 Thread Trevor Bowen

New submission from Trevor Bowen:

FWIW, I'm using a Freescale cross-compile tool-chain on a Linux x86-64 build 
host, although I have duplicated the cross-compile error on an x86 Ubunutu 
10.04 build host.

Steps to reproduce:

$ wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2
$ tar -jxf Python-2.7.5.tar.bz2
$ cd Python-2.7.5
$ export 
PATH=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin:${PATH}
# For info only:
$ ls -l 
/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/bin
 
total 10472
-rwxrwxrwx 1 root root  590485 Mar  5  2012 powerpc-none-linux-gnuspe-addr2line
-rwxrwxrwx 1 root root  614647 Mar  5  2012 powerpc-none-linux-gnuspe-ar
-rwxrwxrwx 1 root root  897161 Mar  5  2012 powerpc-none-linux-gnuspe-as
-rwxrwxrwx 1 root root  235382 Mar  5  2012 powerpc-none-linux-gnuspe-c++
-rwxrwxrwx 1 root root  589227 Mar  5  2012 powerpc-none-linux-gnuspe-c++filt
-rwxrwxrwx 1 root root  234277 Mar  5  2012 powerpc-none-linux-gnuspe-cpp
-rwxrwxrwx 1 root root8503 Mar  5  2012 powerpc-none-linux-gnuspe-embedspu
-rwxrwxrwx 1 root root  235382 Mar  5  2012 powerpc-none-linux-gnuspe-g++
-rwxrwxrwx 1 root root  233126 Mar  5  2012 powerpc-none-linux-gnuspe-gcc
-rwxrwxrwx 1 root root  233126 Mar  5  2012 powerpc-none-linux-gnuspe-gcc-4.3.2
-rwxrwxrwx 1 root root   16512 Mar  5  2012 powerpc-none-linux-gnuspe-gccbug
-rwxrwxrwx 1 root root   28017 Mar  5  2012 powerpc-none-linux-gnuspe-gcov
-rwxrwxrwx 1 root root  655127 Mar  5  2012 powerpc-none-linux-gnuspe-gprof
-rwxrwxrwx 1 root root 1036372 Mar  5  2012 powerpc-none-linux-gnuspe-ld
-rwxrwxrwx 1 root root  603678 Mar  5  2012 powerpc-none-linux-gnuspe-nm
-rwxrwxrwx 1 root root  750617 Mar  5  2012 powerpc-none-linux-gnuspe-objcopy
-rwxrwxrwx 1 root root  895336 Mar  5  2012 powerpc-none-linux-gnuspe-objdump
-rwxrwxrwx 1 root root  614647 Mar  5  2012 powerpc-none-linux-gnuspe-ranlib
-rwxrwxrwx 1 root root  264063 Mar  5  2012 powerpc-none-linux-gnuspe-readelf
-rwxrwxrwx 1 root root  593901 Mar  5  2012 powerpc-none-linux-gnuspe-size
-rwxrwxrwx 1 root root  591853 Mar  5  2012 powerpc-none-linux-gnuspe-strings
-rwxrwxrwx 1 root root  750617 Mar  5  2012 powerpc-none-linux-gnuspe-strip
$ ./configure --host=powerpc-none-linux-gnuspe \
--build=i586-linux-gnu --prefix=/  \
--disable-ipv6 ac_cv_file__dev_ptmx=no \
ac_cv_file__dev_ptc=no
$ make

Make fails because the foreign (powerpc, in this case) pgen binary is used to 
build the $(GRAMMAR_H).  Instead, a native version of the python interpreter 
(preferrable) and pgen (essential) need to be built first using the host's 
toolchain.  Then, these tools can be used to build the full foreign suite.

FWIW, This 2 step process is well documented here:

http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html

However, the cross-compile fixes from Issue17086 may have helped this process.  
(It's hard for me to determine how to take advantage of these updates.)  
Certainly, they changed the above process dramatically.

Incidentally, Python 3.3.2 exhibits almost the exact same build error, if not 
the same.

Build log on an x86-64 host for Python-2.7.5 for a PowerPC-linux target is 
attached.

Tail of log:

make Parser/pgen
make[1]: Entering directory `/home/user/Python-2.7.5'
powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   
-DPy_BUILD_CORE -o Python/mysnprintf.o Python/mysnprintf.c
powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   
-DPy_BUILD_CORE -o Python/pyctype.o Python/pyctype.c
powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   
-DPy_BUILD_CORE -o Parser/tokenizer_pgen.o Parser/tokenizer_pgen.c
powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   
-DPy_BUILD_CORE -o Parser/printgrammar.o Parser/printgrammar.c
powerpc-none-linux-gnuspe-gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   
-DPy_BUILD_CORE -o Parser/pgenmain.o Parser/pgenmain.c
powerpc-none-linux-gnuspe-gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
 Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o 
Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o 
Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o 
Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o 
Parser/printgrammar.o Parser/pgenmain.o -lpthread -ldl  -lpthread -lutil -o 
Parser/pgen
make[1]: Leaving directory `/home/user/Python-2.7.5'
Parser/pgen ./Grammar/Grammar Include/graminit.h Python/graminit.c
Parser/pgen: Parser/pgen: cannot execute binary file
make: *** [Include/graminit.h] 

[issue19143] Finding the Windows version getting messier

2013-10-01 Thread Tim Peters

New submission from Tim Peters:

This question:

http://stackoverflow.com/questions/19128219/detect-windows-8-1-in-python

reports that Python is returning incorrect version info under Windows 8.1.

Alas, it appears MS is deprecating `GetVersionEx()`:


http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx

and replacing it with a whole slew of annoying yes or no? functions:


http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspx

Heh ;-)

--
components: Interpreter Core, Windows
messages: 198814
nosy: tim.peters
priority: normal
severity: normal
status: open
title: Finding the Windows version getting messier
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19143
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-01 Thread R. David Murray

R. David Murray added the comment:

It is a known issue that the Python build infrastructure does not currently 
support cross compiling.  There are a number of issues and patches in this 
tracker that address pieces of this puzzle.  Help sorting it all out will be 
welcome.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19142
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-01 Thread Trevor Bowen

Trevor Bowen added the comment:

Sorry, I do not mean to compound an already open and complex problem.  I 
thought that the fixes in 2.7.4 were meant in part to help alleviate this 
problem.  I had not found any feedback or tutorials, so I wanted to provide a 
status update of sorts.  I'm sure there is some.  I just have not been able to 
find it myself.

If the configure script passed in the cross-compile tool-chain *and* the 
build-host tool-chain, could the Makefile be enhanced to build pgen and python 
first with the build-host and then use them to build the full cross-compiled 
versions?  Or, would there be a better general approach?

I am not familiar with the MINGW requirements.  Would this satisfy their needs?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19142
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18594] C accelerator for collections.Counter is slow

2013-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1ee6f8a96fb9 by Raymond Hettinger in branch '3.3':
Issue #18594:  Fix the fallback path in collections.Counter().
http://hg.python.org/cpython/rev/1ee6f8a96fb9

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-10-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Nick and Katie.  This looks great. :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18594] C accelerator for collections.Counter is slow

2013-10-01 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com