[issue7229] Manual entry for time.daylight can be misleading

2010-07-19 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Please do!

--
assignee: georg.brandl - belopolsky

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



[issue2813] No float formatting in PyString_FromFormat

2010-07-19 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Jean may have no interest in moving this forward, but I do.  (Which is why I 
assigned the issue to me.)

--
resolution: out of date - 
status: closed - open

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



[issue9288] Disambiguate :option: and :cmdoption:

2010-07-19 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

The docs on :option: should now be clear in r82961.

--
resolution:  - fixed
status: open - closed

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



[issue8265] test_float fails on ARM Linux EABI with soft floating point

2010-07-19 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

I notice (again) that these failures occur on the 2.6 and 3.1 buildslaves 
(where the debug build includes the -O2 compilation flag), but not the 2.7 or 
py3k buildslaves.  So again this looks like a compiler optimization bug.

This should really be reported upstream, but without direct access to the 
machine to produce a small failing example I don't think I can compose a decent 
bug report.

Closing this as 'won't fix'.

--
resolution:  - wont fix
status: open - closed

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



[issue4111] Add Systemtap/DTrace probes

2010-07-19 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

On 19 Jul, 2010, at 1:07, Alexander Belopolsky wrote:

 
 Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
 
 If any RedHat/Fedora people are tuned in, can you give us an update on 
 Systemtap/DTrace support in RedHat/Fedora python?  I understand that one of 
 the main problems with bringing this upstream was the lack of uniformity 
 between Apple and Sun approaches.  These days Apple and Sun(Oracle) are 
 increasingly unfriendly to open source, so with a third solution available 
 from RedHat, the choice seems obvious.

What do you mean by increasing unfriendly in Apple's case? I haven't noted any 
change from them in the last few years. Not that their (perceived) 
unfriendlyness is relevant.

I'm +1 on merging this feature having dtrace support is pretty convenient.

Ronald

--
Added file: http://bugs.python.org/file18058/smime.p7s

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4111
___

smime.p7s
Description: S/MIME cryptographic signature
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Ray.Allen

New submission from Ray.Allen ysj@gmail.com:

As discussed in python-dev mailing list, something should be add to os.mkdir() 
and os.makedirs() to simulate the shell's mkdir -p function, that is, 
suppress the OSError exception if the target directory exists. 

Here is a patch against py3k, with code, test and doc. I add an ensure_exist 
keyword argument for both os.mkdir() and os.makedirs(), indicates weather an 
OSError is raised if the target directory already exists.

Since I've no windows environment, I only tested the patch on Unix. Hope 
someone could help test it on windows.

--
components: Library (Lib)
files: mkdir_py3k.diff
keywords: patch
messages: 110719
nosy: ysj.ray
priority: normal
severity: normal
status: open
title: os.mkdir() and os.makedirs() add a keyword argument to suppress File 
exists exception.
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file18059/mkdir_py3k.diff

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

I don't think this can go into 2.7.

--

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Ray.Allen

Changes by Ray.Allen ysj@gmail.com:


Removed file: http://bugs.python.org/file18059/mkdir_py3k.diff

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

I update the patch since an problem is found in doc/library/os.rst.

--
Added file: http://bugs.python.org/file18060/mkdir_py3k.diff

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



[issue9300] c/profile Profile class is not documented

2010-07-19 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' g.rod...@gmail.com:

http://docs.python.org/library/profile.html

...while it is, for example, for hotshot module:
http://docs.python.org/library/hotshot.html#hotshot.Profile

Profile class contains some useful methods which are surely worth mentioning, 
like print_stat() and runcall() above all.

--
assignee: d...@python
components: Documentation
messages: 110722
nosy: d...@python, giampaolo.rodola
priority: normal
severity: normal
stage: needs patch
status: open
title: c/profile Profile class is not documented
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Dirkjan Ochtman

New submission from Dirkjan Ochtman dirk...@ochtman.nl:

Rejecting invalid input seems better in this case. This was changed in 
issue1285086. Can we preface the normal fast path with something like:

if s is None:
raise TypeError('can only quote strings')

It used to raise:

Traceback (most recent call last):
  File /usr/lib64/python2.6/urllib.py, line 1222, in quote
res = map(safe_map.__getitem__, s)
TypeError: argument 2 to map() must support iteration

--
components: Library (Lib)
messages: 110723
nosy: djc, flox, orsenthil
priority: normal
severity: normal
status: open
title: urllib.quote(None) returns None in 2.7 (raised TypeError before)
versions: Python 2.7

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



