[issue9712] tokenize yield an ERRORTOKEN if the identifier starts with a non-ascii char

2010-08-30 Thread Florent Xicluna

New submission from Florent Xicluna :

from io import BytesIO
from tokenize import tokenize, tok_name

sample = 'éléphants = "un éléphant, deux éléphants, ..."\nprint(éléphants)\n'
sampleb = sample.encode('utf-8')

exec(sample)
# output: un éléphant, deux éléphants, ...
exec(sampleb)
# output: un éléphant, deux éléphants, ...

module = BytesIO()
module.write(sampleb)
module.seek(0)

for line in tokenize(module.readline):
print(tok_name[line.type], line)


# output:
ENCODING TokenInfo(type=57, string='utf-8', start=(0, 0), end=(0, 0), line='')
ERRORTOKEN TokenInfo(type=54, string='é', start=(1, 0), end=(1, 1), 
line='éléphants = "un éléphant, deux éléphants, ..."\n')
NAME TokenInfo(type=1, string='léphants', start=(1, 1), end=(1, 9), 
line='éléphants = "un éléphant, deux éléphants, ..."\n')
OP TokenInfo(type=53, string='=', start=(1, 10), end=(1, 11), line='éléphants = 
"un éléphant, deux éléphants, ..."\n')
STRING TokenInfo(type=3, string='"un éléphant, deux éléphants, ..."', start=(1, 
12), end=(1, 46), line='éléphants = "un éléphant, deux éléphants, ..."\n')
NEWLINE TokenInfo(type=4, string='\n', start=(1, 46), end=(1, 47), 
line='éléphants = "un éléphant, deux éléphants, ..."\n')
NAME TokenInfo(type=1, string='print', start=(2, 0), end=(2, 5), 
line='print(éléphants)\n')
OP TokenInfo(type=53, string='(', start=(2, 5), end=(2, 6), 
line='print(éléphants)\n')
ERRORTOKEN TokenInfo(type=54, string='é', start=(2, 6), end=(2, 7), 
line='print(éléphants)\n')
NAME TokenInfo(type=1, string='léphants', start=(2, 7), end=(2, 15), 
line='print(éléphants)\n')
OP TokenInfo(type=53, string=')', start=(2, 15), end=(2, 16), 
line='print(éléphants)\n')
NEWLINE TokenInfo(type=4, string='\n', start=(2, 16), end=(2, 17), 
line='print(éléphants)\n')
ENDMARKER TokenInfo(type=0, string='', start=(3, 0), end=(3, 0), line='')

--
messages: 115201
nosy: flox
priority: normal
severity: normal
stage: unit test needed
status: open
title: tokenize yield an ERRORTOKEN if the identifier starts with a non-ascii 
char
type: behavior
versions: Python 3.1, Python 3.2

___
Python tracker 

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



[issue9713] Py_CompileString fails on non decode-able paths.

2010-08-30 Thread Campbell Barton

New submission from Campbell Barton :

On linux I have a path which python reads as...

/data/test/num\udce9ro_bad/untitled.blend

os.listdir("/data/test/") returns this ['num\udce9ro_bad']

But the same path cant be given to the C api's Py_CompileString

Where fn is '/data/test/num\udce9ro_bad/untitled.blend/test.py'
 Py_CompileString(buf, fn, Py_file_input);

...gives this error.
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 14-16: invalid 
data

>From this pep, non decode-able paths should use surrogateescape's
http://www.python.org/dev/peps/pep-0383/

--
components: None
messages: 115202
nosy: ideasman42
priority: normal
severity: normal
status: open
title: Py_CompileString fails on non decode-able paths.
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue9119] Python download page needs to mention crypto code in Windows installer

2010-08-30 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Terry J. Reedy wrote:
> 
> Terry J. Reedy  added the comment:
> 
> This is really two issues: docs and windows builds. As for docs:
> 
> Many of the module doc pages mention original authors and give urls for 
> further info. The ssl page already says " This module uses the OpenSSL 
> library." Rather than fuss over whether the doc constitutes 'advertising 
> material' (and a lawyer certain could claim it does), we can easily expand 
> the above to
> 
> "This module includes software developed by the OpenSSL Project for use in 
> the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software 
> written by Eric Young (e...@cryptsoft.com)."
> 
> or whatever would be correct. This wording better meets the attribution 
> requirement *and* is more informative to users.

