[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-05-21 Thread Tomas Hoger

Tomas Hoger tho...@redhat.com added the comment:

+   - If the name of an existing script is passed in ``argv[0]``, its absolute
+ path is prepended to :data:`sys.path`

Absolute path to the directory where script is located.  And I believe there's 
no absolute path guarantee for platforms without realpath / GetFullPathName.

Should the documentation also give some guidance to those that embed python and 
don't want to start using SetArgvEx right away and break compatibility with 
older python versions?  Something like:

If you're embedding python in your application, using SetArgv and don't want 
modified sys.path, call PyRun_SimpleString(sys.path.pop(0)\n); after SysArgv 
to unconditionally drop the first sys.path argument added by SetArgv.

--

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



[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Pascal Chambon

Pascal Chambon chambon.pas...@gmail.com added the comment:

This would require patching separately py2k and py3k visibly...
I'll have a look at it when I have time.

--

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




[issue1289118] timedelta multiply and divide by floating point

2010-05-21 Thread Mark Dickinson

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

Alexander, I still don't understand your objection.  What's the downside of 
allowing the multiplication or division of a timedelta by a float?

Perhaps it's true that there are applications where timedeltas are best viewed 
as integers (with an implicitt 'microsecond' unit), but I think it's also true 
that there are plenty of applications where they're just regarded as a 
representation of a physical quantity, and there this proposal seems entirely 
appropriate.

I *would* want the timedelta * float and timedelta / float operations to be 
correctly rounded, so that behaviour is entirely predictable;  the current 
patch doesn't do that.  But it wouldn't be hard to implement:  there are 
functions available to express a float as a quotient of two integers, and after 
that the computation can be performed in integer arithmetic.

--

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



[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Do you have set the PYTHONHOME environment variable? this does not work from a 
build directory.

--

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



[issue8720] undo findsource regression/change

2010-05-21 Thread holger krekel

holger krekel holger.kre...@gmail.com added the comment:

David, your getsourcefile.patch looks fine (and better than mine) to me.

--

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



[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Ray.Allen

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

pakal wrote:

In test_fileio, one of the tests wants to ensure writing to closed raw streams 
fails, but it actually tries to write an unicode string


I don't understand. Isn't b'xxx' and 'xxx' the same in py2.x? They are not 
unicode string, but bytes string.

--
nosy: +ysj.ray

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



[issue1289118] timedelta multiply and divide by floating point

2010-05-21 Thread Mark Dickinson

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

Python reference implementation showing how to do correct rounding.

--
Added file: http://bugs.python.org/file17426/timedelta_arith.py

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



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-05-21 Thread Antoine Pitrou

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

 Absolute path to the directory where script is located.  And I believe
 there's no absolute path guarantee for platforms without realpath /
 GetFullPathName.

Yes, this is more precise indeed. As for realpath(), I would expect it
to be present on modern Unices (man page says 4.4BSD, POSIX.1-2001).

 If you're embedding python in your application, using SetArgv and
 don't want modified sys.path, call
 PyRun_SimpleString(sys.path.pop(0)\n); after SysArgv to
 unconditionally drop the first sys.path argument added by SetArgv.

I suppose 
  PyRun_SimpleString(import sys; sys.path.pop(0)\n);
would be better.
Thanks for the comments, I'll update the patch.

--

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



[issue4870] ssl module is missing SSL_OP_NO_SSLv2

2010-05-21 Thread Antoine Pitrou

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

This was committed in r81392.

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

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



[issue1289118] timedelta multiply and divide by floating point

2010-05-21 Thread Mark Dickinson

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

N.B.  There's already logic for doing div_nearest (i.e., divide one integer by 
another, returning the closest integer to the result) in the long_round 
function in Objects/longobject.c.  It might be worth pulling that logic out and 
making it available in a _Py function so that it can be reused in other modules.

--

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



[issue8720] undo findsource regression/change

2010-05-21 Thread holger krekel

holger krekel holger.kre...@gmail.com added the comment:

Well, maybe we could introduce a linecache.setlines function to give
the linecache module control over its internal caching and data
handling. What do you think?

--

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



[issue8774] tabnanny improperly handles non-ascii source files

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Commited: r81393 (py3k), r81394 (3.1).

--
resolution:  - fixed
status: open - closed

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



[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Pascal Chambon

Pascal Chambon chambon.pas...@gmail.com added the comment:

yes, but the same tests are used for py3k as well, where xxx is interpreted 
as unicode (2to3 tools dont try to guess if a py2k string intended to be a byte 
string or an unicode one).

--

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



[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Antoine Pitrou

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

test_fileio and test_io both use from __future__ import unicode_literals, 
which means classical string literals construct unicode strings rather than 
byte strings.
So, yes, Pascal is right, this should be corrected (both the tests, and the 
implementation so that it refuses unicode arguments).

--

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



[issue4007] make clean fails to delete .a and .so.X.Y files

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Yes, make clean should remove *.a and *.so.* files. The patch looks ok.

--
nosy: +haypo

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



[issue2736] datetime needs an epoch method

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 As you explain in your own documentation, the proposed method 
 is equivalent to ``(time.mktime(self.timetuple()), self.microsecond)``,
 so all it does is replacing a less than a one-liner.

a one-liner, but an horrible one liner :-) I don't like mixing datetime and 
time modules. I prefer to use only datetime, I prefer its API.

  ... If the tzinfo of the datetime object does not match the 
 system TZ used by mktime, the result will be quite misleading.

Can you suggest a possible fix to take care of the timezone information? I 
don't know how to use that.

--

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



[issue2736] datetime needs an epoch method

2010-05-21 Thread Antoine Pitrou

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

I agree with Victor that the APIs need improving, even if it involves providing 
obvious replacements of obscure one-liners. As an occasional user of datetime 
and time modules, I have too often wanted to curse those limited, awkwardly 
inconsistent APIs.

Just my 2 seconds of course :-)

--

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



[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread Matthias Troffaes

Changes by Matthias Troffaes matthias.troff...@gmail.com:


Added file: 
http://bugs.python.org/file17427/py3k-rev81387-clearfreelist-dict_set_list.patch

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



[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread Matthias Troffaes

Changes by Matthias Troffaes matthias.troff...@gmail.com:


Added file: 
http://bugs.python.org/file17428/py3k-rev81387-clearfreelist-gc_collect.patch

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



[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread Matthias Troffaes

Changes by Matthias Troffaes matthias.troff...@gmail.com:


Added file: 
http://bugs.python.org/file17429/py3k-rev81387-clearfreelist-time_gc_collect.patch

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



[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread Matthias Troffaes

Matthias Troffaes matthias.troff...@gmail.com added the comment:

I uploaded updates of the three relevant patches against the current revision 
of the py3k branch, as the old patches no longer applied cleanly due to 
whitespace changes.

To summarize:

* The first patch, py3k-rev81387-clearfreelist-dict_set_list.patch, simply adds 
freelist methods to the public API for dict, list, and set. No opposition has 
been expressed against this, so I hope this can be accepted.

* The second patch, py3k-rev81387-clearfreelist-gc_collect.patch, adds calls to 
these methods to gc.collect() - some opposition was expressed against the 
(already present before my patch!!) method of freeing lists during highest 
generation garbage collection. I attempted to measure the actual time spent on 
freeing the freelists in a simply python program which does a lot of allocation 
(attached as py3k-freelist_test.py). This apparently shows that clearing the 
freelists does not affect timing much at all.

* The third patch, file py3k-rev81387-clearfreelist-time_gc_collect.patch, 
causes estimates of the time spent on freeing the freelists to be printed to 
the console, and is obviously for testing/benchmarking purpose only.

* The tp_free_list patch is no longer relevant (see comment by Guido).

Hoping for a conclusion of this issue,
Matthias

--

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



[issue8780] py3k: child process don't inherit stdout / stdout

2010-05-21 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

The following code works on 2.6, 2.7 (trunk), 3.1, but not on py3k.

import subprocess, sys
subprocess.call([sys.executable, '-c', 'print(Hello World!)'])

On py3k, sys.stdout and sys.stderr are equal to... None.

I hope that it's a problem with my setup.

--
components: Interpreter Core, Library (Lib)
messages: 106232
nosy: haypo
priority: normal
severity: normal
status: open
title: py3k: child process don't inherit stdout / stdout
versions: Python 3.2

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



[issue8780] py3k: child process don't inherit stdout / stdout

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

(doesn't work means that the example doesn't print anything)

--

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



[issue8780] py3k: child process don't inherit stdout / stdout

2010-05-21 Thread Antoine Pitrou

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

It's just under Windows, right?

--
assignee:  - brian.curtin
components: +Windows
nosy: +brian.curtin, pitrou
priority: normal - critical

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



[issue8781] 32-bit wchar_t doesn't need to be unsigned to be usable (I think)

2010-05-21 Thread Daniel Stutzbach

New submission from Daniel Stutzbach dan...@stutzbachenterprises.com:

If ./configure detects that the system's wchar_t type is compatible, it will 
define #define PY_UNICODE_TYPE wchar_t and enable certain optimizations when 
converting between Py_UNICODE and wchar_t (i.e., it can just do a memcpy).

Right now, ./configure considers wchar_t to be compatible if it is the same 
bit-width as Py_UNICODE and if wchar_t is unsigned.  In practice, that means 
Python only uses wchar_t on Windows, which uses an unsigned 16-bit wchar_t.  On 
Linux, wchar_t is 32-bit and signed.

In the original Unicode implementation for Python, Py_UNICODE was always 
16-bit.  I believe the unsigned requirement heralds back to that time.  A 
32-bit wchar_t gives us plenty of space to hold the maximum Unicode code point 
of 0x10, regardless of whether wchar_t is signed or unsigned.

I believe the condition could be relaxed to the following:
- wchar_t must be the same bit-width as Py_UNICODE, and
- if wchar_t is 16-bit, it must be unsigned

That would allow a UCS4 Python to use wchar_t on Linux.

I experimented by manually tweaking my pyconfig.h to treat Linux's signed 
32-bit wchar_t as compatible.  The unit test suite encountered no problems.

However, it's quite possible that I'm missing some important detail here.  
Someone familiar with the guts of Python's Unicode implementation  will 
presumably have a much better idea of whether I have this right or not. ;-)

--
components: Interpreter Core, Unicode
messages: 106235
nosy: stutzbach
priority: normal
severity: normal
stage: needs patch
status: open
title: 32-bit wchar_t doesn't need to be unsigned to be usable (I think)
type: performance
versions: Python 3.2

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



[issue8781] 32-bit wchar_t doesn't need to be unsigned to be usable (I think)

2010-05-21 Thread Antoine Pitrou

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

The problem with a signed Py_UNICODE is implicit sign extension (rather than 
zero extension) in some conversions, for example from char or unsigned char 
to Py_UNICODE. The effects could go anywhere from incorrect results to plain 
crashes. Not only in our code, but in C extensions relying on the unsignedness 
of Py_UNICODE.

Is there a way to enable those optimizations while keeping an unsigned 
Py_UNICODE type? It seems Py_UNICODE doesn't have to be typedef'ed to wchar_t, 
it can be defined to be an unsigned integer of the same width. Or would it 
break some part of the C standard?

--
nosy: +lemburg, loewis, pitrou

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



[issue8780] py3k: child process don't inherit stdout / stdout on Windows

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 It's just under Windows, right?

It works on Linux. I suppose that the issue is specific to Windows.

--
title: py3k: child process don't inherit stdout / stdout - py3k: child process 
don't inherit stdout / stdout on Windows

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



[issue8780] py3k: child process don't inherit stdout / stdout on Windows

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Recent change of subprocess in py3k, I don't know if it's related: r78946.

--

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



[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-21 Thread Orlando Irrazabal

Orlando Irrazabal oirr...@mendoza.gov.ar added the comment:

Amoury, you are right, when i unset the PYTHONHOME environment variable 
the program run. The output was:

r...@host:python-2.6.5# ./python -m test.regrtest -w
test_grammar
test_opcodes
test_dict
test_builtin
test_exceptions
test_types
test_unittest
test_doctest
test_doctest skipped -- No module named thread
test_doctest2
test_MimeWriter
test_SimpleHTTPServer
test_StringIO
test___all__
test___future__
test__locale
test_abc
test_abstract_numbers
test_aepack
test_aepack skipped -- No module named aepack
test_aifc
test_al
test_al skipped -- No module named al
test_anydbm
test_applesingle
test_applesingle skipped -- No module named macostools
test_array
test_ast
test_asynchat
test_asynchat skipped -- No module named thread
test_asyncore
test_asyncore skipped -- No module named thread
test_atexit
test_audioop
test_augassign
test_base64
test_bastion
test_bigaddrspace
test_bigmem
test_binascii
test_binhex
test_binop
test_bisect
test_bool
test_bsddb
test_bsddb skipped -- No module named _bsddb
test_bsddb185
test_bsddb185 skipped -- No module named bsddb185
test_bsddb3
test_bsddb3 skipped -- Use of the `bsddb' resource not enabled
test_buffer
test_bufio
test_bytes
test_bz2
test_bz2 skipped -- No module named thread
test_calendar
test_call
test_capi
test_capi skipped -- No module named thread
test_cd
test_cd skipped -- No module named cd
test_cfgparser
test_cgi
test_charmapcodec
test_cl
test_cl skipped -- No module named cl
test_class
test_cmath
test test_cmath failed -- Traceback (most recent call last):
   File /sw_install/python-2.6.5/Lib/test/test_cmath.py, line 366, in 
test_specific_values
 self.fail(error_message)
AssertionError: atan: atan(complex(0.0, 0.0))
Expected: complex(0.0, 0.0)
Received: complex(0.0, -0.0)
Received value insufficiently close to expected value.

test_cmd
test_cmd skipped -- No module named thread
test_cmd_line
test_cmd_line_script
test_code
test_codeccallbacks
test_codecencodings_cn
test_codecencodings_hk
test_codecencodings_jp
test_codecencodings_kr
test_codecencodings_tw
test_codecmaps_cn
test_codecmaps_cn skipped -- Use of the `urlfetch' resource not enabled
test_codecmaps_hk
test_codecmaps_hk skipped -- Use of the `urlfetch' resource not enabled
test_codecmaps_jp
test_codecmaps_jp skipped -- Use of the `urlfetch' resource not enabled
test_codecmaps_kr
test_codecmaps_kr skipped -- Use of the `urlfetch' resource not enabled
test_codecmaps_tw
test_codecmaps_tw skipped -- Use of the `urlfetch' resource not enabled
test_codecs
test_codeop
test_coding
test_coercion
test_collections
test_colorsys
test_commands
test_compare
test_compile
test_compiler
test_complex
test_complex_args
test_contains
test_contextlib
test_contextlib skipped -- No module named thread
test_cookie
test_cookielib
test_copy
test_copy_reg
test_cpickle
Exception RuntimeError: 'maximum recursion depth exceeded in 
__subclasscheck__' in type 'exceptions.RuntimeError' ignored
test test_cpickle failed -- multiple errors occurred; run in verbose 
mode for details
test_cprofile
test_crypt
test_csv
test_ctypes
test_ctypes skipped -- No module named _ctypes
test_curses
test_curses skipped -- No module named _curses_panel
test_datetime
test_dbm
test_decimal
test_decorators
test_defaultdict
test_deque
test_descr
test_descrtut
test_difflib
test_dircache
test_dis
test_distutils
unable to execute ./Modules/ld_so_aix: No such file or directory
test test_distutils failed -- Traceback (most recent call last):
   File 
/sw_install/python-2.6.5/Lib/distutils/tests/test_build_ext.py, line 
261, in test_get_outputs
 cmd.run()
   File /sw_install/python-2.6.5/Lib/distutils/command/build_ext.py, 
line 340, in run
 self.build_extensions()
   File /sw_install/python-2.6.5/Lib/distutils/command/build_ext.py, 
line 449, in build_extensions
 self.build_extension(ext)
   File /sw_install/python-2.6.5/Lib/distutils/command/build_ext.py, 
line 531, in build_extension
 target_lang=language)
   File /sw_install/python-2.6.5/Lib/distutils/ccompiler.py, line 769, 
in link_shared_object
 extra_preargs, extra_postargs, build_temp, target_lang)
   File /sw_install/python-2.6.5/Lib/distutils/unixccompiler.py, line 
258, in link
 raise LinkError, msg
LinkError: command './Modules/ld_so_aix' failed with exit status 1

test_dl
test_dl skipped -- Could not open any shared libraries
test_docxmlrpc
test_docxmlrpc skipped -- No module named thread
test_dumbdbm
test_dummy_thread
test_dummy_threading
test_email
test_email_codecs
test_email_renamed
test_enumerate
test_eof
test_epoll
test_epoll skipped -- test works only on Linux 2.6
test_errno
test_exception_variations
test_extcall
test_fcntl
test_file
test_file skipped -- No module named thread
test_filecmp
test_fileinput
test_fileio
test test_fileio failed -- Traceback (most recent call last):
   File /sw_install/python-2.6.5/Lib/test/test_fileio.py, line 157, in 
testAbles
 self.assertEquals(f.seekable(), False)

[issue8781] 32-bit wchar_t doesn't need to be unsigned to be usable (I think)

2010-05-21 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

Usually you wouldn't want to cast a char directly to a Py_UNICODE, because you 
need to take into account the encoding of the char and map it to the 
appropriate Unicode character.  The exception is when you're certain the char 
is 7-bit ASCII, which is a subset of Unicode; that's safe since 7-bit ASCII 
never uses the sign bit.

However, again, I'm not an expert on the internals of Python's Unicode 
implementation and it's possible that I'm missing something.  ;) You also raise 
a good point about third-party code.

Your other suggestion is quite workable.  ./configure could define 
HAVE_USABLE_WCHAR_T (which is used to enable the optimizations) when 
sizeof(wchar_t) == sizeof(Py_UNICODE), yet still define Py_UNICODE as unsigned. 
 Using Google Code I could not find any instances of HAVE_USABLE_WCHAR_T being 
used outside of CPython itself.

Another option would be to test Py_UNICODE_SIZE == SIZEOF_WCHAR_T to enable the 
optimizations, instead of defined(HAVE_USABLE_WCHAR_T).  The plus side is that 
we wouldn't be changing the semantics of anything.

--

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



[issue8781] 32-bit wchar_t doesn't need to be unsigned to be usable (I think)

2010-05-21 Thread Antoine Pitrou

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

 Another option would be to test Py_UNICODE_SIZE == SIZEOF_WCHAR_T to
 enable the optimizations, instead of defined(HAVE_USABLE_WCHAR_T).
 The plus side is that we wouldn't be changing the semantics of
 anything.

I guess it's sufficient, indeed.
Besides, the optimizations don't really seem to be used in any critical
paths anyway...

--

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



[issue8781] 32-bit wchar_t doesn't need to be unsigned to be usable (I think)

2010-05-21 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

Yeah, this is a I noticed this small optimization while working on something 
else kind of thing. ;) (something else being Issue8654)

I can make a patch to change the #if's to test Py_UNICODE_SIZE == 
SIZEOF_WCHAR_T, though I'll give others a few days to chime in first.

--
assignee:  - stutzbach

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



[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Closing as Invalid. PYTHONHOME should not be set when building Python.

--
resolution:  - invalid
status: open - closed

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



[issue8780] py3k: child process don't inherit stdout / stdout on Windows

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Ok, it *is* a regression introduced by r78946. Attached patch fixes the issue 
and adds a regression test.

Add also the author of r78946 to the nosy list :-)

--
keywords: +patch
nosy: +gregory.p.smith
Added file: http://bugs.python.org/file17430/subprocess_windows.patch

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



[issue8782] inspect.getsource returns invalid source for non-newline-ending module

2010-05-21 Thread holger krekel

New submission from holger krekel holger.kre...@gmail.com:

Executing the attached inspect_failure.py under python2.6 or python3.1 
results in an assertion error: Python fails to obtain the source code of a 
function that is defined at the end of a module whose last line does not 
contain a line ending character. 

After brief analysis i think there are two approaches to fixing it: normalizing 
newlines in inspect.findsource (see attached inspect.patch file against r312) 
or performing normalization in linecache.updatecache which does it already for 
source code obtained from PEP302 loaders. Or any other ideas?

--
files: inspect.patch
keywords: patch
messages: 106245
nosy: hpk
priority: normal
severity: normal
status: open
title: inspect.getsource returns invalid source for non-newline-ending module
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/file17431/inspect.patch

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



[issue8780] py3k: child process don't inherit stdout / stdout on Windows

2010-05-21 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Looks fine to me.

The first line of the test comment has if instead of is but you could fix 
that on checkin.

--
assignee: brian.curtin - haypo

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



[issue8748] integer-to-complex comparisons give incorrect results

2010-05-21 Thread Mark Dickinson

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

py3k patch applied in r81397, with some tweaks:
 - fix reference leak (j wasn't being Py_DECREF'd in the long branch)
 - remove trailing whitespace
 - put 'else' and 'else if' on a new line following a closing brace
 - remove unnecessary NULL initializations
 - minor simplifications to long branch

Thanks!

--

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



[issue8748] integer-to-complex comparisons give incorrect results

2010-05-21 Thread Mark Dickinson

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

Hmm.  The current Python 2.7 behaviour really is a mess.

Your patch removes the coercion entirely;  I'm not sure that's a good idea:  
mightn't this change behaviour for user-defined classes with a __coerce__ 
method?  Maybe it would be better to just special-case ints and longs at the 
start of complex_richcompare, and then leave everything else more-or-less 
intact?

I'm beginning to wonder whether it's actually worth fixing this at all in 2.7.

--

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



[issue2736] datetime needs an epoch method

2010-05-21 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

On Fri, May 21, 2010 at 7:26 AM, STINNER Victor rep...@bugs.python.org wrote:
..
  ... If the tzinfo of the datetime object does not match the
 system TZ used by mktime, the result will be quite misleading.

 Can you suggest a possible fix to take care of the timezone information? I 
 don't know how to use that.

I believe it should be something like this:

from claendar import timegm
def datetime_totimestamp(dt):
return timegm(dt.utctimetuple()), dt.microsecond)

Note the following comment in the documentation for tzinfo.fromutc():
An example of a time zone the default fromutc() implementation may
not handle correctly in all cases is one where the standard offset
(from UTC) depends on the specific date and time passed, which can
happen for political reasons.  The default implementations of
astimezone() and fromutc() may not produce the result you want if the
result is one of the hours straddling the moment the standard offset
changes.  I have not tested the above code and it may not work for
non-trivial time-zones.

Still a few questions remain:

1. Should absence of tzinfo imply local timezone or UTC?
2. Given that datetime.fromtimestamp() takes an optional tz argument,
should totimestamp() do the same and use given tz for naive datetime
objects?
3. Should there be a toutctimestamp()?

I believe at this stage we need a python implementation of a prototype
answering these questions and a unit test that would demonstrate how
the prototype would work with nontrivial timezones.

--

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



[issue6695] PyXXX_ClearFreeList for dict, set, and list

2010-05-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue6715] xz compressor support

2010-05-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue8750] Many of MutableSet's methods assume that the other parameter is not self

