Hi,
I found that using Popen with both executable and shell parameters set
creates a bug:
For example:
Calling:
Popen(["-a"], exacutable="/bin/ls", shell=True)
Exacutes: /bin/ls -c -a instead of: /bin/sh -c "/bin/ls -a"
The bug in the function:
def _execute_child(self, args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite):
"""Execute program (POSIX version)"""
Lines: 1124-1127:
if shell:
args = ["/bin/sh", "-c"] + args
if executable:
args[0] = executable
Eyal Moscovici
Networking and Virtualization Technologies
IBM Haifa Research Lab
Dear mailing list,
The documentation for i18n support is a bit outdated. It mentions
pygettext, but it seems that pygettext was declared obsolete by just about
anybody in 2004 and was replaced by its original implementation "xgettext".
Here's a link to the part of the documentation, which is outdated:
http://docs.python.org/3.3/library/gettext.html#id3
And some proof of pygettext not being used anymore since 2004:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=246332
Sincerely,
Tom Wallroth
New submission from Nick Coghlan:
Thanks for the report, this has now been fixed in http://hg.python.org/cpython/rev/ac1685661b07
----------
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue19487>
_______________________________________
New submission from Nick Coghlan:
The codecs module has long offered encode() and decode() convenience functions (since 2004: http://hg.python.org/cpython-fullhistory/rev/8ea2cb1ec598), but they're not documented (except through docstrings). We should fix that.
>From the docstrings:
==========
encode(obj, [encoding[,errors]]) -> object
Encodes obj using the codec registered for encoding. encoding defaults
to the default encoding. errors may be given to set a different error
handling scheme. Default is 'strict' meaning that encoding errors raise
a ValueError. Other possible values are 'ignore', 'replace' and
'xmlcharrefreplace' as well as any other name registered with
codecs.register_error that can handle ValueErrors.
==========
decode(obj, [encoding[,errors]]) -> object
Decodes obj using the codec registered for encoding. encoding defaults
to the default encoding. errors may be given to set a different error
handling scheme. Default is 'strict' meaning that encoding errors raise
a ValueError. Other possible values are 'ignore' and 'replace'
as well as any other name registered with codecs.register_error that is
able to handle ValueErrors.
==========
Note that the difference between the convenience functions in the codecs module and the methods on str, bytes and bytearray is that the latter have additional type checks to limit their usage to text encodings. str.encode expects a str->bytes conversion, while bytes.decode and bytearray.decode both expect the codec to produce a str object. codecs.encode and codecs.decode are both arbitrary object->object conversions, limited only by whatever the chosen codec supports.
----------
assignee: docs@python
components: Documentation
messages: 187700
nosy: docs@python, ncoghlan
priority: normal
severity: normal
status: open
title: Document codecs.encode and codecs.decode
versions: Python 2.7, Python 3.3, Python 3.4
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue17827>
_______________________________________
New submission from Zachary Ware:
As discussed in issue19273, here are a pair of patches that correct factual errors in PCbuild/readme.txt in both 2.7 and 3.3.
The 3.3 patch makes the following changes:
- Remove Win2k mentions, it is not supported (Tcl nmake command also adjusted)
- MSVCRT9 -> MSVCRT10
- SQLite 3.7.4 -> 3.7.12, remove "(see below)" with nothing to see
- .vcproj -> .vcxproj, all occurrences
- _bz2.vcxproj isn't as magical as it was made out to be, and it can clean itself
- nasmw -> nasm
- Remove untrue part of Building for Itanium section
- Update msdn link
- .vsprops -> .props
- Trim trailing space
Due to the large number of lines in the diff due to trailing space, I'll also be attaching a patch created by `hg diff -w` for ease of review.
----------
assignee: docs@python
components: Documentation, Windows
files: pcbuild_readme-3.3.diff
keywords: patch
messages: 201253
nosy: brian.curtin, christian.heimes, docs@python, ezio.melotti, loewis, python-dev, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Fix PCbuild/readme.txt in 2.7 and 3.3
type: enhancement
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file32354/pcbuild_readme-3.3.diff
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue19391>
_______________________________________
Changes by iMom0 <mobeiheart(a)gmail.com>:
----------
assignee: docs@python
components: Documentation
files: partialmethod-doc-fix.patch
keywords: patch
nosy: docs@python, imom0
priority: normal
severity: normal
status: open
title: Correct the error of the example given in the doc of partialmethod
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32484/partialmethod-doc-fix.patch
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue19487>
_______________________________________
New submission from Vajrasky Kok:
Lib/email/message.py, line 665 & 666:
param = msg.get_param('foo')
param = email.utils.collapse_rfc2231_value(rawparam)
Where does rawparam come from?
On top of that, sending the result of get_param to collapse_rfc2231_value can make it chokes if the result of get_param is None. I already proposed the change in collapse_rfc2231_value to handle None gracefully in another ticket #19063, though.
----------
assignee: docs@python
components: Documentation
files: fix_doc_get_param_in_email_message.patch
keywords: patch
messages: 202029
nosy: docs@python, vajrasky
priority: normal
severity: normal
status: open
title: Slightly incorrect doc for get_param method in Lib/email/message.py
versions: Python 3.4
Added file: http://bugs.python.org/file32480/fix_doc_get_param_in_email_message.patch
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue19485>
_______________________________________