+1

> The download page currently does not contain the word 'license', which I 
> think is an omission that should be filled. I think it should include 
> something like the following reasonably near the top:
> 
> "The History and License for each version is included with its document set. 
> In layperson's terms, the license more or less says that you can use Python 
> as you wish as long as you 1) do not claim ownership of the name or code, and 
> 2) assume full legal and moral responsibility for the downloading and use of 
> the code, including the cryptographic modules." 

Fine with me. The text should also link to actual current license text:

http://docs.python.org/license.html

BTW: I have a little trouble actually finding the license text on
the python.org web-site. It is not mentioned on the download page,
there's not mention of it in the downloads nav bar, nor in the documentation
section of the site.

Only the "about" section includes a mention of the
license and the "foundation" section even mentions it in the nav bar
(but that's not where people would look to find it). What's worse:
all links point to:

http://www.python.org/psf/license/

and that page refers to the Python 2.6.2 license...

I'll report this to the webmasters.

> Builds: have there been multiple overt requests for no-crypto builds? Do any 
> of the other build providers make such? I think this falls under "These 
> re-packagings often include more libraries or are specialized for a 
> particular application:" -- like being so unfortunate as to live in certain 
> countries.

Many other providers of software builds that include crypto software
either make it obvious that the builds include crypto software in their
licenses (by copying the OpenSSL license into the document) or
on the download page (ticking a checkbox, in case there's an export
issue). Some also put the crypto code into a separate download
(e.g. Java and many Linux distros).

The idea with having a separate download without the crypto code
was just to hint the user at a possible issue without scaring
them away. If we can do the same without requiring a separate
installer that would be even better.

--

___
Python tracker 

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



[issue9119] Python download page needs to mention crypto code in Windows installer

2010-08-30 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Raymond Hettinger wrote:
> 
> Raymond Hettinger  added the comment:
> 
> FYI, there is a section of the docs devoted to notifications and attribution 
> licenses:
> 
> http://docs.python.org/license.html#licenses-and-acknowledgements-for-incorporated-software

Good point. We should add the OpenSSL license to that section
and mention that the code is included in the Windows installer
we ship from python.org.

How does one go about getting that page updated ? Is that just a regular
build of the Python documentation, so only a checkin is needed ?

--

___
Python tracker 

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



[issue843590] 'macintosh' encoding alias for 'mac_roman'

2010-08-30 Thread Martin von Gagern

Martin von Gagern  added the comment:

Maybe I'm missing something here, but r84229 looks to me like aliasing 
'macintosh' to itself, instead of to 'mac_roman'. 'csmacintosh' and 'mac' are 
not included at all, without any comment as to why they have been omitted. 
Makes me wonder why my issue843590_alias.patch wasn't applied as it is, but 
recreated instead.

--

___
Python tracker 

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



[issue9700] semaphore errors on AIX 6.1

2010-08-30 Thread Sébastien Sablé

Sébastien Sablé  added the comment:

This is also related to issue1234: It was the same issue but concerning AIX 
5.2. This patch corrects the problem in the same way but for AIX 6.1.

regards

--

___
Python tracker 

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



[issue9714] urllib2 digest authentication doesn't work when connecting to a Catalyst server.

2010-08-30 Thread Kuno Woudt

New submission from Kuno Woudt :

In the WWW-Authenticate header Catalyst::Authentication::Credential::HTTP sends 
the following value for qop:

qop="auth,auth-int"

This is identical to the example given in section 3.5 of the RFC 
(http://tools.ietf.org/html/rfc2617#section-3.5 ), so I assume this is correct.

urllib2 does not expect multiple values for qop, and only works when qop="auth".

I've managed to work around it with:

class DigestAuthHandler (urllib2.HTTPDigestAuthHandler):
def get_authorization (self, req, chal):
qop = chal.get ('qop', None)
if qop and ',' in qop and 'auth' in qop.split (','):
chal['qop'] = 'auth'

return urllib2.HTTPDigestAuthHandler.get_authorization (self, req, chal)

--
components: Library (Lib)
messages: 115207
nosy: warpr
priority: normal
severity: normal
status: open
title: urllib2 digest authentication doesn't work when connecting to a Catalyst 
server.
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This is an improvement patch for the :mod:`io` documentation.
It adds an user-friendly overview, and makes a couple of other 
fixes/improvements.
There's a problem where I want to make a link to a glossary term while using 
the plural form ("abstract base classes"), and it doesn't work. Can someone 
help me?

--
assignee: d...@python
components: Documentation, IO
files: iodoc.patch
keywords: patch
messages: 115208
nosy: benjamin.peterson, d...@python, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: io doc improvements
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file18679/iodoc.patch

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: http://bugs.python.org/file18679/iodoc.patch

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Added file: http://bugs.python.org/file18680/iodoc.patch

___
Python tracker 

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



[issue1633863] AIX: configure ignores $CC

2010-08-30 Thread Sébastien Sablé

Sébastien Sablé  added the comment:

The workaround that I have been using is to call configure like this:

./configure --with-gcc=${CC}

(I usually define CC like this: export CC=xlc_r)

Python compiles fine on AIX 6.1 with that.

--
nosy: +sable

___
Python tracker 

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



[issue1731717] race condition in subprocess module

2010-08-30 Thread red

red  added the comment:

I'm using an old Plone/Zope Product, PHParser, that uses the popen2 call ... 
same problem for me.
Is there a thread-safe alternative to execute subprocesses in threads? I need a 
patch!!! thanks in advance!!!

--
nosy: +shaphiro

___
Python tracker 

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



[issue9713] Py_CompileString fails on non decode-able paths.

2010-08-30 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +haypo

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, committed in r84357 (py3k) and r84358 (3.1). Backporting to 2.7 would be 
too much work.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Skip Montanaro

Skip Montanaro  added the comment:

A couple wording comments:

"All streams are careful about the type of data you give to them"
would read better as "All streams accept specific types of data".

"The default mode is ``'r'`` (open for reading text, synonym of
``'rt'``)".  I liked the original wording better.

Finally, not specific to this change, but I wonder if rather than
having distinct io.StringIO and io.BytesIO classes it would be better
to have a single io.MemoryIO class which takes mode arguments just
like io.FileIO?  The correspondence between file-based and memory-
based i/o would be more one-to-one.  Such a class could be added
without breaking existing code by using the StringIO and BytesIO
classes as the back-end for a MemoryIO class.

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

2010/8/30 Skip Montanaro :
>
> Skip Montanaro  added the comment:
>
> A couple wording comments:
>
> "All streams are careful about the type of data you give to them"
> would read better as "All streams accept specific types of data".
>
> "The default mode is ``'r'`` (open for reading text, synonym of
> ``'rt'``)".  I liked the original wording better.