2010-05-21 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

Patch with unit test attached for MutableSet's:

x ^= x
x -= x

I was wrong about |= and = having a problem.  Since they don't mutate the set, 
they don't raise an exception (they only .add items that are already in the 
set).  I added tests for them but left the implementation alone.

--
keywords: +needs review, patch
stage: unit test needed - patch review
Added file: http://bugs.python.org/file17432/set-isub.patch

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



[issue2736] datetime needs an epoch method

2010-05-21 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

On Fri, May 21, 2010 at 7:37 AM, Antoine Pitrou rep...@bugs.python.org wrote:
..
 I agree with Victor that the APIs need improving, even if it involves 
 providing obvious replacements of obscure one-liners.

While I agree that the datetime API can be improved, I don't think
Victor's proposal does that.  The advantage of an obscure one-liner is
that it is obvious what it does, particularly for someone with a
C/UNIX background.  dt.totimestamp() may be easier to write, but it is
entirely non-obvious what it will return.  One would expect that
dt.totimestamp() is the inverse of datetime.fromtimestamp(timestamp),
but in timezones with daylight savings adjustments, but such inverse
may not always exist.  (01:59AM may be followed by 02:00 AM or by
01:00 AM. so on changeover days datetime(y, m, d, 1, 30).totimestamp()
is either ambiguous or undefined.)   As I suggested in my previous
comment, this problem can be resolved, but we are not there yet.

 As an occasional user of datetime and time modules, I have too often wanted 
 to curse those limited, awkwardly inconsistent APIs.

