[issue6659] buffer c-api: memoryview object documentation

2009-08-26 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r74551.

--
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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2009-08-26 Thread Daniel Svensson

Daniel Svensson  added the comment:

A typical use case would be for a server to receive a connection, and
then send that connection over to another process that does the actual
work. This used to work with pyprocessing, and the support seems to be
available in multiprocessing.c -> multiprocessing_sendfd, but not used.

--
nosy: +dsvensson

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2009-08-26 Thread Daniel Svensson

Daniel Svensson  added the comment:

And to be clear, I have enabled connection pickling by issuing:

multiprocessing.allow_connection_pickling()

--

___
Python tracker 

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




[issue6784] bytw/unicode string incompatibilities between python2 and and python3

2009-08-26 Thread RonnyPfannschmidt

New submission from RonnyPfannschmidt :

i just noticed that there are some slight differences of the
bytestring/unicodestring pickles between python2/3 using the protocols
0, 1 and 2

the first things i noticed are:

a str from python2 is unpickled as unicode in python3
(fails for byte strings that don't fit whats expected for unicode)


a bytes instance from python3 is pickled as custom class in protocols <3

i'll write a script to try all combinations of protocols and string
variations and transfer directions

--
components: None
messages: 91966
nosy: RonnyPfannschmidt
severity: normal
status: open
title: bytw/unicode string incompatibilities between python2 and and python3
type: behavior
versions: 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



[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-26 Thread RonnyPfannschmidt

Changes by RonnyPfannschmidt :


--
title: bytw/unicode string incompatibilities between python2 and and python3 -> 
byte/unicode pickle incompatibilities between python2 and and python3

___
Python tracker 

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



[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-26 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Why are you reporting this here? If you think there is a bug, can you
propose an alternative behavior that you would consider correct?

The changes you mentioned are all deliberate.

--
nosy: +loewis

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2009-08-26 Thread Daniel Svensson

Daniel Svensson  added the comment:

When reverting this commit stuff works:

http://svn.python.org/view/python/trunk/Lib/multiprocessing/reduction.py?r1=64257&r2=65016

--

___
Python tracker 

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



[issue4892] Sending Connection-objects over multiprocessing connections fails

2009-08-26 Thread Daniel Svensson

Daniel Svensson  added the comment:

Ehm.. completly broken url in prev message.. Revision 65016, "Apply
Amaury's patch to multiprocessing for issue 3125, removes the copy_reg
and replaces it with ForkingPickler.register(), which should resolve the
conflict with the global registry/ctypes" is what I'm refering to.
Without this patch, the reducers/rebuilders are properly registered in
the pickler that connection.h (srsly, code in header files?) later uses.

--

___
Python tracker 

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



[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-26 Thread RonnyPfannschmidt

RonnyPfannschmidt  added the comment:

the basic behavior i want to see for all protocols <= 2

1. python 2 string maps to python3 byte-string
2. python 2 unicode maps to python3 string
3. python 3 string map to python 2 unicode 
4. python 3 bytestring maps to python 2 string

anything else is is confusing and may break
for example one can't unpickle '\xFF' in python3 if it was pickled in
python2

note that these changes seem irrelevant for protocol 3 as python2.x
doesn't support it

--

___
Python tracker 

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-26 Thread R. David Murray

R. David Murray  added the comment:

The python version of the io module does (_pyio.py).

I've set the stage to 'test needed' because the test needs to be turned
into a unit test.

--
nosy: +r.david.murray
priority:  -> normal
stage:  -> test needed
versions: +Python 2.7, 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



[issue6785] IncompleteRead / BadStatus when parsing http://peakoil.mobi

2009-08-26 Thread Evan

New submission from Evan :

(I'm brand new to Python.org, apologies in advance if this has been
recorded elsewhere or is not a bug)

I've a simple script which fetching a url using httplib/urllib2 and then
simply searches the HTML for a string. Works on every URL I've tried
apart from the url http://peakoil.mobi where, for some reason, I get the
following:

Traceback (most recent call last):
  File "C:\Python26\lib\threading.py", line 524, in __bootstrap_inner
self.run()
  File "test.py", line 59, in run
html = response.read()
  File "C:\Python26\lib\socket.py", line 327, in read
data = self._sock.recv(rbufsize)
  File "C:\Python26\lib\httplib.py", line 518, in read
return self._read_chunked(amt)
  File "C:\Python26\lib\httplib.py", line 564, in _read_chunked
raise IncompleteRead(value)
IncompleteRead: 




http://peakoil.com/modules.php?name=AvantGo"; name=mainwindow
framebo
rder=no framespacing=0 marginheight=0 marginwidth=0>


Your browser does not support frames.  We recommend upgrading your
browser.<
/h2>
Click http://peakoil.com/modules.php?name=AvantGo";>here to
enter the site.


Exception in thread 1:
Traceback (most recent call last):
  File "C:\Python26\lib\threading.py", line 524, in __bootstrap_inner
self.run()
  File "test.py", line 51, in run
response = urllib2.urlopen(req)
  File "C:\Python26\lib\urllib2.py", line 124, in urlopen
return _opener.open(url, data, timeout)
  File "C:\Python26\lib\urllib2.py", line 383, in open
response = self._open(req, data)
  File "C:\Python26\lib\urllib2.py", line 401, in _open
'_open', req)
  File "C:\Python26\lib\urllib2.py", line 361, in _call_chain
result = func(*args)
  File "C:\Python26\lib\urllib2.py", line 1130, in http_open
return self.do_open(httplib.HTTPConnection, req)
  File "C:\Python26\lib\urllib2.py", line 1103, in do_open
r = h.getresponse()
  File "C:\Python26\lib\httplib.py", line 951, in getresponse
response.begin()
  File "C:\Python26\lib\httplib.py", line 391, in begin
version, status, reason = self._read_status()
  File "C:\Python26\lib\httplib.py", line 355, in _read_status
raise BadStatusLine(line)
BadStatusLine

--
messages: 91972
nosy: kmoon
severity: normal
status: open
title: IncompleteRead / BadStatus when parsing http://peakoil.mobi
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-26 Thread Iñigo Serna

Iñigo Serna  added the comment:

Q. Why not change getch() to always use get_wch()?

This could break backwards compatibility.
There are some code out there that may use getch() to get the bytes
stream one by one and build the wide char.
In fact I'm using this trick to get unicode chars by now.
Look the thread link in first comment to find the implementation I've
developed for my app. Other people are using similar approaches too.


Q. I think you also want fix getkey() / introduce get_wkey().

In my own experience get_wkey isn't be as useful when dealing with wide
chars. But, of course, that's only my use cases.

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-26 Thread Iñigo Serna

Iñigo Serna  added the comment:

Btw, I don't know if this is the best place to comment it but as it is
somehow related with ncurses...

Other functions I miss a lot are wcwidth() and wcswidth(). 

These functions return the real width (read, cells length in screen) for
unicode strings. 

An example to clarify the issue: one simple Chinese character could need
2 cells on screen, thus len(chinese_unicode_string) won't return the
real screen width needed to show the string.

i.e., len(chinese_unicode_string) != wcswidth(chinese_unicode_string)


Those functions are included into not so old glibc versions (2.2+?), at
least on my Linux systems.

Sadly enough, python doesn't bind them, afaik.
I've tried ctypes but don't work for me (don't know the reason), so I've
written some replacements.

Please look at these files: 

* test_ucs2w.py: benchmarks to different implementations. Most of them,
pure python. Please consider only ucs2w_1x, other are only experiments.

* ucs2w.c: C extension implementation


I think Python could benefit from having these functions in the standard
library. Surely, most simple way should be to bind glibc functions, but
don't know if they exist on other platforms such as MacOS X or Windows.

Neither do I know where they fit... perhaps in unicodedata module.


What do you think? who is the person to convince? (please, don't ask me
to write a PEP, my English is not good enough).

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-26 Thread Iñigo Serna

Changes by Iñigo Serna :


Added file: http://bugs.python.org/file14782/test_ucs2w.py

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-26 Thread Iñigo Serna

Changes by Iñigo Serna :


Added file: http://bugs.python.org/file14783/ucs2w.c

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-26 Thread R. David Murray

R. David Murray  added the comment:

For the title concern of this patch I'm adding akuchling as nosy.

Judging by your post your English probably is good enough to write a PEP
(the PEP editors should help with fine tuning it, at least in theory).
However, I doubt a PEP would be necessary.

As for where to raise the (new) issue...given that these functions are
independent of curses, I'd say open a new issue.  If you do that, I'd
suggest making lemburg nosy on the issue, as he is the original author
of the unicodedata module and many other unicode things in python.

I'm setting the stage to test needed since your test case isn't a unit
test.  I have no idea (never having worked with curses) how hard a unit
test would be to write.  Nor have I reviewed the patch, for the same reason.

--
nosy: +akuchling, r.david.murray
priority:  -> normal
stage:  -> test needed

___
Python tracker 

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-26 Thread Art Gillespie

Art Gillespie  added the comment:

Hi Ryan,

Thanks for the feedback.

I've attached a new patch that fixes the read(nbytes) behavior--It will
now always return the requested number of bytes regardless of newline
replacement.  There's now a unit test for this as well.

I also added the newlines attribute per PEP 278 and a corresponding test.

I'm not sure I understood David's comment that read_test needed to be
turned into a unit test:  it's called by several of the unit tests
(test_read_stored, test_read_deflated, et. al.) in that class.

--
Added file: http://bugs.python.org/file14784/issue6759_2.diff

___
Python tracker 

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-26 Thread R. David Murray

R. David Murray  added the comment:

My apologies, I misread the patch.

--
stage: test needed -> patch review

___
Python tracker 

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



[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-26 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> the basic behavior i want to see for all protocols <= 2
> 
> 1. python 2 string maps to python3 byte-string

That would not be good. Many people create pickles in 2.x where the
string type really represents characters, more often so than they want
it to represent bytes. Giving them bytes on unpickling will likely
cause more problems than the current approach.

> 2. python 2 unicode maps to python3 string

That's the case, right?

> 3. python 3 string map to python 2 unicode 

That's also the case, AFAICT.

> 4. python 3 bytestring maps to python 2 string

Hmm. This may be indeed a mistake. Until r61467, bytes were saved
with the (BIN)STRING code; not sure why this was changed.

--
title: byte/unicode pickle incompatibilities between python2 and and python3 -> 
byte/unicode pickle incompatibilities between python2 and   and python3

___
Python tracker 

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



[issue6786] readline and zero based indexing

2009-08-26 Thread James

New submission from James :

why is it that the zeroth readline history item is seemingly always
none. I would expect this to support zero-based indexing in python, but
perhaps I have missed some detail in readline somewhere. Cheers,
_J


ja...@work:~$ python
Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
>>> readline.get_history_item(0)
>>> readline.get_history_item(0) is None
True
>>> 
ja...@work:~$

--
components: Extension Modules
messages: 91979
nosy: purpleidea
severity: normal
status: open
title: readline and zero based indexing
type: behavior
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



[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-26 Thread RonnyPfannschmidt

RonnyPfannschmidt  added the comment:

Since it breaks for anything non-ascii, its not that helpfull after all
and since python2 strings are encoding-unaware there is no way to fix
it.

It might be preferable to supply unpicklers that are cappable of
coercing if the user really wants wants coercing.

yup
> 
> > 3. python 3 string map to python 2 unicode 
> 
> That's also the case, AFAICT.
yup
> 
> > 4. python 3 bytestring maps to python 2 string
> 
> Hmm. This may be indeed a mistake. Until r61467, bytes were saved
> with the (BIN)STRING code; not sure why this was changed.
Python 3 is indeed evil there.

b'\x80\x02c__builtin__\nbytes\nq\x00]q\x01\x85q\x02Rq\x03.'

I'm convinced that a 1:1 mapping of python2 string from/to python3
bytestrings is the least surprising behaviour and will keep surprising
errors away when needing to communicate between different python
versions.

It just has bitten me, and i suspect will will get others, too.
Unpickle that completely fails in the face of encodings is not desirable
at all.

--

___
Python tracker 

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-26 Thread R. David Murray

R. David Murray  added the comment:

Thanks for working on this.

Comments on patch:

(1) I think you should retain the full "ugly check" comment explaining
how the \r\n spanning a buffer is handled.  I think that's a helpful
explanation for a non-obvious piece of code.

(2) Your code for setting the newlines attributes and the tests for it
look wrong to me.  The attribute is supposed to list all separators
seen.  I think your code is going to set it to ('\r\n', '\r') when the
separators are just '\r\n', and your test doesn't check to make sure
newlines gets set to _only_ what was seen.  (Nor does it check for the
case of actual mixed line endings...a test for which would require some
additional test hackery since the existing test code didn't try to test
mixed line end files either.)

(3) Sorry for being dense, but I don't understand your code to adjust
the number of bytes in the read method or the test that tests it.  I
haven't tried to play with it, but it looks odd to me that you'd be
adding '2', since I would think that the read could cover more than one
line...or am I misunderstanding how 'read(n)' works (which is entirely
possible)?

--

___
Python tracker 

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-26 Thread STINNER Victor

STINNER Victor  added the comment:

inigoserna>> Other functions I miss a lot are wcwidth() and wcswidth()

I wrote a patch to implement unicode.width() method:
http://bugs.python.org/file13357/unicode_width.patch

It's part of the issue #2382 (SyntaxError cursor shifted if multibyte
character is in line)

--
nosy: +haypo

___
Python tracker 

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



[issue6498] Py_Main() does not return on SystemExit

2009-08-26 Thread STINNER Victor

STINNER Victor  added the comment:

Can you propose a patch fixing this issue?

--
nosy: +haypo

___
Python tracker 

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



[issue6518] Enable 'with' statement in ossaudiodev module

2009-08-26 Thread STINNER Victor

STINNER Victor  added the comment:

@agillesp: a Python function should never return NULL without setting an
error. oss_self() have to call a PyErr_(...) function to set an error.
And I would prefer the name "oss_enter" than the unusual name "oss_self".

--
nosy: +haypo

___
Python tracker 

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



[issue4684] sys.exit() exits program when non-daemonic threads are still running

2009-08-26 Thread Joseph Malicki

Joseph Malicki  added the comment:

It seems like this was introduced by the fix for Issue 1566280.

Note that the threading module docs clear state:

"A thread can be flagged as a “daemon thread”. The significance of this
flag is that the entire Python program exits when only daemon threads
are left. The initial value is inherited from the creating thread. The
flag can be set through the daemon property."

This behavior violates it.

The WaitForThreading() fix in Py_Main works only if sys.exit() is not
called, which disagrees with the documentation.

--
nosy: +jmalicki

___
Python tracker 

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



[issue6733] curses line wrap broken when mixing full- and half-width unicode characters

2009-08-26 Thread STINNER Victor

STINNER Victor  added the comment:

Can you write a short example reproducing the bug?

--
nosy: +haypo

___
Python tracker 

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-26 Thread Art Gillespie

Art Gillespie  added the comment:

Hi David,

Thanks for the review.  Patch attached.

(1)  I've moved that comment to the check's new location.

(2)  Fixed the bug and added tests for only one separator.  Also added
test data and tests for mixed eol files.

(3)  I changed this so that when the file is opened with universal
newline support, read(size) makes multiple calls to _do_read until size
bytes are read or EOF is reached.

--
Added file: http://bugs.python.org/file14785/issue6759_3.diff

___
Python tracker 

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



[issue6518] Enable 'with' statement in ossaudiodev module

2009-08-26 Thread Art Gillespie

Art Gillespie  added the comment:

Hi Victor,

I copied both the return NULL behavior in oss_exit and the oss_self
naming from Objects/fileobject.c:

http://paste.pocoo.org/show/136451/

Should they be changed there as well?

--

___
Python tracker 

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



[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-08-26 Thread Todd Whiteman

Todd Whiteman  added the comment:

Is this a duplicate of this already fixed issue: issue5179 ?

--
nosy: +twhitema

___
Python tracker 

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-26 Thread Art Gillespie

Art Gillespie  added the comment:

Just found another bug in the code that sets the newlines attribute. 
Please disregard issue6759_3.diff

--

___
Python tracker 

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



[issue4684] sys.exit() exits program when non-daemonic threads are still running

2009-08-26 Thread R. David Murray

R. David Murray  added the comment:

Attached is a version of your program that calls sys.exit from a thread
other than the main one.  That sys.exit does not cause python to shut
down.  Exiting the main program by "falling off the end" does not result
in Python shutdown (pass an arbitrary argument to the example program to
see this). 

So what we have here, I believe, is a documentation problem, and I've
updated the issue to reflect that.  Please note in particular the last
two caveats in the 'thread' docs; I don't consider these adequate
documentation, but they do seem to be relevant to the issue at hand.

Does this make sense to you?

Note that issue 6634 should also be addressed in any update to the
relevant areas of the documentation.

--
assignee:  -> georg.brandl
components: +Documentation -None
nosy: +georg.brandl, r.david.murray
priority:  -> normal
stage:  -> needs patch
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 3.0
Added file: http://bugs.python.org/file14786/threading_exit_example.py

___
Python tracker 

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



[issue6787] thread docs contain an incorrect link in a reference to the 'exit' method

2009-08-26 Thread R. David Murray

New submission from R. David Murray :

In the Caveats section of the thread docs reference is made to the
'exit' method.  The link generated, instead of being to the exit method
in the thread module, is to the exit 'constant' section 4.

--
assignee: georg.brandl
components: Documentation
messages: 91992
nosy: georg.brandl, r.david.murray
priority: low
severity: normal
stage: needs patch
status: open
title: thread docs contain an incorrect link in a reference to the 'exit' method
versions: Python 2.6, Python 2.7, 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



[issue4684] sys.exit() exits program when non-daemonic threads are still running

2009-08-26 Thread Joseph Malicki

Joseph Malicki  added the comment:

Is it actually just documentation?  Before Python 2.5, things worked
according to the documentation, and nothing in the revisions that
changed the behavior suggested this change in behavior was intentional.

Moving the WaitForThreadShutdown() from Modules/main.c to Py_Finalize()
would also fix this problem - I wonder why that wasn't the original
change, as it more closely mirrors how Python 2.4 worked, and the
documentation suggests?

--

___
Python tracker 

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-26 Thread Art Gillespie

Art Gillespie  added the comment:

Latest patch attached.

* Fixed the code that populates the newlines attribute.  I think I've
covered all the cases...

* Found another deviation from file object behavior in this module: 
Calling read with a negative size parameter does not always return the
remainder of the file as described in
http://docs.python.org/library/stdtypes.html#file.read  I went ahead and
fixed this--please let me know if I should open a separate issue and
submit a separate patch.

* Added more tests for mixed eol files, calling read with a negative
size parameter, reading a file with only crlfs

--
Added file: http://bugs.python.org/file14787/issue6759_4.diff

___
Python tracker 

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



[issue6788] codecs.open on Win32 does not force binary mode

2009-08-26 Thread Ryan McGuire

New submission from Ryan McGuire :

Opening a UTF-8 encoded file with unix newlines ("\n") on Win32:

codecs.open("whatever.txt","r","utf-8").read()

replaces the newlines ("\n") with CR+LF ("\r\n").

The docs specifically say that :

"Files are always opened in binary mode, even if no binary mode was
specified. This is done to avoid data loss due to encodings using 8-bit
values. This means that no automatic conversion of '\n' is done on
reading and writing."

And yet, opening the file with an explicit binary mode resolves the
situation:

codecs.open("whatever.txt","rb","utf-8").read()

This reads the file with the original newlines unmodified.

The implementation of codecs.open and the documentation are out of sync.

--
assignee: georg.brandl
components: Documentation, Library (Lib)
messages: 91995
nosy: EnigmaCurry, georg.brandl
severity: normal
status: open
title: codecs.open on Win32 does not force binary mode
type: behavior
versions: 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