Antony Lee added the comment:
The attached patch should fix the issue.
--
keywords: +patch
Added file: http://bugs.python.org/file34759/pathlib.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21127
Roundup Robot added the comment:
New changeset cb632988bc09 by Victor Stinner in branch 'default':
Issue #21118: PyLong_AS_LONG() result type is long
http://hg.python.org/cpython/rev/cb632988bc09
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
New changeset fa6debebfe8b by Benjamin Peterson in branch 'default':
fix reference leaks in the translate fast path (closes #21175)
http://hg.python.org/cpython/rev/fa6debebfe8b
Thanks Benjamin for the quick fix!
--
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19746
___
___
Python-bugs-list
New submission from Konstantin Zemlyak:
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit
(AMD64)] on win32
Type help, copyright, credits or license for more information.
bytearray([256])
Traceback (most recent call last):
File stdin, line 1, in module
ValueError:
STINNER Victor added the comment:
256 is not part of the range(0, 256): 0..255.
$ python
print(list(range(0,256)))
[0, 1, 2, 3, ..., 253, 254, 255]
It doesn't make sense to store the number 256 in a byte string.
--
nosy: +haypo
___
Python tracker
akira added the comment:
From https://docs.python.org/3/glossary.html#term-sequence
An iterable which supports efficient element access using integer indices via
the __getitem__() special method and defines a __len__() method that returns
the length of the sequence.
.parents *is* a
Stefan Krah added the comment:
I think it's possible to misunderstand this error message if the
reader does not realize that range(0, 256) is to be taken literally.
Perhaps we should just use closed intervals of the form [0, 255]
everywhere.
--
nosy: +skrah
STINNER Victor added the comment:
Perhaps we should just use closed intervals of the form [0, 255] everywhere.
I only saw range(0, 256) in Python. At school, I used [0, 255]. I prefer [0,
255] syntax, it's more explicit :-)
--
___
Python tracker
Peter Otten added the comment:
As every beginner will learn about (and probably overuse) range() pretty soon I
think it's OK to use that form.
The math-inspired notation [0, 255] may be misinterpreted as a list. You also
lose the consistency of preferring half-open intervals everywhere.
The
New submission from Ontje Lünsdorf:
The attached doctest raises a warning since Python 3.4:
$ python -m doctest doctest.txt
Exception ignored in: generator object foo at 0x7f9ee38aaca8
Traceback (most recent call last):
File doctest doctest.txt[1], line 4, in foo
NameError: name 'socket' is
STINNER Victor added the comment:
The math-inspired notation [0, 255] may be misinterpreted as a list. You also
lose the consistency of preferring half-open intervals everywhere.
Not if you write x must in the range [0; 255].
--
___
Python
Vinay Sajip added the comment:
I wouldn't say it is a bug, as it is working as documented - though you might
say it is a request for enhancement. The documentation for string formatting at
https://docs.python.org/2/library/stdtypes.html#string-formatting-operations
says that the argument
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
type: behavior - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21172
___
___
New submission from Clinton Curry:
In the current Python 2.7 documentation, Section 5.4
https://docs.python.org/2.7/library/stdtypes.html
the result of the round function is described as x rounded to n digits,
rounding half to even. If n is omitted, it defaults to 0. However, my
observed
Vinay Sajip added the comment:
Looking into it further, I see no incidence in logging code of the string
format requires a mapping or of raising a TypeError with such a message. Can
you provide more information? Otherwise I will have to close this issue as
invalid.
--
resolution: -
Ontje Lünsdorf added the comment:
Sorry, the test does not really expose the problem with Python 3.4. Here is an
updated example.
Python 2.7 and 3.3 succeed without warnings, while Python 3.4 warns about an
ignored exception.
--
Added file:
Alan Briolat added the comment:
Because the object in question is not actually a dict, LogRecord is attempting,
in this example, %(bar)s % (f,) instead of %(bar)s % f.
In unicodeobject.c this causes the PyMapping_Check in PyUnicode_Format to fail
because it's a tuple (note that
Changes by Paul Sokolovsky pfal...@users.sourceforge.net:
--
nosy: +pfalcon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17145
___
___
New submission from Paul Sokolovsky:
With bytearray, you can do:
bytearray(3)
bytearray(b'\x00\x00\x00')
However, with arrays:
array.array('i', 3)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: 'int' object is not iterable
Given that int passed as seconf
Paul Sokolovsky added the comment:
It's not clear to me that importing specifier prefixes from the struct module
is the best way to go about this, though.
What are other alternatives then? Using struct's syntax has obvious benefit of
being consistent and not confusing people any further.
Paul Sokolovsky added the comment:
See also http://bugs.python.org/issue17345
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9066
___
___
Paul Sokolovsky added the comment:
See also http://bugs.python.org/issue9066
--
nosy: +pfalcon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17345
___
Larry Hastings added the comment:
I have no objections to someone backporting this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16395
___
___
Benjamin Peterson added the comment:
Here's what I consider a complete patch.
--
assignee: belopolsky - benjamin.peterson
Added file: http://bugs.python.org/file34762/mat-mult5.patch
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset b2187b82a658 by Benjamin Peterson in branch '3.4':
PySequence_Fast generally returns a list not a tuple (closes #16395)
http://hg.python.org/cpython/rev/b2187b82a658
New changeset b235db467cd5 by Benjamin Peterson in branch '2.7':
PySequence_Fast
Roundup Robot added the comment:
New changeset 3016a9e8061a by Benjamin Peterson in branch '2.7':
PySequence_Fast generally returns a list (#16305)
http://hg.python.org/cpython/rev/3016a9e8061a
--
___
Python tracker rep...@bugs.python.org
Benjamin Peterson added the comment:
(Obviously that last message should have gone to #16395 instead.)
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16305
___
Roman O. Vlasov added the comment:
Antoine, Martin, thank you for your replies. You was right: NT socket was not
in blocking mode (in 1st case). I didn't knew how to determine socket mode in
NT, so I explicitly set socket mode to blocking in _ssl.c before calling
SSL_do_handshake() for test:
Roundup Robot added the comment:
New changeset acbdbf2b06e0 by Yury Selivanov in branch '3.4':
inspect.signautre: Fix functools.partial support. Issue #21117
http://hg.python.org/cpython/rev/acbdbf2b06e0
New changeset 21709cb4a8f5 by Yury Selivanov in branch 'default':
inspect.signautre: Fix
Changes by Yury Selivanov yselivanov...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21117
___
Roundup Robot added the comment:
New changeset 932d69ef0c63 by Yury Selivanov in branch 'default':
inspect: Make Signature and Parameter hashable. Issue #20334.
http://hg.python.org/cpython/rev/932d69ef0c63
--
nosy: +python-dev
___
Python tracker
Changes by Yury Selivanov yselivanov...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20334
___
Roundup Robot added the comment:
New changeset 0973d45197cc by Yury Selivanov in branch '3.4':
docs: Document __objclass__. Closes #19281.
http://hg.python.org/cpython/rev/0973d45197cc
New changeset 2a953cb5642d by Yury Selivanov in branch 'default':
docs: Document __objclass__. Closes #19281.
Nikolaus Demmel added the comment:
I could resolve this by removing /usr/local/lib/python3.4/site-packages and
then retrying. Now I cannot reproduce this issue any more.
Maybe we can close this issue.
--
___
Python tracker rep...@bugs.python.org
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com:
Added file: http://bugs.python.org/file34764/issue21139-34.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21139
___
Saimadhav Heblikar added the comment:
Attaching a patch for 2.7 and 3.4
The comment strings are modified to reflect 70-72 in the tests.
--
keywords: +patch
Added file: http://bugs.python.org/file34763/issue21139-27.patch
___
Python tracker
New submission from Jim Peterson:
The result returned by somenamedtuple._source seem inconsistent, in that it
defines __dict__ as:
__dict__ = property(_asdict)
even though it imports property as:
from builtins import property as _property
and the namedtuple fields are defined using
Wolfgang Maier added the comment:
ok, I've prepared the patch using the elegant shutil solution.
--
keywords: +patch
Added file: http://bugs.python.org/file34765/gzip_example_usage_patch.diff
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
array.array('i', [0]) * 3
array('i', [0, 0, 0])
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21180
___
Roundup Robot added the comment:
New changeset 372b19005011 by Yury Selivanov in branch '3.4':
docs: Better wording for __objclass__ docs. Issue #19281
http://hg.python.org/cpython/rev/372b19005011
New changeset febd63a7e927 by Yury Selivanov in branch 'default':
docs: Better wording for
Ned Deily added the comment:
That error appears to be coming from wheel.py inside of pip. So, if you do
want to pursue it, you should probably be asking on the pip tracker:
https://github.com/pypa/pip/issues
--
nosy: +ned.deily
resolution: - 3rd party
stage: - committed/rejected
paul j3 added the comment:
http://stackoverflow.com/questions/22929087
A question that could be addressed with this patch(es)
In a subparser:
I have 4 arguments: -g, -wid, -w1, and -w2.
-w1 and -w2 always appear together
-wid and (-w1 -w2) are mutually exclusive, but one or the
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:
--
nosy: +josh.rosenberg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9066
___
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21181
___
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21181
___
___
Kushal Das added the comment:
Here is a patch which stops the breakage in getpass for python3.
--
keywords: +patch
nosy: +kushaldas
Added file: http://bugs.python.org/file34766/issue21169.patch
___
Python tracker rep...@bugs.python.org
Kushal Das added the comment:
Version 2 of the patch with a test update.
--
Added file: http://bugs.python.org/file34767/issue21169_v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21169
New submission from Yakov Keselman:
Run the following Python JSON parsing script on valid JSON:
import json
json.loads( '[[\Residential | Furniture | Cabinets\,\119.99\]]' )
Result:
Traceback (most recent call last):
File stdin, line 1, in module
File C:\Python33\lib\json\__init__.py,
Vinay Sajip added the comment:
Thanks for pinpointing what the issue is.
checking for isinstance(..., dict) is still wrong - it should at least
be collections.Mapping to give users a chance to emulate the correct
interface.
That seems reasonable.
--
resolution: invalid -
STINNER Victor added the comment:
I still don't understand the issue but... it's now fixed (I don't understand
why), so I'm closing it.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
This issue was a follow up of issue #21166, but in fact the two issues are
unrelated, and this issue is a false alarm.
I don't see how to make the GCC warning quiet, and GCC 4.2 is now old, so I'm
closing the issue.
--
resolution: - wont fix
status:
David Beazley added the comment:
Funny thing, this feature breaks the interactive interpreter in the most basic
way on OS X systems. For example, the tab key won't even work to indent. You
can't even type the most basic programs into the interactive interpreter. For
example:
for i in
STINNER Victor added the comment:
Here is a first patch. I only tested the execute() method.
--
keywords: +patch
nosy: +ghaering
Added file: http://bugs.python.org/file34768/sqlite_null.patch
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
However, I'd still like to discuss the idea of backporting this to 3.4.1.
THe idea of doing this change in Python 3.5 is that I have no idea of the risk
of regression. To backport such change in a minor version (3.4.1), I would feel
more confident with user
Roundup Robot added the comment:
New changeset 01f1e14cad23 by Ned Deily in branch '3.4':
Issue #20644: OS X installer build support for documentation build changes
http://hg.python.org/cpython/rev/01f1e14cad23
New changeset 7d004ad09bf5 by Ned Deily in branch 'default':
Issue #20644: merge
Raymond Hettinger added the comment:
whatever compelled the developer to declare the named fields
using _property seems to be ignored in the definition of __dict__.
What compelled the _property alias is that the user could name an attribute
property which would cause a conflict if _property
Ned Deily added the comment:
build-installer.py now assumes that sphinx-build and the previously required hg
have been installed somewhere on the restricted PATH that the installer uses.
Behind the scenes, the installer build process has been substantially revised
to make use of a
STINNER Victor added the comment:
Updated patch (close-3.patch) combining create_connection_close.patch and
close2.patch and adding unit tests. I also improved the create_connection()
test to raise the TimeoutError on connect() (loop.sock_connect), not on
sock.set_blocking().
--
STINNER Victor added the comment:
Here is a patch. I don't see how to write a unit test.
--
keywords: +patch
Added file: http://bugs.python.org/file34770/addch.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21088
STINNER Victor added the comment:
Redirecting the test to a file fails because curses complains stdio isn't a
tty.
You may create a the pty module for that.
https://docs.python.org/dev/library/pty.html#pty.openpty
--
___
Python tracker
STINNER Victor added the comment:
The patch looks good to me.
--
type: behavior - enhancement
versions: -Python 2.7, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12546
___
Josh Rosenberg added the comment:
Python 3.2-3.4 (probably all of 3.x) use round half even, but testing 2.7.3 on
Ubuntu confirms what you say. In terms of the decimal constants, Py2.7 round()
appears to use decimal.ROUND_HALF_UP behavior while 3.x uses
decimal.ROUND_HALF_EVEN behavior.
Looks
Roundup Robot added the comment:
New changeset 99265d30fa38 by Ned Deily in branch '3.4':
Issue #21097: Update Makefile with changed install locations of test
directories.
http://hg.python.org/cpython/rev/99265d30fa38
New changeset 7aae2b9fcfad by Ned Deily in branch 'default':
Issue #21097:
New submission from Osvaldo Santana Neto:
The following doctest should pass, but it fails:
def spam(): print(eggs)
...
assert spam()
eggs
Traceback (most recent call last):
AssertionError
But if we remove the print output from printed results the test pass:
def
Tim Peters added the comment:
The first footnote in the docs explain this:
Examples containing both expected output and an
exception are not supported. Trying to guess where
one ends and the other begins is too error-prone,
and that also makes for a confusing test.
So, sorry,
Osvaldo Santana Neto added the comment:
Hi Tim,
I tried to find more information in documentation before opening this bug but I
need to confess that I didn't read the footnote.
Thanks and sorry for the invalid report.
--
resolution: - invalid
status: open - closed
Steven D'Aprano added the comment:
Personally, I think that the second reason given in the footnote, that it makes
for confusing tests, is bogus, or at least it's a matter of opinion. I for one
don't think they are confusing, and would like to see mixed output/tracebacks
supported. Tim, would
Tim Peters added the comment:
Steven, no objection here.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21183
___
___
Python-bugs-list mailing
Kushal Das added the comment:
Here is a patch which fixes the documentation for unittest.
--
keywords: +patch
nosy: +kushaldas
Added file: http://bugs.python.org/file34772/issue21170.patch
___
Python tracker rep...@bugs.python.org
New submission from Steven D'Aprano:
If you know the population mean mu, you should calculate the sample variance by
passing mu as an explicit argument to statistics.pvariance. Unfortunately, it
doesn't work as designed:
py data = [1, 2, 2, 2, 3, 4] # sample from a population with mu=2.5
py
Changes by Steven D'Aprano steve+pyt...@pearwood.info:
--
resolution: invalid -
stage: - needs patch
status: closed - open
type: behavior - enhancement
versions: +Python 3.5 -Python 2.7, Python 3.4
___
Python tracker rep...@bugs.python.org
Kushal Das added the comment:
It is not a valid JSON. You may want to validate it against http://jsonlint.com/
What you have inside the string (single quotes) is the JSON representation but
not the string representation which json.loads is supposed to parse.
--
nosy: +kushaldas
Larry Hastings added the comment:
How about examining the inspect.Signature?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21088
___
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +ezio.melotti, michael.foord
stage: - patch review
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21170
___
75 matches
Mail list logo