Yes, it would be ideal if a user of datetime module would not need to
reach to other modules for date/time calculations.  See also
http://bugs.python.org/issue6280.   Do you have other examples of
this sort?

--

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



[issue2736] datetime needs an epoch method

2010-05-21 Thread Alexander Belopolsky

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


--
assignee:  - belopolsky
nosy:  -Alexander.Belopolsky
stage:  - unit test needed
versions: +Python 3.2 -Python 2.6, Python 3.0

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



[issue2736] datetime needs an epoch method

2010-05-21 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

On Fri, May 21, 2010 at 11:20 AM, Alexander Belopolsky
rep...@bugs.python.org wrote:
..
 I believe it should be something like this:

 from claendar import timegm

s/claendar/calendar/, of course.

--
nosy: +Alexander.Belopolsky

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



[issue8748] integer-to-complex comparisons give incorrect results

2010-05-21 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

 Hmm.  The current Python 2.7 behaviour really is a mess.

No doubt!

 Your patch removes the coercion entirely;  

Yeah, I know.  The funny thing about this is that according to the 
documentation [1]:

   Arguments to rich comparison methods are never coerced.

 I'm not sure that's a good idea:  mightn't this change behaviour for 
 user-defined classes with a __coerce__ method?  Maybe it would be 
 better to just special-case ints and longs at the start of 
 complex_richcompare, and then leave everything else more-or-less 
 intact?