Feel free to change it; it's been committed.

>
> Finally, not specific to this change, but I wonder if rather than
> having distinct io.StringIO and io.BytesIO classes it would be better
> to have a single io.MemoryIO class which takes mode arguments just
> like io.FileIO?  The correspondence between file-based and memory-
> based i/o would be more one-to-one.  Such a class could be added
> without breaking existing code by using the StringIO and BytesIO
> classes as the back-end for a MemoryIO class.

What advantage would that have?

--

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> "The default mode is ``'r'`` (open for reading text, synonym of
> ``'rt'``)".  I liked the original wording better.

Well, people use "r" in practice, and "rt" is a somewhat rarer
alternative. We could drop the "synonym..." part entirely.

--

___
Python tracker 

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



[issue9633] pdb go stack up/down

2010-08-30 Thread Meador Inge

Changes by Meador Inge :


--
nosy: +meador.inge

___
Python tracker 

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



[issue9650] format codes in time.strptime docstrings

2010-08-30 Thread Catherine Devlin

Catherine Devlin  added the comment:

> Did my suggestion to alter pydoc output so it always contains a link to the
> enclosing module's documentation not seem like a reasonable compromise?

I actually don't understand how that would help.  The ``pydoc time`` output 
doesn't include any information about the formatting codes (at least, on my 
system).

Also, ``pydoc`` isn't available on Windows systems, is it?  It isn't on mine; 
is that a quirk of my setup?