[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Dirkjan Ochtman

Changes by Dirkjan Ochtman dirk...@ochtman.nl:


--
type:  - behavior

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



[issue9302] Distutils document problem?

2010-07-19 Thread Ray.Allen

New submission from Ray.Allen ysj@gmail.com:

The distutils api document for class Extension:

http://docs.python.org/dev/py3k/distutils/apiref.html#distutils.core.Extension

Among the argument, in fact, the type of the arguments sources, 
include_dirs, library_dirs, libraries, runtime_library_dirs must be 
list, but all of them are marked as string. I think this is a problem. 

Here is a patch for this, against py3k.

--
assignee: d...@python
components: Documentation
files: distutils_apiref.diff
keywords: patch
messages: 110724
nosy: d...@python, ysj.ray
priority: normal
severity: normal
status: open
title: Distutils document problem?
versions: Python 3.2
Added file: http://bugs.python.org/file18061/distutils_apiref.diff

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



[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Ray.Allen

Changes by Ray.Allen ysj@gmail.com:


--
nosy: +ysj.ray

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



[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

The fast path was intended to return the empty string.
When s is None, it should return a TypeError.

--
assignee:  - orsenthil
resolution:  - accepted

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



[issue9300] c/profile Profile class is not documented

2010-07-19 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

I guess this is intended not documented:

http://docs.python.org/dev/py3k/library/profile.html#extensions-deriving-better-profilers

Here it said:
The Profile class of both modules, profile and cProfile, were written so that 
derived classes could be developed to extend the profiler. The details are not 
described here, as doing this successfully requires an expert understanding of 
how the Profile class works internally. Study the source code of the module 
carefully if you want to pursue this.

These sentences guide reader to read the source code.

--
nosy: +ysj.ray

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



[issue9185] os.getcwd causes infinite loop on solaris

2010-07-19 Thread Zsolt Cserna

Zsolt Cserna zsolt.cse...@morganstanley.com added the comment:

I confirm that test_posix passes after applying the patch issue9185-2.patch on 
solaris 8.
Thank you. Now solaris and openbsd have a clean os.getcwd() implementation.

--

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



[issue9036] Simplify Py_CHARMASK

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Antoine, I understood that you would prefer to leave the mask. Could I
 apply the second version of the patch?

It looks ok to me.

--

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



[issue8917] Segmentation error happens in Embedding Python.

2010-07-19 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

I think this issue is duplicates of Issue6869. So I'm closing...

--
nosy: +ocean-city
resolution:  - duplicate
status: open - closed

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



[issue6869] Embedded python crashed on 4th run, if ctypes is used

2010-07-19 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


--
nosy: +tanaga

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Senthil, have you read my comment on python-checkins?
Couldn't this have been fixed without introducing a new API in a bugfix branch?

--
nosy: +pitrou

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

I just checked your comment in the checkins list.

I saw this is as bug-fix, which was leading to change in the signature of the 
quote function, still in backward compatible way.
 
Should we still not do it? 

I understood only feature requests and behavior changes are disallowed in 
bug-fix branch.

--

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 I understood only feature requests and behavior changes are disallowed
 in bug-fix branch.

Well, isn't it a new feature you're adding?

--

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Matt Giuca

Matt Giuca matt.gi...@gmail.com added the comment:

From http://mail.python.org/pipermail/python-checkins/2010-July/095350.html:
 Looking at the issue (which in itself was quite old), you could as well
 have fixed the robotparser module instead.

It isn't an issue with robotparser. The original reporter found it via 
robotparser, but it's nothing to do with that module. I found it independently 
and I would have reported it separately if it hadn't already been here.

It's definitely a bug in urllib (as shown by my extensive new test cases).

--

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Matt Giuca

Matt Giuca matt.gi...@gmail.com added the comment:

 Well, isn't it a new feature you're adding?

You had a function which raised a confusing and unintentional KeyError when 
given non-ASCII Unicode input. Now it doesn't. That's the bug fix part.

What I assume you're referring to as a new feature is the new arguments. I'd 
say they're unfortunately necessary in fixing this bug, as the fix requires 
encoding the non-ASCII unicode characters with some encoding, and it's 
(arguably) necessary to give the programmer the choice of encoding, with 
sensible defaults.

--

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 It's definitely a bug in urllib

A bug in what way? Up to 2.6 (*), the docs state nothing about the type of the 
string parameter.
(*) http://docs.python.org/release/2.6.5/library/urllib.html#urllib.quote

I think everyone assumed that the parameter should be a str object and 
nothing else. Apparently some people used it accidentally with some unicode 
strings and it worked until these strings contained non-ASCII characters. But 
it's a side-effect of how 2.x unicode strings work, and it doesn't seem to me 
quote() was ever intended to accept unicode strings.

If we were following you, we would add encoding and errors arguments to any 
str-accepting 2.x function, so that it can also accept unicode strings. That's 
certainly not a reasonable solution.

--

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



[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +merwok

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



[issue9300] c/profile Profile class is not documented

2010-07-19 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Oh right, I didn't notice that.
Closing this out as invalid.

--
resolution:  - invalid
status: open - closed

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Well, my understanding was Type:behavior was a bug fix and Type: feature 
request was a new feature request, which may change some underlying behavior. I 
thought this issue was on the border.

The robotparser using this might be just one usage indicator, but having this 
capability in the quote definitely helps. And this could not have been done 
without changing the signature.

Ideally, this could have gone in 2.7, but I missed it.  Personally, I am still 
+1 in having this in 2.7.1. Is it undesirable? Does it need wider discussion?

--

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Well, my understanding was Type:behavior was a bug fix and Type:
 feature request was a new feature request, which may change some
 underlying behavior. I thought this issue was on the border.

The original issue is against robotparser, and clearly states a bug
(robotparser doesn't work in some cases).
But solving a bug by adding a feature isn't appropriate for a bugfix
release.

You shouldn't look at how the issue is classified. What's important is
what the actual *patch* does.

A patch doesn't have to change existing behaviour to be considered a
feature. That's a misconception. Feature releases try to be
forward-compatible as well (if I use urllib.quote() in 2.Y, it will
still work in 2.Y+1).

Adding API parameters, or accepting additional types in an existing API,
is clearly a new feature.

 Ideally, this could have gone in 2.7, but I missed it.  Personally, I
 am still +1 in having this in 2.7.1. Is it undesirable? Does it need
 wider discussion?

We can certainly make exceptions from time to time but only when there's
a strong argument for it (e.g. a security issue). There doesn't seem to
be an urgency to make urllib.quote() work with non-ASCII unicode strings
in 2.7.1, while it didn't before anyway.

Furthermore, the core issue is the automatic coercion between unicode
and 8-bit strings in 2.x. Many APIs are affected by this, urllib.quote()
shouldn't be considered a special case.

--

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



[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2010-07-19 Thread Michael Schwarz

New submission from Michael Schwarz michi.schw...@gmail.com:

The Python sqlite module currently uses some deprecated API [0] of SQLite. 
These are functions that have a counterpart with _v2 appended to their name.

The SQLite query planner will not use certain optimizations when using the old 
API. For example, as documented in [1], using a statement with a GLOB or LIKE 
operator where the pattern is parametrized will only use an appropriate index 
if sqlite3_prepare_v2() is used instead of sqlite3_prepare().

Following is an example of such a query. When executed, table 'test' is scanned 
row by row, which requires all data in the table to be loaded from disk.

cursor.execute('create table test(a text)')
cursor.execute('create index test_index on test(a)')
# insert some data here
cursor.execute('select * from test where a glob ?', ['prefix*'])

When the same query is executed in the sqlite3 command line utility, the index 
'test_index' is used instead.

sqlite create table test(a text);
sqlite create index test_index on test(a);
sqlite explain query plan select * from test where a glob 'prefix*';
order   fromdetail
0   0   TABLE test WITH INDEX test_index

The query in this example is not parametrized as parameters can't be filled in 
when using the sqlite3 command line utility. This is just to show that the 
schema and the query allow the index to be used with certain pattern strings.

[0]: http://www.sqlite.org/c3ref/funclist.html
[1]: http://www.sqlite.org/optoverview.html#like_opt

Michael

--
components: Extension Modules
messages: 110739
nosy: feuermurmel
priority: normal
severity: normal
status: open
title: Migrate sqlite3 module to _v2 API to enhance performance
type: performance
versions: Python 3.1

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

On Mon, Jul 19, 2010 at 11:25:30AM +, Antoine Pitrou wrote:
 If we were following you, we would add encoding and errors
 arguments to any str-accepting 2.x function, so that it can also
 accept unicode strings. That's certainly not a reasonable solution.

I don't think Matt is indicating that. Just the quote function can be
used with unicode string as perfectly valid string input.
In the original py3k bug too, there was a big discussion on this very
same topic.

--

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



[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2010-07-19 Thread Antoine Pitrou

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


--
assignee:  - ghaering
nosy: +ghaering
stage:  - needs patch
versions: +Python 3.2 -Python 3.1

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



[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2010-07-19 Thread Gerhard Häring

Gerhard Häring g...@ghaering.de added the comment:

Yes, the sqlite module uses the old API, and is written to work with older 
SQLite releases and their respective bugs as well.

Using the new API will mean requiring newer SQLite releases.

If we do this, then this is the chance to remove all the obscure backwards 
compatibility code with older SQLite releases.

--

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



[issue9302] Distutils document problem?

2010-07-19 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +tarek

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



[issue9189] Improve CFLAGS handling

2010-07-19 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

On 9 Jul, 2010, at 20:55, Jeffrey Yasskin wrote:

 
 Jeffrey Yasskin jyass...@gmail.com added the comment:
 
 Oops. Thanks for telling me. Fixed in r82753.

I'm pretty sure this patch broke universal builds on OSX. Not the python build 
itself, but building 3th-party extensions. I'll commit a fix later on.

In the Makefile:

LDSHARED=   $(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup

'gcc'
 sysconfig.get_config_var('LDFLAGS')
'-arch i386 -arch ppc -arch x86_64 -isysroot /'
 sysconfig.get_config_var('LDSHARED')
'gcc  -bundle -undefined dynamic_lookup'

That is, the LDFLAGS aren't patched into the value of LDSHARED. 

This is because LDFLAGS is actually PY_LDFLAGS in the makefile and the rename 
from PY_LDFLAGS to LDFLAGS happens *after* variable expansion in sysconfig.

This doesn't affect the build of python itself because the Makefile explictly 
sets LDFLAGS in the environment when running setup.py.

Ronald

--
Added file: http://bugs.python.org/file18062/smime.p7s

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9189
___

smime.p7s
Description: S/MIME cryptographic signature
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9298] binary email attachment issue with base64 encoding

2010-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Can you try this against 3.1 from svn (or py3k from svn)?  A bug was fixed that 
might be relevant.  Alternatively a unit test that demonstrates the problem 
would be most helpful.

--
assignee:  - r.david.murray
nosy: +r.david.murray
stage:  - unit test needed

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



[issue9298] binary email attachment issue with base64 encoding

2010-07-19 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
type:  - behavior

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Matt Giuca

Matt Giuca matt.gi...@gmail.com added the comment:

 I think everyone assumed that the parameter should be a str object
 and nothing else. Apparently some people used it accidentally with
 some unicode strings and it worked until these strings contained
 non-ASCII characters.

I don't consider use of Unicode strings in Python 2.7 to be accidental. In my 
experience with Python 2, pretty much everything already works with Unicode 
strings, and it's best practice to use them.

Now one of the major goals of Python 2.6/2.7 is to allow the writing of code 
which ports smoothly to Python 3. Unicode support is a major issue here. To 
quote What's new in Python 3 (http://docs.python.org/py3k/whatsnew/3.0.html):
To be prepared in Python 2.x, start using unicode for all unencoded text, and 
str for binary or encoded data only. Then the 2to3  tool will do most of the 
work for you.
Having functions in Python 2.7 which don't accept Unicode (or worse, raise 
random exceptions) runs against best practices for moving to Python 3.

 If we were following you, we would add encoding and errors arguments
 to any str-accepting 2.x function, so that it can also accept unicode
 strings. That's certainly not a reasonable solution.

No, that's certainly not necessary. You don't need an encoding or errors 
argument on any given function in order to support unicode. In fact, most code 
written to work with strings naturally works with Unicode because unicode 
strings support the same basic operations.

The need for an encoding and errors, and in fact the need to deal with 
string encoding at all with urllib.quote is due to the special nature of URLs. 
If URLs had a syntax like %u then there would be no need for encoding 
Unicode strings (as in UTF-8) at all. However, because the RFC specifies that 
Unicode strings are to be encoded into a byte sequence *using an unspecified 
encoding*, it is therefore necessary, for this specific function, to ask the 
programmer which encoding to use.

Thus I assure you, this is not just one random function I have picked to add 
these arguments to. This is the only one (that I know of) that requires them to 
support Unicode.

 The original issue is against robotparser, and clearly states a bug
 (robotparser doesn't work in some cases).

I don't know why this keeps coming back to robotparser. The original bug was 
not against robotparser; it is called quote throws exception on Unicode URL 
and that is the bug. Robotparser was just one demonstrative piece of code which 
failed because of it.

Having said that, I don't expect to continue this argument. If you (the Python 
developers) decide that it's too late to accept this, then I won't object to 
reverting it.

--

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



[issue9297] SMTP with Sqlite3 file attached problem

2010-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It crashed is not enough information to diagnose your problem or whether or 
not there is a Python bug here.  Can you provide additional information please? 
 A minimal test case that reproduces the problem would be best.

--
nosy: +r.david.murray

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



[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-19 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


Removed file: http://bugs.python.org/file18016/issue9265.patch

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Now one of the major goals of Python 2.6/2.7 is to allow the writing
 of code which ports smoothly to Python 3. Unicode support is a major
 issue here.

I understand the argument. But 2.7 is a bugfix branch and shouldn't
receive new features, even backports. If we wanted 2.x to converge
further into 3.x, we would do a 2.8, which we have decided not to do.

 I don't consider use of Unicode strings in Python 2.7 to be
 accidental. In my experience with Python 2, pretty much everything
 already works with Unicode strings, and it's best practice to use
 them.

Not true. From the urllib module itself:

$ touch /tmp/hé
$ python -c 'import urllib; urllib.urlretrieve(file:///tmp/hé)'
$ python -c 'import urllib; urllib.urlretrieve(ufile:///tmp/hé)'
Traceback (most recent call last):
  File string, line 1, in module
  File /usr/lib64/python2.6/urllib.py, line 93, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
  File /usr/lib64/python2.6/urllib.py, line 225, in retrieve
url = unwrap(toBytes(url))
  File /usr/lib64/python2.6/urllib.py, line 1027, in toBytes
 contains non-ASCII characters)
UnicodeError: URL u'file:///tmp/h\xc3\xa9' contains non-ASCII characters

 Having functions in Python 2.7 which don't accept Unicode (or worse,
 raise random exceptions) runs against best practices for moving to
 Python 3.

There are lots of them, and urllib.quote() isn't an exception:

'x\x9c\xcbH\x04\x00\x013\x00\xca'
 zlib.compress(uhà)
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 1: 
ordinal not in range(128)

pwd.struct_passwd(pw_name='root', pw_passwd='x', pw_uid=0, pw_gid=0, 
pw_gecos='root', pw_dir='/root', pw_shell='/bin/bash')
 pwd.getpwnam(urooté)
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: 
ordinal not in range(128)

 In fact, most code written to work with strings naturally works with
 Unicode because unicode strings support the same basic operations.

What should zlib compression of an unicode string result in?

  The original issue is against robotparser, and clearly states a bug
  (robotparser doesn't work in some cases).
 
 I don't know why this keeps coming back to robotparser. The original
 bug was not against robotparser; it is called quote throws exception
 on Unicode URL and that is the bug. Robotparser was just one
 demonstrative piece of code which failed because of it.

Well, there are two different concerns:
- robotparser fails on certain Web pages, which is a bug (unless the Web
pages are clearly malformed)
- urllib.quote() should accept any kind of unicode strings, and perform
appropriate encoding, with an ability to override default encoding
parameters: this is a feature request

The OP himself (John Nagle) said:
“The problem is down inside a library module. robotparser is calling
urllib.quote. One of those two library modules needs to be fixed.”

It seems to imply that the primary concern was robotparser not working.

--

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



[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Stefan: patch looks good to me in principle, but it looks like you made it 
against 2.7, and we commit to py3k first now.  The test does not work correctly 
on py3k because of a bytes/string issue, but I'm not clear on why the problem 
happens (I haven't looked in to it, I just observe that the test fails).  And 
yes I think this should go into 2.6 and 3.1 as well.

Narnie: if only we had enough manpower to handle all bugs as rapidly.  Please 
keep learning and help us where you can :)

As for your test...I'm not clear if you are saying Stefan's patch fixes or 
problem or not, but please observe this:

 os.execv('/bin/bash', ['/bin/sh', 'echos', 'foo'])
/bin/sh: echos: No such file or directory

That is, it is /bin/bash that is running, but it thinks its name is '/bin/sh' 
because that is what we passed in arg0 in the execv call.
Similarly you could do:

 os.execv('/bin/bash', ['my_funny_walk', 'echos', 'foo'])
my_funny_walk: echos: No such file or directory

So, popen is *calling* the correct shell, it's just that it is giving it the 
wrong arg[0] name, which Stefan's patch fixes.

--

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Sorry, the email gateway of Roundup ate half of my snippets.
Here they are again:

 zlib.compress(uha)
'x\x9c\xcbH\x04\x00\x013\x00\xca'
 zlib.compress(uhà)
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 1: 
ordinal not in range(128)

 pwd.getpwnam(uroot)
pwd.struct_passwd(pw_name='root', pw_passwd='x', pw_uid=0, pw_gid=0, 
pw_gecos='root', pw_dir='/root', pw_shell='/bin/bash')
 pwd.getpwnam(urooté)
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: 
ordinal not in range(128)

--

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



[issue9296] json module skipkeys handling changed exception types in 2.7

2010-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Adding some people to nosy: Bob, who wrote the code, and Antoine and Benjamin 
who were involved in the update and probably have an opinion on the correct fix.

(c.f.: Issue4136)

--
nosy: +benjamin.peterson, bob.ippolito, pitrou, r.david.murray
stage:  - unit test needed

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Isaac Morland

Isaac Morland ijmor...@uwaterloo.ca added the comment:

This exact issue has already been discussed in Issue 1675.

--
nosy: +ijmorlan

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



[issue1675] Race condition in os.makedirs

2010-07-19 Thread Isaac Morland

Isaac Morland ijmor...@uwaterloo.ca added the comment:

This is again being discussed in Issue 9299.

--

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



[issue1764286] inspect.getsource does not work with decorated functions

2010-07-19 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

I don't think this patch is correct, because we don't know if the closure[0] is 
the wrapped function, consider the following case:

def fun():
abc = 1
def fun2():
print(abc)
print(inspect.getsource(fun2))

In this case, the __closure__ of fun2 is [cell(1), ], the patch doesn't work.


I think the behavior of inspect.getsource(arg) is no problem because it indeed 
gives the right source code of arg, no matter arg is a wrapper function or an 
original function. michele argues that the result is not meaningful, through in 
most case it seems reasonably because wrapper functions usually do litter 
valuable work, but it is not correct for all cases. What if a wrapper function 
does more valuable work than the wrapped function? In this case should 
getsouce() give the source code of wrapper function because it's more 
meaningful? The concept wrapper and wrapped should have no relation with 
its source code.

I suggest you assign a special named attribute of all wrapper functions to its 
wrapped function yourself, something like wrapped_function, and then you can 
walk through the wrapper chain to find the real source you want for each 
wrapper function. Then the stdard library's update_wrapper() and getsource() 
can remain unchanged.

--
nosy: +ysj.ray

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Isaac Morland

Isaac Morland ijmor...@uwaterloo.ca added the comment:

How different is this issue from Issue 1608579, Issue 1239890, Issue 1223238, 
and Issue 1314067?

--

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



[issue9296] json module skipkeys handling changed exception types in 2.7

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

TypeError sounds right indeed. Patches welcome (even better with tests).

--
stage: unit test needed - needs patch
versions: +Python 3.1, Python 3.2

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-19 Thread Peter Donis

Peter Donis peterdo...@alum.mit.edu added the comment:

I saw that this issue was bumped and re-tested against the current trunk 
(r82970). A further change in doctest_testfile.py was needed to make the test 
pass when called from regrtest.py: the test importer for the loader.get_data 
test case now stores the absolute path where doctest_testfile.txt is located, 
so that it can always find it. I've uploaded a 2nd revised diff with this 
change.

--
keywords: +patch
Added file: http://bugs.python.org/file18063/doctest-fixes2.diff

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



[issue9296] json module skipkeys handling changed exception types in 2.7

2010-07-19 Thread Doug Hellmann

Doug Hellmann doug.hellm...@gmail.com added the comment:

Bob fixed this in simplejson under ticket 82 
(http://code.google.com/p/simplejson/issues/detail?id=82).

--

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

If I understander correctly, Issue 1608579, Issue 1239890, Issue 1223238, and 
Issue 1314067 all deal with the case that the intermediate directories already 
exists during creating them caused by race condition, but if the target 
directory(the leaf directory) already exist due to some reason, the OSError is 
still raised. This patch is mainly addressed on simulate the mkdir -p option, 
that is, when the target directory exists, no OSError is raised.

--

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Matt Giuca

Matt Giuca matt.gi...@gmail.com added the comment:

OK sure, there are some other things broken, but they are mostly not dealing 
with string data, but binary data (for example, zlib expects a sequence of 
bytes, not characters).

Just one quick point:

 urllib.urlretrieve(file:///tmp/hé)
 UnicodeError: URL u'file:///tmp/h\xc3\xa9' contains non-ASCII characters

That's precisely correct behaviour. URLs are not allowed to contain non-ASCII 
characters (that's the whole point of urllib.quote). urllib.quote should accept 
non-ASCII characters (for conversion into ASCII strings). Other URL processing 
functions should not accept non-ASCII characters, since they aren't valid URIs.

--

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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2010-07-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I'm guessing this problem doesn't occur in 3.x?  If so, the quick fix would be 
to have the registry code catch UnicodeError instead of UnicodeEncodeError.  
That may be the correct fix anyway.

The fun part of this bug is going to be creating a unit test for it.

--
keywords: +easy
nosy: +r.david.murray
stage:  - unit test needed
type:  - behavior

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-19 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

This has already been reported in issue #3511.

--

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



[issue9298] binary email attachment issue with base64 encoding

2010-07-19 Thread Vance Unruh

Vance Unruh vun...@earthlink.net added the comment:

Here's code that attaches the pdf file the two different ways. Both attachments 
are OK when I read the mail on OSX, but one is corrupt when read with Windows 
Mail on Vista. I wasn't sure what to do with the actual sending of the mail to 
the server. You'll have to change the code to use your account or something.

def emailReport(pdf):
Email the report as multi-part MIME

from email.mime.multipart import MIMEMultipart  
msg = MIMEMultipart()
msg['Subject'] = 'Corrupt PDF'
msg['From'] = 'Me m...@myprovider.net'
msg['To'] = 'You y...@yourprovider.com'

# Add the PDF the easy way that fails:
from email.mime.application import MIMEApplication
fp = open(pdf, 'rb')
part = MIMEApplication(fp.read(),pdf)
fp.close()
part.add_header('Content-Disposition', 'attachment',filename='This one 
fails.pdf')
msg.attach(part)

# Add the PDF the hard way using the legacy base64 encoder
from email.mime.base import MIMEBase
part = MIMEBase(application,pdf)
part.add_header('Content-Transfer-Encoding', 'base64')
part.add_header('Content-Disposition', 'attachment',filename='This one 
works.pdf')
import base64
fp = open(pdf, 'rb')
part.set_payload(str(base64.encodebytes(fp.read()),'ascii'))
fp.close()
msg.attach(part)

# Send the email
from smtplib import SMTP
server = SMTP('smtpauth.provider.net')
server.login(user,password)
server.sendmail(msg['From'], recipient, msg.as_string())
server.quit()



emailReport('bugs.python.org_issue9298.pdf')

--
Added file: http://bugs.python.org/file18064/bugs.python.org_issue9298.pdf

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



[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-19 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

David, thanks for all the comments! - The string/bytes issue was caused
by the fact that p.stdout is only opened in text mode when 
universal_newlines=True.


Committed fix in r82971, r82972, r82973 and r82974. I'll close this issue
if all buildbots are ok.

--

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



[issue9189] Improve CFLAGS handling

2010-07-19 Thread Jeffrey Yasskin

Jeffrey Yasskin jyass...@gmail.com added the comment:

Oops, sorry about that. Is the fix to change LDSHARED to
  LDSHARED=   $(CC) $(PY_LDFLAGS) -bundle -undefined dynamic_lookup
?

--

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



[issue9304] unreproducible example in the memoryview documentation

2010-07-19 Thread Carl Chenet

New submission from Carl Chenet cha...@ohmytux.com:

Hi,

In the current documentation at 
http://docs.python.org/library/stdtypes.html#memoryview, the first example 
announces : 

 v = memoryview('abcefg')
 v[1]
'b'
 v[-1]
'g'
 v[1:4]
memory at 0x77ab28
 str(v[1:4])
'bce'

Trying to reproduce this example I got : 

$ python
Python 2.7 (r27:82500, Jul 13 2010, 17:48:51) 
[GCC 4.4.1] on linux2
Type help, copyright, credits or license for more information.
 v = memoryview('abcefg')
 v[1]
'b'
 v[-1]
'g'
 v[1:4]
memory at 0xa2a510
 str(v[1:4])
'memory at 0xa2a5a8'

The last line of the example in the documentation is not reproducible. Hope 
it's only a documentation issue.

Bye,
Carl Chenet

--
assignee: d...@python
components: Documentation
messages: 110766
nosy: chaica_, d...@python
priority: normal
severity: normal
status: open
title: unreproducible example in the memoryview documentation
versions: Python 2.7

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



[issue8911] regrtest.main should have a test skipping argument

2010-07-19 Thread Jerry Seutter

Changes by Jerry Seutter jseut...@gmail.com:


--
assignee:  - jerry.seutter
nosy: +jerry.seutter

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-19 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Patched files work fine on Windows against the 2.7 maintainance branch.
doctest (doctest) ... 66 tests with zero failures
doctest (test.test_doctest) ... 440 tests with zero failures

They fail on py3k, it's a unicode problem that's nothing to do with this patch.

Could someone try this on a Linux box to confirm my findings?

--
keywords:  -patch
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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



[issue9185] os.getcwd causes infinite loop on solaris

2010-07-19 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Thanks for testing! - Fix also backported to release26-maint in r82975.
Closing this one.

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

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



[issue9105] pickle security note should be more prominent

2010-07-19 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

The patch does not apply to py3k.  Also, when you generate patches please do so 
from the root directory of the branch.  For example, tutorial/inputoutput.rst 
should be patched as Doc/tutorial/inputoutput.rst.

Thanks.

--

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Since this is a library issue, it can go into 3.2.
It is definitely a feature request, hence not in 2.7. Code that depends on the 
exception suppression would crash on an earlier release.

http://mail.python.org/pipermail/python-dev/2010-July/102027.html
Guido said Well, it really should have behaved like mkdir -p in the first 
place., so this is accepted pending patch approval.

The patch includes doc, test, and code patches.

The name 'ensure_exist' for the new parameter strikes me as wrong, as well as 
too long for something that will nearly always be set to True. The function 
always ensures that the directory exists. The question is whether it is ok that 
it exist previously. I strongly suggest something shorter like 'exist_ok' as an 
alternative.

The name 'excl' used in #

The code looks OK as far as I can read it, but someone else should look at the 
C code for posimodule-mkdir.

Does the use of 'base = support.TESTFN' ensure that the test junk gets cleaned 
up?

This versus #1675: the presenting issues are different -- parent race condition 
leading to error versus leaf existence leading to error. However, the patches 
are nearly the same and would have much the same effect. The differences:

* Test: 1675 lacks a new test; there should be one.

* New parameter name: they use different names, I do not like either. They use 
opposite senses -- exist_ok versus exist_bad for the new parameter. I think a 
good name is more important.

* Location of error suppression: this patches posixfile.mkdir; 1675 wraps it 
with a new os.mkdir function that does the suppression. I can see an argument 
for each approach. 

* Propagation to parent directories: this passes exist_ok to parent mkdir(); 
1675 passes exist_ok=True, so that it is never an error for parent directories 
to exist. This is a change in behavior and might be bad for the same reason we 
do not make exist_ok=True the default. In any case, I believe either patch 
could be changed to mimic the other.

Thus there are three choices to make before committing.

--
nosy: +tjreedy
resolution:  - accepted
stage:  - patch review
type:  - feature request
versions: +Python 3.2 -Python 2.7, Python 3.3

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +draghuram, gagenellina, gvanrossum, zooko

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



[issue4499] redefinition of TILDE macro on AIX platform

2010-07-19 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

I've located the following patch in our ActivePython source tree.

$ cat src/patches/3.1/general/aix_tilde.patch 
--- Include/token.h.orig2008-10-08 11:51:52.0 -0700
+++ python/Include/token.h  2008-10-08 11:52:53.0 -0700
@@ -7,6 +7,8 @@
 extern C {
 #endif
 
+#undef TILDE   /* Prevent clash of our definition with system macro. Ex AIX, 
ioctl.h */
+
 #define ENDMARKER  0
 #define NAME   1
 #define NUMBER 2

--

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



[issue1675] Race condition in os.makedirs

2010-07-19 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The precipitating issue for this and #9299 are different: parent race leading 
to error versus tail existence leading to error. However, both patches address 
both issues.

See #9299 for my comparison of this patch and that.

I am consolidating nosy lists there. Perhaps most/all further discussion should 
be directed there.

--
nosy: +tjreedy
stage:  - patch review
type: behavior - feature request
versions: +Python 3.2 -Python 2.6

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



[issue9278] rename 2to3 pydoc to 2to3.py pydoc.py

2010-07-19 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

What do you mean by 'commands'? Being able to type '2to3' instead of '2to3.py' 
on *nix?

Want me to open a new feature request for Windows support - perhaps by 
including a 2to3.bat/pydoc.bat (similar to idle.bat) in C:\PythonXY\Scripts? 
The idea is to let Windows users run 2to3 and pydoc; that's all.

--

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



[issue9305] Don't use east/west of UTC in date/time documentation

2010-07-19 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

I am opening this to supersede issue7229.  See discussion following msg107148.

In many places offsets representing the difference between local time and UTC 
are described as minutes or seconds east or west of UTC.   This is not correct 
because UTC is not a place and minutes and seconds don't measure distance in 
this context.  Replacing UTC with the Prime Meridian will not fix that because 
some regions in the western hemisphere use positive offsets from UTC.  or 
example, Madrid is at 3° 42' West, but uses Central European Time which is 
UTC+1.

I believe geographical references in the python documentation are irrelevant.  
What users are interested in is how to convert local time to UTC and UTC to 
local time rather than what is the sign of time.timezone in Madrid.

I suggest the following wording for time.timezone description:

time.timezone: The number of seconds one must add to the local time to arrive 
at UTC.

Similarly, tzinfo.utcoffset() can be defined as Returns timedelta one must add 
to UTC to arrive at local time.

--
assignee: d...@python
components: Documentation
keywords: easy
messages: 110774
nosy: belopolsky, d...@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Don't use east/west of UTC in date/time documentation
type: feature request
versions: Python 3.2

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



[issue8917] Segmentation error happens in Embedding Python.

2010-07-19 Thread tanaga

tanaga murana...@gmail.com added the comment:

Thanx Hirokazu Yamamoto!! (arigato gozaimasu)

I was insufficient when search.
I searched keywords segment ctype that didn't match :(

--

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



[issue9306] distutils: raise informative error message when cmd_class is None

2010-07-19 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar sridh...@activestate.com:

Current I see this:

 File /opt/ActivePython-2.7/lib/python2.7/distutils/dist.py, line 806, in 
get_command_class
   klass = self.cmdclass.get(command)
AttributeError: 'NoneType' object has no attribute 'get'

more context: https://bugs.launchpad.net/pyreadline/+bug/607329

--
assignee: tarek
components: Distutils
messages: 110776
nosy: srid, tarek
priority: normal
severity: normal
status: open
title: distutils: raise informative error message when cmd_class is None
type: feature request
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue9305] Don't use east/west of UTC in date/time documentation

2010-07-19 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
dependencies: +Manual entry for time.daylight can be misleading

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



[issue7229] Manual entry for time.daylight can be misleading

2010-07-19 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

After reading the new wording on a formatted page, I don't like the proposed 
changes:


time.altzone

When daylight is nonzero, altzone specifies the offset of the local DST 
timezone, in seconds west of UTC. This is negative if the local DST timezone is 
east of UTC ...


In the second sentence, it is not clear whether this refers to altzone or 
daylight.


time.daylight

Whether or not DST is in effect, daylight specifies the DST offset. 


This is simply wrong.  time.daylight does not necessarily specify the DST 
offset (and I think it does not on most systems.)  POSIX requires that The 
tzset() function also shall set the external variable daylight to 0 if Daylight 
Savings Time conversions should never be applied for the timezone in use; 
otherwise, non-zero. [1]  This means that a compliant system may store just 0 
or 1 in daylight rather than the DST offset.

For example, on my OSX system:

$ TZ=America/New_York python -c import time; print(time.daylight)
1
$ TZ=UTC python -c import time; print(time.daylight)
0
$ TZ=EDT python -c import time; print(time.daylight)
0

I will think some more on how to improve the current documentation, but at 
least with respect to time.daylight, current language is better than the 
proposed change.




[1] http://www.opengroup.org/onlinepubs/009695399/functions/tzset.html

--
superseder:  - Don't use east/west of UTC in date/time documentation

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



[issue2142] difflib.unified_diff(...) produces invalid patches

2010-07-19 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

The two latest patch files were missing TestDifflib from run_unittest.  Having 
shown that the tests failed if test_difflib only was patched, then patch 
difflib against the 3.1 maintainance and py3k branches, the former passed ok 
and the latter failed.  Could someone please take a look, at the same time 
considering Mark D's suggestion about using a keyword argument to the 
unified_diff and context_diff functions.

--
nosy: +BreamoreBoy

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-19 Thread Peter Donis

Peter Donis peterdo...@alum.mit.edu added the comment:

You'll probably want someone else to confirm, but for the record, my testing 
was on a Linux box (SuSE 11.2) using Python 2.7 built from the SVN trunk:

pe...@powerspec:~/.local/lib/python2.7/test uname -a
Linux Powerspec 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16 21:25:39 +0100 
i686 i686 i386 GNU/Linux
pe...@powerspec:~/.local/lib/python2.7/test python2.7
Python 2.7 (trunk:82970M, Jul 19 2010, 12:44:35)
[GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
Type help, copyright, credits or license for more information.

pe...@powerspec:~/.local/lib/python2.7/test python2.7 test_doctest.py
doctest (doctest) ... 66 tests with zero failures
doctest (test.test_doctest) ... 443 tests with zero failures

--

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



[issue9036] Simplify Py_CHARMASK

2010-07-19 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Antoine, thanks! Committed in r82966, r82968, r82969 and r82970.


Could we fix the unicodeobject.c bug on the fly? I think the patch should
do, unless non-ascii digits are supported. But in that case several other
changes would be needed.

--
Added file: http://bugs.python.org/file18065/unicodeobject_py_charmask.patch

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



[issue9278] rename 2to3 pydoc to 2to3.py pydoc.py

2010-07-19 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

.py extension is intended for pure-Python modules, not for Python scripts.

--
nosy: +Arfrever

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

There are two points here:

First, is it a desired behavior of quote function in 2.7?

IMO, it is. In the discussions of issue3300, I think, it was decided that quote 
handling of unicode strings may be backported. Behaviour wise the modified 
version still returns a string which is correct for py2.

The forward compatibility on 2.7.1 version here is on the basis that someone in 
2.7 might be relying on Exception raised for Unicode string for the quote 
function.
 
But my guess is, when they are trying to quote non-ascii characters using quote 
function which is path component, they might be expecting that it gives them a 
correct output and this (now) modified function would be of help.

Of the many cases we have on Unicode being auto-coerced to 8-bit string, this 
particular case of using UTF-8 as default encoding for Unicode and returning a 
string seems to be fine (again discussed in the earlier issue). We might not 
have good answers for many other cases.

The Second point, as this is leading to an API change we should not have it 
2.7.1

It would be unfortunate, if we revert the patch on this account only. 

This can be classified a bug-fix producing the desirable behavior, just that it 
needs the API to change too. I don't know if we have never adopted this 
approach (of changing API in backward compatible manner) for anything other 
than the security bug fixes alone.

--

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



[issue9036] Simplify Py_CHARMASK

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Eric, is the unicode patch ok for you?

--

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



[issue9304] unreproducible example in the memoryview documentation

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Right, it should be `v[1:4].tobytes()` instead.

--

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



[issue9036] Simplify Py_CHARMASK

2010-07-19 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

Yes, the unicode patch looks okay to me.

--

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



[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 The forward compatibility on 2.7.1 version here is on the basis that
 someone in 2.7 might be relying on Exception raised for Unicode string
 for the quote function.

Again, the problem isn't compatibility. It is, simply, that we shouldn't
add new features in a bugfix branch.

 The Second point, as this is leading to an API change we should not
 have it 2.7.1
 
 It would be unfortunate, if we revert the patch on this account only. 

Let me put it differently: if this rule didn't exist, there would be no
point in having bugfix branches, since everyone would commit their
favourite new features to bugfix branches.

There are many things which were too late for 2.7, and nobody is trying
to make a case of adding them to 2.7.1.

 I don't know if we have never adopted this approach (of changing API
 in backward compatible manner) for anything other than the security
 bug fixes alone.

We have done it a couple of times in early 3.0 and even 3.1 versions,
but that was really exceptional, and 3.x allowed us to relax some of the
rules since it was so little used at the time.

--

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



[issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented

2010-07-19 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

Is there a reason for not documenting Py_TPFLAGS_LONG_SUBCLASS 
(Py_TPFLAGS_INT_SUBCLASS in 2.x)?

This flag is used in PyLong_Check, but neither this flag or its inheritance 
properties are explained anywhere in the docs.

See also issue5476.

--
assignee: d...@python
components: Documentation
messages: 110787
nosy: belopolsky, d...@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Py_TPFLAGS_LONG_SUBCLASS is not documented
type: feature request

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-19 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +merwok

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



[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-19 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

As I suspected, datetime not recognizing numpy.int_ as a valid input is a numpy 
issue.  Unlike regular int subclasses, numpy.int_ does not have 
Py_TPFLAGS_INT_SUBCLASS flag set:


 numpy.int_.__flags__  (123)
0

 class foo(int): pass
... 
 foo.__flags__  (123)
8388608

What python can improve in this area is documentation.  See issue9307.

--
resolution:  - invalid
stage:  - committed/rejected
status: open - pending
superseder:  - Py_TPFLAGS_LONG_SUBCLASS is not documented
type:  - behavior
versions: +Python 2.7

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



[issue9306] distutils: raise informative error message when cmd_class is None

2010-07-19 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +merwok
versions:  -Python 2.7, Python 3.3

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



[issue7231] Windows installer does not add \Scripts folder to the path

2010-07-19 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar sridh...@activestate.com:


--
components: +Windows
nosy: +srid
type: behavior - feature request
versions: +Python 3.3 -Python 2.4, Python 2.5, Python 2.6, Python 3.0, Python 
3.1

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



[issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented

2010-07-19 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Here are other similar flags that are not documented:


/* These flags are used to determine if a type is a subclass. */
#define Py_TPFLAGS_INT_SUBCLASS (1L23)
#define Py_TPFLAGS_LONG_SUBCLASS(1L24)
#define Py_TPFLAGS_LIST_SUBCLASS(1L25)
#define Py_TPFLAGS_TUPLE_SUBCLASS   (1L26)
#define Py_TPFLAGS_BYTES_SUBCLASS   (1L27)
#define Py_TPFLAGS_UNICODE_SUBCLASS (1L28)
#define Py_TPFLAGS_DICT_SUBCLASS(1L29)
#define Py_TPFLAGS_BASE_EXC_SUBCLASS(1L30)
#define Py_TPFLAGS_TYPE_SUBCLASS(1L31)

On a similar note, TPFLAGS_IS_ABSTRACT is exposed in the inspect module, but is 
not documented in either inspect module documentation or C API documentation.

I believe that as long as these flags are available from the type objects as 
__flags__, all valid bits should be exposed in inspect module and properly 
documented.

--
components: +Library (Lib)
versions: +Python 2.7, Python 3.2

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



[issue9304] unreproducible example in the memoryview documentation

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Fixed in r82981. Thank you for the report!

--
resolution:  - fixed
status: open - closed

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



[issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented

2010-07-19 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

It would probably be more useful to document them in the C API and put a 
reference to that in the inspect module docs. These flags are primarily useful 
for C extension developers, there's little point checking them from Python code.

--
nosy: +pitrou
versions: +Python 3.1

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



[issue1777412] Python's strftime dislikes years before 1900

2010-07-19 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Adding issue7989 as a dependency because one of the stated reasons for not 
calling system strftime from datetime directly is because pure python 
implementations cannot do the same.  This of course can be resolved by exposing 
raw strftime in separate module (for example _time), but simply applying this 
patch before #7989 would mean that year  1900 would have to be disabled for 
pure python implementation tests.

--
stage:  - patch review
superseder:  - Add pure Python implementation of datetime module to CPython

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



[issue1777412] Python's strftime dislikes years before 1900

2010-07-19 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
dependencies: +Add pure Python implementation of datetime module to CPython
superseder: Add pure Python implementation of datetime module to CPython - 

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



[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Fixed and committed in revision 82977.
And similar changes for py3k in revision 82983.

--
resolution: accepted - fixed
stage:  - committed/rejected
status: open - closed

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



[issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented

2010-07-19 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Mon, Jul 19, 2010 at 2:17 PM, Antoine Pitrou rep...@bugs.python.org wrote:

 .. These flags are primarily useful for C extension developers, there's 
 little point checking them from Python code.

Of course there is: it helps debugging problems in types implemented
in C.  For example, someone working on the numpy issue described in
msg110788, would probably appreciate having
inspect.TPFLAGS_INT_SUBCLASS and would probaly use it in his or hers
unit tests.

My point is: we have __flags__ attribute on type objects exposed in
python there should be a way to interpret what it means without
looking up object.h or C API documentation.

BTW, __flags__ itself could grow a docstring and deserves to be
mentioned in the docs.  Note that copyreg.py uses it to determine
wither a class is dynamically allocated.   Maybe this should also go
to inspect as inspect.isheaptype().

--

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-19 Thread Peter Donis

Peter Donis peterdo...@alum.mit.edu added the comment:

I realized on comparing doctest-fixes2.diff with doctest-fixes1.diff that 
doctest-fixes2.diff doesn't capture the different newlines correctly, so patch 
on my machine wouldn't apply the diff (I had done testing from the modified svn 
checkout without reverting and then re-applying the patch). Uploaded 
doctest-fixes3.diff which is generated using the external diff command (svn 
diff --diff-cmd diff) so that patch will apply it cleanly. Not sure if this is 
something specific to my machine.

--
keywords: +patch
Added file: http://bugs.python.org/file18066/doctest-fixes3.diff

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



[issue459007] Document sys.path on Windows

2010-07-19 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

using/windows.rst seems the best place to add comments from PC/getpathp.c, 
under the “Finding modules” section.

--

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



[issue2454] sha and md5 fixer

2010-07-19 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

The patch looks clean to me although I don't feel qualified to comment on the 
technical aspects.  I've tested it on Windows Vista 32 bit against the 2.7 and 
3.1 maintainance releases and py3k.  The 2.7 run was fine, both 3.x runs failed.

  File c:\release31-maint\lib\lib2to3\fixes\fix_hash.py, line 27
md5: umd5,
^
SyntaxError: invalid syntax

I've stared at the code until I'm blue in the face and can't see what's wrong, 
I'm sure someone else will spot the problem in seconds.

I also noticed a small typo in the rst file modules where deprecated
should read modules were deprecated.

--
nosy: +BreamoreBoy

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



[issue9308] Remove redundant coding cookies from 3.x stdlib

2010-07-19 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

On Mon, Jul 19, 2010 at 2:45 AM, Guido van Rossum gu...@python.org wrote:
 Sounds like a good idea to try to remove redundant cookies *and* to
 remove most occasional use of non-ASCII characters outside comments
 (except for unittests specifically trying to test Unicode features).
 Personally I would use \xXX escapes instead of spelling out the
 characters in shlex.py, for example.

 Both with or without the coding cookies, many ways of displaying text
 files garble characters outside the ASCII range, so it's better to
 stick to ASCII as much as possible.

 --Guido

 On Mon, Jul 19, 2010 at 1:21 AM, Alexander Belopolsky
 alexander.belopol...@gmail.com wrote:
 I was looking at the inspect module and noticed that it's source
 starts with # -*- coding: iso-8859-1 -*-.   I have checked and there
 are no non-ascii characters in the file.   There are several other
 modules that still use the cookie:

 Lib/ast.py:# -*- coding: utf-8 -*-
 Lib/getopt.py:# -*- coding: utf-8 -*-
 Lib/inspect.py:# -*- coding: iso-8859-1 -*-
 Lib/pydoc.py:# -*- coding: latin-1 -*-
 Lib/shlex.py:# -*- coding: iso-8859-1 -*-
 Lib/encodings/punycode.py:# -*- coding: utf-8 -*-
 Lib/msilib/__init__.py:# -*- coding: utf-8 -*-
 Lib/sqlite3/__init__.py:#-*- coding: ISO-8859-1 -*-
 Lib/sqlite3/dbapi2.py:#-*- coding: ISO-8859-1 -*-
 Lib/test/bad_coding.py:# -*- coding: uft-8 -*-
 Lib/test/badsyntax_3131.py:# -*- coding: utf-8 -*-

 I understand that coding: utf-8 is strictly redundant in 3.x.  There
 are cases such as Lib/shlex.py where using encoding other than utf-8
 is justified.  (See
 http://svn.python.org/view?view=revrevision=82560).  What are the
 guidelines for other cases?  Should redundant cookies be removed?
 Since not all editors respect the  -*- cookie, I think the answer
 should be yes particularly when the cookie is setting encoding other
 than utf-8.
 ___
 Python-Dev mailing list
 python-...@python.org
 http://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe: 
 http://mail.python.org/mailman/options/python-dev/guido%40python.org




 --
 --Guido van Rossum (python.org/~guido)


--
assignee: belopolsky
components: Library (Lib)
messages: 110798
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Remove redundant coding cookies from 3.x stdlib

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



  1   2   >