I will look into that today.

 I'm beginning to wonder whether it's actually worth fixing this at all  in 
 2.7.

:)

[1] http://docs.python.org/dev/reference/datamodel.html#basic-customization

--

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



[issue2736] datetime needs an epoch method

2010-05-21 Thread Antoine Pitrou

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

 The advantage of an obscure one-liner is
 that it is obvious what it does, particularly for someone with a
 C/UNIX background.

Well, I would argue that the C/Unix legacy in terms of dates and times isn't an 
example to follow. Python does not force you to use strcat() to concatenate 
strings, either ;)

But besides, the issue is more how people are supposed to invent that 
one-liner, let alone remember it easily. Perhaps adding it in the documentation 
would be a good middle ground, if you think it shouldn't be added to the stdlib.

 Do you have other examples of this sort?

Well, for example, the datetime module encourages you to use aware datetime 
objects (rather than so-called naive objects), but there isn't a single 
facility to do so. You must reinvent a whole timezone class from scratch.

--

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



[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-05-21 Thread Alexander Belopolsky

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


--
assignee:  - belopolsky
nosy: +belopolsky
stage:  - unit test needed
type:  - feature request
versions: +Python 3.2 -Python 2.7, Python 3.1

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



[issue2736] datetime needs an epoch method

2010-05-21 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

On Fri, May 21, 2010 at 12:20 PM, Antoine Pitrou rep...@bugs.python.org wrote:
..
 Well, for example, the datetime module encourages you to use aware datetime 
 objects (rather than so-called naive objects),
 but there isn't a single facility to do so. You must reinvent a whole 
 timezone class from scratch.

This is partially addressed by issue 5094, datetime lacks concrete
tzinfo impl. for UTC.  A more ambitious project would be to add pytz
to stdlib.  I believe I've seen this idea discussed and rejected, but
I am not able to find a link to an appropriate thread now.  A half-way
project would be to add LocalTimezone given as an example in
http://docs.python.org/dev/py3k/library/datetime.html in addition for
UTC timezone.   Any takers?

--

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



[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-21 Thread Alexander Belopolsky

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


--
nosy: +belopolsky

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



[issue1621] Do not assume signed integer overflow behavior

2010-05-21 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
nosy: +dmalcolm

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



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-05-21 Thread Antoine Pitrou

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

Committed in r81398 (trunk), r81399 (2.6), r81400 (py3k), r81401 (3.1). Thank 
you!

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

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



[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-21 Thread Daniel Stutzbach

Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:

Here is a revised patch based on Benjamin's comments on Rietveld.

--
Added file: http://bugs.python.org/file17433/mapping2.patch

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



[issue1436346] yday in datetime module

2010-05-21 Thread Alexander Belopolsky

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

On Thu, May 20, 2010 at 7:27 PM, Antoine Pitrou rep...@bugs.python.org wrote:

 .. The OP's premise was that
 t.timetuple()[7] was unreadable, but in the modern python, the same
 can be written as t.timetuple().tm_yday.

 Could I suggest such example be added to the documentation, though?

The documentation for timetuple method [1, 2] already contains a
recipe for computing yday which is more efficient than
t.timetuple().tm_yday:

 yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1

Maybe it can be improved by making it discoverable in searches for yday:


... is equivalent to time.struct_time((d.year, d.month, d.day, d.hour,
d.minute, d.second, d.weekday(), yday, dst)), where yday =
d.toordinal() - date(d.year, 1, 1).toordinal() + 1 is the day number
of the year starting from 1 for January 1st.


[1] http://docs.python.org/py3k/library/datetime.html#datetime.date.timetuple
[2] 
http://docs.python.org/py3k/library/datetime.html#datetime.datetime.timetuple

--

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



[issue1436346] yday in datetime module

2010-05-21 Thread Alexander Belopolsky

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


--
nosy: +georg.brandl

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



[issue8783] The external link to a Hash Collision FAQ points to some company's homepage

2010-05-21 Thread Daniel Stutzbach

New submission from Daniel Stutzbach dan...@stutzbachenterprises.com:

At the bottom of the documentation for hashlib, there's a link to
http://www.cryptography.com/cnews/hash.html

which the hashlib documentation describes as Hash Collision FAQ with 
information on which algorithms have known issues and what that means regarding 
their use.

However, the page at that link is identical to http://www.cryptography.com/

which is just the homepage of some company that happens to deal with 
cryptography.  If they do in fact host a Hash Collision FAQ, I couldn't find 
it. :-(

Googling for Hash Collision FAQ (with quotes) mostly turns up references to 
the Python documentation, so I'm guessing the intended document no longer 
exists.

The following wikipedia link might be an OK substitute, although it makes for 
pretty dense reading.
http://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_algorithms

--
assignee: d...@python
components: Documentation
messages: 106259
nosy: d...@python, stutzbach
priority: normal
severity: normal
status: open
title: The external link to a Hash Collision FAQ points to some company's 
homepage

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



[issue1621421] normalize namespace from minidom

2010-05-21 Thread Adomas Paltanavičius

Changes by Adomas Paltanavičius adomas.paltanavic...@gmail.com:


--
nosy: +admp

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



[issue8783] The external link to a Hash Collision FAQ points to some company's homepage

2010-05-21 Thread Georg Brandl

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

The FAQ can still be found in the internet archive, 
http://web.archive.org/web/20070928160638/http://www.cryptography.com/cnews/hash.html

but of course this is not a good link, especially because it's not updated.  
I've added the link to the wikipedia article, as you suggested, in r81404.  It 
should be a good starting point for further research.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue8694] python3 FAQ mentions unicode()

2010-05-21 Thread Georg Brandl

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

This was due to a review of the programming FAQ not yet having been merged to 
the 3.1 branch.  Now fixed in r81407.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue6715] xz compressor support

2010-05-21 Thread Christophe Simonis

Changes by Christophe Simonis simonis.christo...@gmail.com:


--
nosy: +Christophe Simonis

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



[issue8691] Doc: left alignment is not the default for numbers

2010-05-21 Thread Georg Brandl

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

Eric should know the exact semantics best.

--
assignee: d...@python - eric.smith
nosy: +eric.smith, georg.brandl

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



[issue8780] py3k: child process don't inherit stdout / stderr on Windows

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Fixed by r81403 (py3k).

Even if the issue is a regression specific to 3.x, I backported the new test in 
3.1: r81408.

--
resolution:  - fixed
status: open - closed
title: py3k: child process don't inherit stdout / stdout on Windows - py3k: 
child process don't inherit stdout / stderr on Windows

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



[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-21 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Fixed in r81414. Thanks for the patch.

--
resolution:  - fixed
status: open - closed

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



[issue8724] bind_and_activate parameter is missed from directive

2010-05-21 Thread Georg Brandl

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

Thanks, fixed in r81419.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue4769] b64decode should accept strings or bytes

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Attached base64_main.patch fixes errors described in 
b64-decode-str-bytes-typeerror.txt.

--

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



[issue8707] Duplicated document in telnetlib.

2010-05-21 Thread Georg Brandl

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

Thanks, fixed in r81431.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue8782] inspect.getsource returns invalid source for non-newline-ending module

2010-05-21 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Fixed in r81432 by making linecache smarter.

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

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



[issue8709] mention explicitly Windows support for os.devnull

2010-05-21 Thread Georg Brandl

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

Thanks, applied in r81450.

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue5640] Wrong print() result when unicode error handler is not 'strict'

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Hyeshik Chang commited the fix one year ago in py3k (r71045).

