Berker Peksag added the comment:
I suppose this is a duplicate of #1065986.
Yes, it is. I created a test file from the tests in issue6625_pydoc.diff and
ran it on the current 2.7 branch.
def foo():
ufooo bar
baz
\xfcnicode\u2026
return 42
def bar():
uf\xfcr Elise
Akira Kitada added the comment:
I tried pydoc_2.7.patch with the following test file and
found source_synopsis returns \x escaped string instead of \u escaped one.
# -*- coding: utf-8 -*-
uツ
class Spam(object):
uツ
import utf8
utf8.__doc__
u'\u30c4'
print(utf8.__doc__)
ツ
import
New submission from INADA Naoki:
http://docs.python.org/3.3/library/xml.html#defused-packages
The courses of action are recommended for any server code that parses
untrusted XML data.
What this sentence means?
What The courses is?
--
assignee: docs@python
components: Documentation
Serhiy Storchaka added the comment:
There is no need to indent any except the pl = plistlib.load(f) line.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20229
___
New submission from Martin Panter:
I am trying to create a tar file after opening it as a temporary file, and it
seems to be writing truncated output when I use mode=w:gz. My workaround
looks like it will be to use mode=w|gz instead. It’s not clear what the
difference is: am I losing anything
Torsten Landschoff added the comment:
I tested this as well and it seems to work now. :-) Thanks for fixing it!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6625
___
Dima Tisnek added the comment:
I've worked around this in 2.6/2.7 like this:
class Arr:
def __getitem__(self, i):
return foo(i) # your key function
def __len__(self):
return 1000 # your max index value
bisect.bisect(Arr(), value, ...)
--
nosy:
New submission from Michael Foord:
Reported as mock issue 221: http://code.google.com/p/mock/issues/detail?id=221
from unittest.mock import Mock
m = Mock()
m.foo = 3
del m.foo
m.foo = 4
del m.foo
Traceback (most recent call last):
File stdin, line 1, in module
File
Vajrasky Kok added the comment:
Here is the patch for _codecs module.
--
Added file: http://bugs.python.org/file33443/clinic_codecsmodule.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20173
New submission from Jacek Szpot:
Just wanted to let you know that missing whitespace between from and a
dot-prefixed name is not considered invalid:
from.foo import bar
.. does not raise an error. Perhaps it should?
--
messages: 208022
nosy: maligree
priority: normal
severity:
A. Libotean added the comment:
Sure, will come back shortly with a patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20137
___
___
A. Libotean added the comment:
Let me write also a test for this and come back with a reply.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20136
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +lars.gustaebel, nadeem.vawda, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20238
___
Eric V. Smith added the comment:
This is no different from other places in python where white space is optional.
As long as the parser can tell the end of a token, there need not be white
space before the next token.
For example:
1+2
3
1 + 2
3
However, if the parser cannot tell the end of
Serhiy Storchaka added the comment:
Thank you Martin for you report.
Here is a patch which fixes this issue.
--
assignee: - serhiy.storchaka
keywords: +patch
stage: - patch review
versions: +Python 3.4
Added file: http://bugs.python.org/file33444/tarfile_fobj_gz_close.patch
Changes by Vajrasky Kok sky@speaklikeaking.com:
Removed file: http://bugs.python.org/file33443/clinic_codecsmodule.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20173
___
New submission from INADA Naoki:
http://docs.python.org/3.3/library/ipaddress.html#ipaddress.IPv4Address.is_unspecified
True if the address is unspecified. See RFC 5375 (for IPv4) or RFC 2373
(for IPv6).
RFC 5375 is IPv6 Unicast Address Assignment Considerations.
--
assignee:
Changes by Vajrasky Kok sky@speaklikeaking.com:
Added file: http://bugs.python.org/file33445/clinic_codecsmodule.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20173
___
INADA Naoki added the comment:
Is it 5735 ?
Next sentence may be wrong, too.
True if the address is otherwise IETF reserved.
Is it True if the address is IETF reserved. ?
--
___
Python tracker rep...@bugs.python.org
Laurent De Buyst added the comment:
The proposed patch does solve the infinite recursion bug, but a different
problem appears when resetting the same mock multiple times: it only works the
first time.
Using the patch as it stands:
from unittest.mock import mock_open
mo = mock_open()
a =
Roundup Robot added the comment:
New changeset 4c5b1932354b by R David Murray in branch '3.3':
#20206, #5803: more efficient algorithm that doesn't truncate output.
http://hg.python.org/cpython/rev/4c5b1932354b
New changeset b6c3fc21286f by R David Murray in branch 'default':
Merge #20206,
Roundup Robot added the comment:
New changeset 4c5b1932354b by R David Murray in branch '3.3':
#20206, #5803: more efficient algorithm that doesn't truncate output.
http://hg.python.org/cpython/rev/4c5b1932354b
New changeset b6c3fc21286f by R David Murray in branch 'default':
Merge #20206,
R. David Murray added the comment:
Fixed.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20206
___
R. David Murray added the comment:
I've reviewed this and applied it to both 3.3 and 3.4 in order to fix issue
20206. Thanks, Serhiy.
--
stage: patch review - committed/rejected
status: open - closed
versions: +Python 3.3
___
Python tracker
New submission from kespindler:
In Python 3.3, 3.4beta2, and bleeding edge (88411:e7d922d8ee03), the following
occurs
import logging
logging.basicConfig(style={)
logging.error(hello)
%(levelname)s:%(name)s:%(message)s
Of course, I would expect
ERROR:root:hello
to be output instead.
kespindler added the comment:
I created a patch that fixes this behavior for both { and $ style formats.
Previously, default format strings were not being set correctly for those
styles. This patch ensures that the correct default_format string is used.
There is a minor weirdness issue that,
R. David Murray added the comment:
It means that the package suggests what courses of action to take when parsing
untrusted data. I don't know how it goes about doing that, though, so we'll
have to ask Christian to clarify.
--
assignee: docs@python -
nosy: +christian.heimes,
R. David Murray added the comment:
s/courses of action/kinds of actions/ in my explanation, otherwise it might be
just as confusing :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20237
Roundup Robot added the comment:
New changeset fb1dd44d1f76 by R David Murray in branch '3.3':
#20236: Fix sphinx markup.
http://hg.python.org/cpython/rev/fb1dd44d1f76
New changeset 60163fc72017 by R David Murray in branch 'default':
Merge #20236: Fix sphinx markup.
R. David Murray added the comment:
Fixed, thanks.
--
nosy: +r.david.murray
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20236
Changes by Tabrez Mohammed tabr...@microsoft.com:
--
keywords: +patch
Added file: http://bugs.python.org/file33447/fix20221.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20221
___
Changes by Ned Deily n...@acm.org:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20242
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset cd728dc893c9 by Ned Deily in branch 'default':
Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
http://hg.python.org/cpython/rev/cd728dc893c9
--
nosy: +python-dev
___
Python
kespindler added the comment:
I came across this issue while fixing issue20242. This issue (14031) still
exists and is a major source of annoyance and confusion, and I suggest
re-opening it.
Specifying the { style, while still being forced to use % formatting in log
statements is backward
Changes by Ned Deily n...@acm.org:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20229
___
R. David Murray added the comment:
The reason is simple: in the general case you do not control all of the
statements that produce log messages. Some of them come from 3rd party library
code.
Perhaps the documentation needs to be clarified on this point, and document the
technique mentioned
New submission from Serhiy Storchaka:
ReadError can be raised when open a tarfile in write mode (e.g. 'w:gz'). Here
is a patch wish a test. In additional it rewrites the handling errors in
gzopen() which is too complicated now. This complication is possible the cause
of bugs #11513 and
Changes by Serhiy Storchaka storch...@gmail.com:
--
dependencies: +Incomplete gzip output with tarfile.open(fileobj=...,
mode=w:gz)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20243
___
kespindler added the comment:
I definitely do recognize that important case. I think the proper solution,
however, to that is make a very clear warning in the documentation that
changing the style might affect the logging of 3rd party tools. Those users
would probably have to use the % style
Changes by Serhiy Storchaka storch...@gmail.com:
--
dependencies: +ReadError when open a tarfile for writing
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20244
___
New submission from Serhiy Storchaka:
There are possible opened file leaks when unexpected error is occurred in
tarfile.open for bzip2- or xz-compressed files (and gzip2-compressed in 2.7).
Here is a patch. Unfortunately I have no tests.
--
assignee: serhiy.storchaka
components:
Vinay Sajip added the comment:
The problem with leaving the behavior as is is that currently the
style keyword is effectively useless and grossly misleading to users.
If you are referring to the style keyword in basicConfig, it merely sets the
style of the Formatter used. That can certainly
Vinay Sajip added the comment:
Thanks for this. The patch looks good, and I expect to implement it shortly.
--
assignee: - vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20242
Vinay Sajip added the comment:
On further reflection, I will implement this slightly differently. The tests I
will commit as is, except for stripping newlines before the comparison (to
avoid worrying about differences in line separators across different
platforms). However, the correct fix
Changes by Larry Hastings la...@hastings.org:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20214
___
Larry Hastings added the comment:
Okay, life has gotten even more complicated.
In another issue (#20172) Zachary Ware pointed out that Argument Clinic needs
to generate self parameters in the text string. But this complicates life
for inspect.Signature, which needs to not publish the self
Larry Hastings added the comment:
Clinic should be adding 'self' to the signature,
which should then be picked up by the __text_signature__
parser, and used by inspect and pydoc.
This innocent little comment has derailed my whole day. You're right, 'self'
should be in the signature. But
Roundup Robot added the comment:
New changeset e7fcf0d8008f by Vinay Sajip in branch '3.3':
Issue #20242: Fixed basicConfig() format strings for the alternative formatting
styles.
http://hg.python.org/cpython/rev/e7fcf0d8008f
New changeset c1605d24fb35 by Vinay Sajip in branch 'default':
Vinay Sajip added the comment:
Can you please attach a short test script which shows what you consider to be
the failure case / incorrect behaviour?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20136
Vinay Sajip added the comment:
Which encoding are you using, such that the difference in length between
encoded and decoded messages is significant?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20137
Yury Selivanov added the comment:
But this complicates life for inspect.Signature, which needs to not publish
the self parameter when it's been bound.
That's already supported, isn't it?
str(inspect.signature(F.a))
'(self, a)'
str(inspect.signature(F().a))
'(a)'
--
Larry Hastings added the comment:
Not for builtins.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20189
___
___
Python-bugs-list mailing list
New submission from Serhiy Storchaka:
TarFile's *open() class methods checks the mode argument to raise helpful error:
t = tarfile.TarFile.taropen('xxx.tar', 'q')
Traceback (most recent call last):
File stdin, line 1, in module
File /home/serhiy/py/cpython/Lib/tarfile.py, line 1589, in
Stefan Krah added the comment:
Another issue is that with the patch applied help() is broken for certain forms
of docstrings:
from decimal import *
print(setcontext.__doc__)
setcontext(c) - Set a new default context.
help(setcontext)
Traceback (most recent call last):
File stdin, line 1,
Larry Hastings added the comment:
Here's an updated patch. I tried to do it right which wound up being a huge
amount of work in Clinic. The actual change to inspect.Signature was really
easy, once I understood everything.
The churn in the .c files is because Clinic now uses the self
Larry Hastings added the comment:
Another issue is that with the patch applied help() is broken for
certain forms of docstrings:
Yeah. We discussed this briefly in #19674. I wanted to use a marker that
wasn't The Convention That People Have Used For Decades but I felt overruled.
I want
Ryan Smith-Roberts added the comment:
Even more imperative than my version. Excellent!
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20202
___
Changes by Ryan Smith-Roberts r...@lab.net:
--
nosy: +rmsr
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
___
___
Python-bugs-list mailing
New submission from Ryan Smith-Roberts:
recvfrom_into fails to check that the supplied buffer object is big enough for
the requested read and so will happily write off the end.
I will attach patches for 3.4 and 2.7, I'm not familiar with the backporting
procedure to go further but all
Changes by Ryan Smith-Roberts r...@lab.net:
Added file:
http://bugs.python.org/file33453/recvfrom_into_buffer_overflow_2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20246
___
Changes by Ryan Smith-Roberts r...@lab.net:
--
keywords: +patch
Added file:
http://bugs.python.org/file33452/recvfrom_into_buffer_overflow_3.4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20246
New submission from Antony Lee:
I believe that the implementation of Condition._is_owned is wrong, as mentioned
here: https://mail.python.org/pipermail/python-list/2012-October/632682.html.
Specifically, the two return values (True and False) should be inverted.
I guess this slipped through
Larry Hastings added the comment:
Filed comments on everything.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20172
___
___
Python-bugs-list
Ryan Smith-Roberts added the comment:
Georg Brandl wrote:
Although now is a good time to ensure sensible argument names (I
usually look at the docs to find the documented ones), so that
switching the function to keyword arg support is basically just a
removal of '/'
I started doing this
R. David Murray added the comment:
Everything before 2.7 is already out of even security maintenance, so you've
already checked off everything it will get fixed in.
--
nosy: +r.david.murray
type: crash - security
___
Python tracker
New submission from Ryan Smith-Roberts:
The docs indicate their arguments are positional-only. Trivial patch attached.
--
assignee: docs@python
components: Documentation
files: docs_socket_recvmsg_args.patch
keywords: patch
messages: 208067
nosy: docs@python, rmsr
priority: normal
Ryan Smith-Roberts added the comment:
Never mind, it's actually recvfrom{,_into}. Sigh.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20248
___
Changes by Benjamin Peterson bp+pyb...@benjamin-peterson.org:
--
resolution: - invalid
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20248
___
New submission from Chris Angelico:
When tests are run from an Upstart job in a minimal environment,
test_posix.test_initgroups fails as it attempts to find the max() of an empty
list of supplementary groups.
Problem sighted with 2.7, 3.3, and 3.x branches. Patch derived from 3.x
(default
Roundup Robot added the comment:
New changeset 87673659d8f7 by Benjamin Peterson in branch '2.7':
complain when nbytes buflen to fix possible buffer overflow (closes #20246)
http://hg.python.org/cpython/rev/87673659d8f7
New changeset 715fd3d8ac93 by Benjamin Peterson in branch '3.1':
complain
New submission from Andrew Barnert:
The docstring for defaultdict shows only a single argument, default_factory,
and gives no clue that you can pass additional arguments:
| defaultdict(default_factory) -- dict with default factory
|
| The default factory is called without
Roundup Robot added the comment:
New changeset d46bf7835b45 by Benjamin Peterson in branch '3.3':
correct defaultdict signature in docstring (closes #20250)
http://hg.python.org/cpython/rev/d46bf7835b45
New changeset 950f1e83bb56 by Benjamin Peterson in branch '2.7':
correct defaultdict
New submission from Vajrasky Kok:
import socket
r, w = socket.socketpair()
w.send(b'X' * 1024)
1024
buffer = bytearray()
r.recvfrom_into(buffer)
python: /home/sky/Code/python/cpython3.4/Modules/socketmodule.c:2867:
sock_recvfrom_into: Assertion `buf != 0 buflen 0' failed.
Aborted (core
Roundup Robot added the comment:
New changeset 8712efe02dcc by Benjamin Peterson in branch '3.3':
remove overly strict assertion (closes #20251)
http://hg.python.org/cpython/rev/8712efe02dcc
New changeset ab9556830560 by Benjamin Peterson in branch 'default':
merge 3.3 (#20251)
Roundup Robot added the comment:
New changeset 3881211cbb19 by Benjamin Peterson in branch '2.7':
remove overly strict assertion (closes #20251)
http://hg.python.org/cpython/rev/3881211cbb19
New changeset 1885e1768ff9 by Benjamin Peterson in branch '2.7':
add test for #20251
New submission from Ryan Smith-Roberts:
type - types
--
assignee: docs@python
components: Documentation
files: argument_clinic_howto_y-hash.patch
keywords: patch
messages: 208076
nosy: docs@python, larry, rmsr
priority: normal
severity: normal
status: open
title: Argument Clinic howto:
Larry Hastings added the comment:
Same bug for 'y' too. Will fix in a patch probably Tuesday. Thanks for
pointing it out!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20252
___
New submission from INADA Naoki:
http://docs.python.org/3.3/library/ipaddress.html#ipaddress.IPv4Network.broadcast_address
Wrong attribute name: s/host mask/hostmask/
--
assignee: docs@python
components: Documentation
messages: 208078
nosy: docs@python, naoki
priority: normal
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +zach.ware
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20253
___
___
Python-bugs-list
Zachary Ware added the comment:
Sandbox repo updated. It is currently using an older version of clinic;
running current clinic on the winreg.c in the tip of the sandbox produces this
traceback:
Traceback (most recent call last):
File Tools\clinic\clinic.py, line 2981, in module
New submission from Vajrasky Kok:
testRecvIntoArray is same as testRecvIntoBytearray.
testRecvFromIntoArray is same as testRecvFromIntoBytearray.
Attached the patch to fix the tests.
--
components: Tests
files: fix_recv_from_into_array_test_socket.patch
keywords: patch
messages:
81 matches
Mail list logo