> Another problem with embedding the format codes in the docstring is that it
> opens up a Pandora's box of other stuff that might be reasonable to include
> in other docstrings, but should probably just be documented in one place
> (perhaps with references elsewhere).  For example, maybe we should add the
> list of signals to the docstrings for signal.signal and os.kill (pretty
> platform-dependent) or add all the format possibilities to the docstring for
> the format() builtin (brand new and probably not well-known to very many
> users).  I'm sure there are other candidates.  It can be difficult to know
> where to draw the line.

Yes, certainly, in one place - but isn't it logical for the docstring to be 
that one place?  Universal convenient access, and the least risk that it will 
get out of synch with the code.

Here's where I would suggest drawing the line: if the method is unusable 
without the information, and it's not easy to guess or remember, and it's 
relatively concise, it should be in the docstring.

Is that a Pandora's box or a set of good suggestions?  :)  Probably not stuff 
that is strongly platform-dependent, but for format(), for example, I think 
that's a good idea.  I don't think there's anything wrong with setting a 
precedent that could lead to more useful docstrings in several different places.

Anyway, I would settle for a suggestion in the docstring to run ``man 
strftime``, but only if there's some Windows equivalent; does anybody know of 
one?

--

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Skip Montanaro

Skip Montanaro  added the comment:

>> Finally, not specific to this change, but I wonder if rather than
>> having distinct io.StringIO and io.BytesIO classes it would be better
>> to have a single io.MemoryIO class which takes mode arguments just
>> like io.FileIO?  The correspondence between file-based and memory-
>> based i/o would be more one-to-one.  Such a class could be added
>> without breaking existing code by using the StringIO and BytesIO
>> classes as the back-end for a MemoryIO class.

Benjamin> What advantage would that have?

File I/O and memory I/O would have more uniform in their APIs and thus be
easier to document, describe and use.  Currently, one class is used to do
file I/O.  The type of I/O done is controlled by the mode and buffering
flags.  Two distinct classes are used to do memory I/O.

If someone wanted to select between file and memory I/O at runtime it
wouldn't be possible to just swap the class using the current code.

Skip

--

___
Python tracker 

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



[issue9715] io doc improvements

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> File I/O and memory I/O would have more uniform in their APIs and thus be
> easier to document, describe and use.  Currently, one class is used to do
> file I/O.

That's wrong. Various classes are used for file I/O: FileIO,
Buffered{Reader,Writer,Random}, TextIOWrapper.

> If someone wanted to select between file and memory I/O at runtime it
> wouldn't be possible to just swap the class using the current code.

Why would you swap the class since the constructor arguments would be
different anyway?

--

___
Python tracker 

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



[issue9712] tokenize yield an ERRORTOKEN if the identifier starts with a non-ascii char

2010-08-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

r84364

--
nosy: +benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9650] format codes in time.strptime docstrings

2010-08-30 Thread Skip Montanaro

Skip Montanaro  added the comment:

>> Did my suggestion to alter pydoc output so it always contains a link
>> to the enclosing module's documentation not seem like a reasonable
>> compromise?

Catherine> I actually don't understand how that would help.  The ``pydoc
Catherine> time`` output doesn't include any information about the
Catherine> formatting codes (at least, on my system).

No, but it does include a link to the full documentation for the time
module, so should you need more than is in the docstring, in theory
everything you might want would only be one or two clicks away.

Catherine> Also, ``pydoc`` isn't available on Windows systems, is it?
Catherine> It isn't on mine; is that a quirk of my setup?

You can fire up a documentation server using

python -m pydoc -g

which starts an HTTP server available to dispense documentation for
everything in your PYTHONPATH.  You can search for "strftime" there, and
after a fairly long pause it will present you with a link you can click to
get the time module docs.  (I think there is a bug in the way it handles
errors during import of the various modules.)