I ported the fix to trunk (r81454) and 2.6 (r81456).

--
nosy: +haypo
resolution:  - fixed
status: open - closed

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



[issue3798] SystemExit incorrectly displays unicode message

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Here is a patch for trunk. This bug is minor, and so I don't know if it can be 
commited to 2.7.

The patch adds also a test that I added to py3k in r81252:

handle_system_exit() flushs files to warranty the output order

PyObject_Print() writes into the C object stderr, whereas PySys_WriteStderr() 
writes into the Python object sys.stderr. Each object has its own buffer, so 
call sys.stderr.flush() and fflush(stderr).

--
keywords: +patch
nosy: +benjamin.peterson, haypo
Added file: 
http://bugs.python.org/file17434/handle_system_exit_unicode-trunk.patch

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



[issue3798] SystemExit incorrectly displays unicode message

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I applied a similar patch to py3k (r81457) to use sys.stderr encoding and error 
handler, instead of the default encoding (utf8).

Wait for the buildbot before backporting to 3.1.

--

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



[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

@benjamin.peterson: Do you plan to port r75928 to 2.7 and 3.1? If not, can you 
close this issue?

I think that this issue priority is minor because few people write directly 
non-BMP characters in Python files (maybe only one, Ezio Melotti :-)). 
u\u, u\U or unichr(xxx) can be used in Python 2.7 and 3.1 
(without u prefix for 3.1).

--
nosy: +haypo

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



[issue6058] Add cp65001 to encodings/aliases.py

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Would it be possible to implement a cp65001 codec in Python using 
MultiByteToWideChar() / WideCharToMultiByte() with codepage=CP_UTF8?

--
nosy: +haypo

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



[issue850997] mbcs encoding ignores errors

2010-05-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue7768] raw_input should encode unicode prompt with std.stdout.encoding.

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

The bug is fixed in Python3. I would like to say that you should use Python3 
(which has a much better unicode support) instead of Python2 to get such 
feature, and that this issue should be closed (as wontfix).

--
nosy: +haypo

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



[issue850997] mbcs encoding ignores errors

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I patched py3k with mbcs_errors.patch (only encode_mbcs, not the decoder 
function) and most test pass: I opened #8784 for test_tarfile failure.

I don't think that it's a problem that mbcs only supports few error handlers, 
eg. 'strict', 'replace' and 'errors' (but not 'ignore' nor 'surrogateescape'). 
mbcs should be avoided anyway :-) It is kept for backward compatibility (with 
Python2). Python3 tries to avoid it by using the Unicode functions of Windows 
API.

I don't know exactly where mbcs is still used in Python3. If mbcs becomes more 
strict and raise new errors, I would like to say that the problem comes from 
the program, not in the encodig, and the program should be fixed (especilly if 
the program is the Python standard library).