Alternatively, click the "open browser" button and you will be directed to
the front page of the content it serves.  The resulting user interface is
fairly crude, but if you search for "time" (it's in the lib-dynload section)
and click the link provided, it pops up the pydoc documentation for the time
module.  From there you can click the Module Docs link in the upper
right-hand corner to be taken to the full documentation for the time module.

Catherine> Yes, certainly, in one place - but isn't it logical for the
Catherine> docstring to be that one place?

I think most people would argue, "no".  Docstrings are helpers.  The library
reference manual is supposed to be comprehensive.

Catherine> Here's where I would suggest drawing the line: if the method
Catherine> is unusable without the information, and it's not easy to
Catherine> guess or remember, and it's relatively concise, it should be
Catherine> in the docstring.

This would be a pretty radical change to the documentation.  You're asking
that either

* Docstrings become the comprehensive source of information instead of
  the library reference manual, or

* A fair amount of information be duplicated between the library
  reference manual and the docstrings.

I suggest this discussion be moved to the doc-...@python.org mailing list.
Those are the people who would be best equipped to discuss the overall
topic.  I'm just a single user with my personal perspective on the topic.
I'm not the guy who makes these decisions.

Skip

--

___
Python tracker 

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



[issue9700] semaphore errors on AIX 6.1

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch committed in r84366 (py3k), r84367 (3.1), r84368 (2.7). Thanks for your 
contribution!

--
nosy: +pitrou
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions:  -Python 2.6, Python 3.3

___
Python tracker 

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



[issue9711] ssl.SSLSocket's keyfile argument seems to be ignored if specified without certfile

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Good catch. keyfile without certfile should be forbidden, and raise a 
ValueError.

--
components: +Library (Lib)
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.2

___
Python tracker 

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



[issue9711] ssl.SSLSocket's keyfile argument seems to be ignored if specified without certfile

2010-08-30 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Are we sure? Do we have a reference which states that?

--

___
Python tracker 

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



[issue9711] ssl.SSLSocket's keyfile argument seems to be ignored if specified without certfile

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Not really, but in previous versions it would fail as soon as you try to 
connect:

>>> s = ssl.wrap_socket(socket.socket(), keyfile="XXX")
>>> s.connect(("svn.python.org", 443))
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/antoine/cpython/27/Lib/ssl.py", line 295, in connect
self.ca_certs, self.ciphers)
ssl.SSLError: _ssl.c:289: Both the key & certificate files must be specified

It's better to catch the problem up-front, though. As for whether SSLError or 
ValueError should be preferred, I think ValueError is cleaner (it's really a 
bad use of the API).

--

___
Python tracker 

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



[issue7546] msvc9compiler.py: add .asm extension

2010-08-30 Thread Stefan Krah

Stefan Krah  added the comment:

I have a new patch with tests, but I'm not quite satisfied with it.

The remaining problem is that the choice of ml64 or ml is fragile
if a user has executed `vcvarsall xyz`, and we attempt to use the
resulting environment.

For example, if `vcvarsall amd64` has been executed once in a command
line window, a subsequent `vcvarsall x86` will not reset the environment
sufficiently, so ml64 is detected and the x86 build will fail.


But in general this patch should work.

--
Added file: http://bugs.python.org/file18681/vcasm2.patch

___
Python tracker 

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



[issue7546] msvc9compiler.py: add .asm extension

2010-08-30 Thread Stefan Krah

Stefan Krah  added the comment:

For Visual Studio Express this issue depends on issue 7511.

--
dependencies: +msvc9compiler.py: ValueError: [u'path']

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-08-30 Thread Stefan Krah

Stefan Krah  added the comment:

> Stefan (sorry for the misattribution in my previous message), can you test 
> with 3.2 and 3.1 and adjust versions if needed?

Not easily at the moment. I just noticed that I replaced my only
Express installation with a Pro trial-edition.

Anyone else?

--

___
Python tracker 

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



[issue9704] 3.2 - zlib.pc.in is missing in source tree

2010-08-30 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

On 2010-08-28, at 12:48 AM, Martin v. Löwis wrote:

> 
> Martin v. Löwis  added the comment:
> 
> Ok, I have now added these files in r84332.

Thanks!

--

___
Python tracker 

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



[issue1351020] PythonD DJGPP-specific patch set for porting to DOS.

2010-08-30 Thread Mark Lawrence

Mark Lawrence  added the comment:

@Ben are you still interested in this or can it be closed?

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue1353344] python.desktop

2010-08-30 Thread Mark Lawrence

Mark Lawrence  added the comment:

3 weeks since msg113207 and no response.  Seriously, what is a reasonable time 
before closing as out of date?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1353344] python.desktop

2010-08-30 Thread Georg Brandl

Georg Brandl  added the comment:

That depends.  Especially feature requests need not be closed prematurely.