About the backward compatibility with Python  3.2: I don't know exactly if 
this change would be a problem or not. I bet that few people use (directly or 
indirectly) mbcs with Python 3.1 (on Windows), and few peple (or nobody) would 
notice this change. And as I wrote, if someone notices a problem: the problem 
should be fixed in the function using mbcs, not in the codec.

--

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



[issue850997] mbcs encoding ignores errors

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Since this change breaks backward compatibility, it's a very bad idea to change 
mbcs codec in Python 2.7: remove this version from this issue.

--
versions:  -Python 2.7

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



[issue1436203] getpass.getpass() should allow Unicode prompts

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

As I wrote in issue #7768: this issue is already fixed in Python3 (getpass 
supports unicode prompt) and you should use Python3 instead of Python2 because 
Python3 has a much better unicode support. It would be harder to fix Python2, 
and this issue has no patch. Since we are close to 2.7rc1 (and 2.7 should be 
the last major version of the 3.x branch), I would like to say that this issue 
should be closed as wontfix.

--
nosy: +haypo

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



[issue7768] raw_input should encode unicode prompt with std.stdout.encoding.

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

and that this issue should be closed (as wontfix).

... because this issue has no patch and we are close to 2.7rc1 (and 2.7 should 
be the last major version of the 3.x branch).

--

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



[issue7983] The encoding map from Unicode to CP932 is different from that of Windows'

2010-05-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
versions: +Python 3.2

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



[issue6268] Seeking to the beginning of a text file a second time will return the BOM as first character

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Fixed: 2.7 (r81459), 2.6 (r81460), 3.2 (r81461), 3.1 (r81462).

--
nosy: +haypo
resolution:  - fixed
status: open - closed

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



[issue6268] Seeking to the beginning of a text file a second time will return the BOM as first character

2010-05-21 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

(For your information, io module had the same problem in Python3: it was fixed 
in #4862)

--

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



[issue8739] Update to smtpd.py to RFC 5321

2010-05-21 Thread Alberto Trevino

Alberto Trevino albe...@byu.edu added the comment:

On Thursday 20 May 2010 07:46:43 am you wrote:
 If you don't specify the size, the response of EHLP won't list
 SIZE as one of the extensions.  But, if a size is specified, then it
 will show it on EHLP.

Sorry, the EHLP above should be EHLO.  Fat fingers, little sleep, talk about 
help... you get the idea.

--

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