--

___
Python tracker 

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



[issue1367631] maximum length not enforced in cgi.parse()

2010-08-30 Thread Mark Lawrence

Mark Lawrence  added the comment:

No reply to msg109880.

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

___
Python tracker 

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



[issue1372650] Cookie and multiple names

2010-08-30 Thread Mark Lawrence

Mark Lawrence  added the comment:

A patch is attached to #1375011.

--
dependencies:  -Improper handling of duplicate cookies
nosy: +BreamoreBoy
resolution:  -> duplicate
status: open -> closed
superseder:  -> Improper handling of duplicate cookies

___
Python tracker 

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



[issue1351020] PythonD DJGPP-specific patch set for porting to DOS.

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I don't think there's any point in including DJGPP support in the Python tree 
(DJGPP targets MS-DOS, which is completely marginal today). Furthermore, the 
patch has no chance of applying cleanly on the current source tree. I would 
suggest that people interested in a DJGPP port of Python mantain their patches 
themselves instead, it will be far easier and more efficient.

--
nosy: +pitrou
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue9716] The inittab modules cannot be packages

2010-08-30 Thread Kay Hayen

New submission from Kay Hayen :

Hello,

I try to include modules with PyImport_AppendInittab or PyImport_ExtendInittab 
and that works fine. But if these modules are part of a package, i.e. I provide 
"package_name.module_name" as the name, they never get considered.

Is there any way to add a package with modules below it from C/API? So that an 
import package_name.module_name from other modules will find it?

Yours,
Kay Hayen

--
messages: 115235
nosy: kayhayen
priority: normal
severity: normal
status: open
title: The inittab modules cannot be packages
type: feature request
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue9711] ssl.SSLSocket's keyfile argument seems to be ignored if specified without certfile

2010-08-30 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Fixed in r84370.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9717] operator module - "in place" operators documentation

2010-08-30 Thread Arnaud Delobelle

New submission from Arnaud Delobelle :

More detailed explanation of how in place operators work, and how they are 
related to the operator module iadd, isub, ... functions.

Submitted following this message on python-list:

http://mail.python.org/pipermail/python-list/2010-August/1254243.html

--
assignee: d...@python
components: Documentation
files: operator_inplace.diff
keywords: patch
messages: 115237
nosy: arno, d...@python
priority: normal
severity: normal
status: open
title: operator module - "in place" operators documentation
versions: Python 3.3
Added file: http://bugs.python.org/file18682/operator_inplace.diff

___
Python tracker 

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



[issue1353344] python.desktop

2010-08-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I asked because there was no such thing in the Unix I once used and I have 
never used Linux (yet). I take Georg's answer to mean that this is not 
obviously obsolete and should be left open.

--

___
Python tracker 

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



[issue9693] asynchat push_callable() patch

2010-08-30 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Updated patch which fixes a little test error.

--
Added file: http://bugs.python.org/file18683/asynchat-push-callable.patch

___
Python tracker 

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



[issue9718] Python Interpreter Crash

2010-08-30 Thread quindraco

New submission from quindraco :

I am attaching my stacktrace from using Python 2.6, but I get identical 
behaviour in 2.7.  I suspect that at least one of the underlying modules I'm 
using is broken, but the interpreter shouldn't crash just because an external 
module is broken, so I'm reporting the issue.  That's what's happening - I'm 
crashing the python interpreter.  Here's what I type to cause the issue; I'm 
not sure what more information is needed.

from django.test.client import Client
c = Client()
response = c.post(logindir, loginvars)
response = c.get(getdir)

--
components: None
files: stacktrace.txt
messages: 115240
nosy: quindraco
priority: normal
severity: normal
status: open
title: Python Interpreter Crash
type: crash
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file18684/stacktrace.txt

___
Python tracker 

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



[issue9714] urllib2 digest authentication doesn't work when connecting to a Catalyst server.

2010-08-30 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +orsenthil
versions:  -Python 2.5, Python 2.6, Python 3.3

___
Python tracker 

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



[issue9693] asynchat push_callable() patch

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Some comments:

- the signature in the doc is not the same as in the code: (fun, args, kwds) 
instead of (fun, *args, **kwds)
- I don't understand what _Callable is used for; why not just a tuple?
(or a function if you prefer)
- if you use _Callable, then why do you write "hasattr(first, '__call__')" 
rather than simply "isinstance(first, _Callable)"?
- why override __bool__??

The API also looks a bit weird to me - the Twisted model of Deferreds is so 
much better - but why not.

--

___
Python tracker 

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



[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-30 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Like Mark, I too see an error with ctypes due to this change:

*** WARNING: renaming "_ctypes" since importing it failed: 
dlopen(build/lib.macosx-10.5-intel-3.2/_ctypes.so, 2): Symbol not found: 
_ffi_closure_alloc
  Referenced from: 
/Users/sridharr/as/apy/branches/32a1ssl1/build/pyhg_branches_py3k-macosx-hgtip32/python/build/lib.macosx-10.5-intel-3.2/_ctypes.so
  Expected in: flat namespace
 in 
/Users/sridharr/as/apy/branches/32a1ssl1/build/pyhg_branches_py3k-macosx-hgtip32/python/build/lib.macosx-10.5-intel-3.2/_ctypes.so

MacOSX 10.6 | built with 10.5 SDK | i386 and x86_64 arch | ActivePython 3.2 
internal build

--
nosy: +srid

___
Python tracker 

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



[issue9719] build_ssl.py: cannot find 'asm64/*.*'

2010-08-30 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

With openssl-1.0.0a, I get the following error when building the py3k branch on 
Windows 64-bit:

Traceback (most recent call last):
  File "build_ssl.py", line 262, in 
main()
  File "build_ssl.py", line 234, in main
for f in os.listdir("asm"+dirsuffix):
WindowsError: [Error 3] The system cannot find the path specified: 'asm64/*.*'

Likely due to this commit
http://svn.python.org/view/python/branches/py3k/PCbuild/build_ssl.py?r1=83288&r2=83335

--
components: Build, Windows
messages: 115243
nosy: loewis, srid
priority: normal
severity: normal
status: open
title: build_ssl.py: cannot find 'asm64/*.*'
versions: Python 3.2

___
Python tracker 

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



[issue9719] build_ssl.py: cannot find 'asm64/*.*'

2010-08-30 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

I cannot arrive at a possible rationale behind that commit, as the only '*.asm' 
file I see in the openssl-1.0.0a/ directory is ms\update.asm.

--

___
Python tracker 

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



[issue9719] build_ssl.py: cannot find 'asm64/*.*'

2010-08-30 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar :


--
type:  -> compile error

___
Python tracker 

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



[issue9718] Python Interpreter Crash

2010-08-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This seems to be a pyodbc problem, you should post the issue to them.
When an extension module written in C (pyodbc.so) has an issue, there's nothing 
Python can do to prevent it from crashing the whole process, since C is an 
insecure language.

--
nosy: +pitrou
resolution:  -> invalid
status: open -> pending

___
Python tracker 

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



[issue1868] threading.local doesn't free attrs when assigning thread exits

2010-08-30 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2010-08-30 Thread Stefan Krah

Stefan Krah  added the comment:

I see the same crash in test_capi, qemu, Windows 7, Debug|x64. The
function crash_no_current_thread() introduced in r81142 ultimately
calls Py_FatalError, which then aborts.

--
nosy: +skrah

___
Python tracker 

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



[issue9718] Python Interpreter Crash

2010-08-30 Thread quindraco

quindraco  added the comment:

I thought as much, so I've already posted on the pyodbc bug tracker, but thanks 
for the second opinion; I wasn't sure.  

I realise modules written in C can't be prevented from crashing, but is it 
really impossible to keep the interpreter from going down with the module?  
Surely some sort of sandbox could be put up.

--
status: pending -> open

___
Python tracker 

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



[issue9718] Python Interpreter Crash

2010-08-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Well, that's a another issue completely.

--
nosy: +benjamin.peterson
status: open -> closed

___
Python tracker 

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



[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2010-08-30 Thread Stefan Krah

Stefan Krah  added the comment:

I just see that the test is running as expected:

_testcapi.crash_no_current_thread() is running in a subprocess, so
the abort() is harmless on Linux. On Windows, abort() causes the
pop-ups, apparently even when it occurs in a subprocess.

Perhaps we should generally use an ABORT() macro, which translates to
exit() on Windows.

--

___
Python tracker 

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



[issue9720] zipfile writes incorrect local file header for large files in zip64

2010-08-30 Thread Craig de Stigter

New submission from Craig de Stigter :

Steps to reproduce:

# create a large (>4gb) file
f = open('foo.txt', 'wb')
text = 'a' * 1024**2
for i in xrange(5 * 1024):
f.write(text)
f.close()

# now zip the file
import zipfile
z = zipfile.ZipFile('foo.zip', mode='w', allowZip64=True)
z.write('foo.txt')
z.close()


Now inspect the file headers using a hex editor. The written headers are 
incorrect. The filesize and compressed size should be written as 0x and 
the 'extra field' should contain the actual sizes.


Tested on Python 2.5 but looking at the latest code in 3.2 it still looks 
broken.

The problem is that the ZipInfo.FileHeader() is written before the filesize is 
populated, so Zip64 extensions are not written. Later, the sizes in the header 
are written, but Zip64 extensions are not taken into account and the filesize 
is just wrapped (7gb becomes 3gb, for instance).

My patch fixes the problem on Python 2.5, it might need minor porting to fix 
trunk. It works by assigning the uncompressed filesize to the ZipInfo header 
initially, then writing the header. Then later on, I re-write the header (this 
is okay since the header size will not have increased.)

--
components: Library (Lib)
files: zipfile_zip64_header.patch
keywords: patch
messages: 115250
nosy: craigds
priority: normal
severity: normal
status: open
title: zipfile writes incorrect local file header for large files in zip64
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file18685/zipfile_zip64_header.patch

___
Python tracker 

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



[issue1367631] maximum length not enforced in cgi.parse()

2010-08-30 Thread R. David Murray

Changes by R. David Murray :


--
status: closed -> languishing

___
Python tracker 

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



[issue1351020] PythonD DJGPP-specific patch set for porting to DOS.

2010-08-30 Thread Ben Decker

Ben Decker  added the comment:

Closed then. The next patch will posted at http://www.caddit.net/pythond/when 
we get around to doing a version 3 port.

Frankly, as the current v2 binary meets most remaining requirements on this 
legacy platform, we are left with modern syntax compatibility as primary (only) 
impetus for further patches.

--

___
Python tracker 

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



[issue9721] urlparse.urljoin() cuts off last base character with semicolon at url start

2010-08-30 Thread Bastian Kleineidam

New submission from Bastian Kleineidam :

The urljoin() implementation cuts off the last base URL
character if the URL to join starts with a semicolon.
Expected output is no cut off characters.

$ python2.6
Python 2.6.6 (r266:84292, Aug 29 2010, 12:36:23) 
[GCC 4.4.5 20100824 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urlparse
>>> print urlparse.urljoin('http://localhost:8080/feedback', ';jsessionid=XXX')
http://localhost:8080/feedbac;jsessionid=XXX
>>> 

... same in Python 3.1.2:

$ python3.1
Python 3.1.2 (release31-maint, Aug 29 2010, 18:45:17) 
[GCC 4.4.5 20100824 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib.parse
>>> urllib.parse.urljoin('http://localhost:8080/feedback', ';jsessionid=XXX')
'http://localhost:8080/feedbac;jsessionid=XXX'
>>>

... in Python 2.5 the last path segment is cut off.
$ python2.5
Python 2.5.5 (r255:77872, Aug 23 2010, 02:55:15) 
[GCC 4.4.5 20100816 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
m>>> import urlparse
>>> print urlparse.urljoin('http://localhost:8080/feedback', ';jsessionid=XXX')
http://localhost:8080/;jsessionid=XXX
>>>

--
components: Library (Lib)
messages: 115252
nosy: calvin
priority: normal
severity: normal
status: open
title: urlparse.urljoin() cuts off last base character with semicolon at url 
start
type: behavior
versions: Python 2.5, Python 2.6, Python 3.1

___
Python tracker 

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



[issue9721] urlparse.urljoin() cuts off last base character with semicolon at url start

2010-08-30 Thread Bastian Kleineidam

Bastian Kleineidam  added the comment:

Update: the python2.5 behaviour is the expected and what I think the correct 
output.

--
versions:  -Python 2.5

___
Python tracker 

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