Zachary Ware added the comment:
I think the key point that you're missing (and which I could have made clearer
in my previous message) is that `Decimal(2.675) != Decimal('2.675')`. In the
first case, a Decimal instance is created from a float, and 2.675 cannot be
represented perfectly in
umedoblock added the comment:
last compared results are different.
should be bug or at least think that how to get a same result
about D(round(df2, 2)) == D(round(ds2, 2))
from decimal import Decimal as D
f1 = 1.65
s1 = str(f1)
df1 = D(f1)
ds1 = D(s1)
f2 = 2.675
s2 = str(f2)
df2 = D(f2)
umedoblock added the comment:
In this case.
round(1.65, 1) == 1.7
False
round(2.675, 2) == 2.68
False
I never say anything.
Because I understand what you said.
But I use the decimal module.
please pay attention to use decimal module.
--
___
Python
Carol Willing added the comment:
Steve and Zach, If you are happy with the changes, I have no objection to
committing and closing this issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17570
umedoblock added the comment:
I have a headache.
because python reports many error after I patched below patches.
--- Lib/test/test_decimal.py.orig 2015-08-08 17:41:01.986316738 +0900
+++ Lib/test/test_decimal.py2015-08-08 17:41:05.470316878 +0900
@@ -1935,6 +1935,7 @@
Larry Hastings added the comment:
This is a legitimate problem and I'd definitely like it fixed.
However, the angle brackets and the quote marks are ugly:
decode(obj, encoding='sys.getdefaultencoding()', errors='strict')
Attached is a tweaked version of the patch that sidesteps the
Pierre Quentel added the comment:
Victor, you can apply the patch and close the issue.
Le 7 août 2015 17:12, Peter Landry rep...@bugs.python.org a écrit :
Peter Landry added the comment:
A new patch that simply removes Content-Length from part headers when
present.
--
Added
Serhiy Storchaka added the comment:
How with more complex expressions, like sys.getdefaultencoding() or 'utf-8'.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
Merlijn van Deen added the comment:
As Zachary explained, the behavior is correct. There are three issues in play
here.
1) The rounding method. With the ROUND_HALF_EVEN rounding mode, .5 is rounded
to the nearest *even* number, so 1.65 is rounded to 1.6, while 1.75 is rounded
to 1.8.
2)
Roundup Robot added the comment:
New changeset e33f2b8b937f by Stefan Krah in branch '3.5':
Issue #15944: memoryview: Allow arbitrary formats when casting to bytes.
https://hg.python.org/cpython/rev/e33f2b8b937f
New changeset c7c4b8411037 by Stefan Krah in branch 'default':
Merge #15944.
Stefan Krah added the comment:
Done. Thanks for the patch.
--
components: +Interpreter Core
resolution: - fixed
stage: patch review - resolved
status: open - closed
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
Stefan Krah added the comment:
I would commit this, except that I'm not too happy with the use of
the term bytes-like in general. Yesterday I mistyped this:
import ctypes
x = ctypes.c_double
m = memoryview(x)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError:
Antoine Pitrou added the comment:
The thing is, most users don't know what the buffer protocol is (even Numpy
users, probably), while bytes-like at least will make some sense - even
though I agree it's an imperfect approximation.
--
___
Python
Stefan Krah added the comment:
For end users it's probably adequate. But several committers find
the term confusing (msg236283, msg188484). :)
Anyway, I'm going to commit this since it adds clarity.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset d1ef54751412 by Stefan Krah in branch '3.5':
Issue #23756: Clarify the terms contiguous and bytes-like object.
https://hg.python.org/cpython/rev/d1ef54751412
New changeset c59b2c4f4cac by Stefan Krah in branch 'default':
Merge #23756.
Stefan Krah added the comment:
Martin, thanks for the patch!
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
versions: +Python 3.6 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23756
umedoblock added the comment:
excuse me.
I understand ROUND_HALF_EVEN meaning.
I think that __round__() function work ROUND_HALF_UP.
so sorry.
I don't have exactly knowledge about ROUND_HALF_EVEN.
I misunderstand about ROUND_HALF_EVEN.
I have thought ROUND_HALF_EVEN means ROUND_HALF_UP.
SO
New submission from Xavier Morel:
It looks to be fixed in 3.3 and up, but in Python 2.7
import ast
m = ast.Module(body=[
ast.Expr(value=ast.Name(id='foo', ctx=ast.Store()))
])
ast.fix_missing_locations(m)
code = compile(m, '', mode='exec')
eval(code)
will
Adam Bartoš added the comment:
http://bugs.python.org/issue17620 is a duplicate, but with more discussion.
--
nosy: +Drekin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12854
___
Changes by eryksun eryk...@gmail.com:
--
resolution: - duplicate
status: open - closed
superseder: - Python interactive console doesn't use sys.stdin for input
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12854
New submission from Adam Bartoš:
Currently, if one redirects stdout, readline hook is not used (see
https://hg.python.org/cpython/file/default/Parser/myreadline.c#l208). I would
assume that if I run Python as py -i output.txt, I can use GNU readline or
other readline hook for input just like
New submission from kedar mhaswade:
I am a n00b Python programmer. So far, I am loving Python! Thank you.
Apologies if this has been already reported. A rudimentary search did not fetch
anything and hence I am filing this as an enhancement request. If it has been
already reported, please
R. David Murray added the comment:
Although this isn't a strict duplicate of issue 18162, the strict duplicate,
issue 1534607, was closed as a duplicate of issue 18162, so I'm doing the same
here. Issue 18162 will address this issue by providing a useful default
message that the interpreter
Chetan Reddy added the comment:
I'm seeing the same exception as op with Python-3.5.0b4.
I'm writing a function in a library, and am using asyncio to make my function
run faster. I'd like my library function to be useful even to users who aren't
using asyncio and therefore won't call
New submission from Stefan Krah:
On my machine (Lenovo T400, Linux) the load average during running
the 2.7 test suite is about 0.5 (with some exceptions like test_io).
The system is still usable even during test_io.
In 3.6 the load average is 2.0, with some tests making
the system
Stefan Krah added the comment:
Scratch the comment about test_io in 2.7: It also renders the
system unusable.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24831
___
Yury Selivanov added the comment:
Larry, Serhiy,
After giving this some thought I think that my initial patch is a wrong
approach here -- inspect module should not be touched to fix this issue.
With this patch applied, signature object for codecs.encode would have a
Parameter with a bogus
Changes by Steve Dower steve.do...@microsoft.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23970
___
Steve Dower added the comment:
Fixed this, and forgot I had a bug open for it so I didn't reference it from
the commit.
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
Steve Dower added the comment:
I did not get a helpful response from the compiler team, so the optimized
function will have to stay disabled for 3.5.
Moving this to 3.6 in the hope that we can figure it out by then.
--
versions: +Python 3.6 -Python 3.5
Changes by Steve Dower steve.do...@microsoft.com:
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19450
___
Roundup Robot added the comment:
New changeset 1df7a0821c73 by Steve Dower in branch '3.5':
Issue #24634: Importing uuid should not try to load libc on Windows
https://hg.python.org/cpython/rev/1df7a0821c73
--
nosy: +python-dev
___
Python tracker
Roundup Robot added the comment:
New changeset 90e2747425ad by Steve Dower in branch '2.7':
Issue #24634: Importing uuid should not try to load libc on Windows
https://hg.python.org/cpython/rev/90e2747425ad
--
___
Python tracker
Steve Dower added the comment:
Done for 2.7, 3.5 and 3.6. Decided against touching 3.4 because it's not really
an issue with MSVC 10.0, just 9.0 and 14.0. And I used eryksun's suggested
approach.
--
resolution: - fixed
stage: - resolved
status: open - closed
Antoine Pitrou added the comment:
Just to diagnose this, try to run the test suite with nice. If it still make
the system unusable, then it's probably an I/O issue rather than CPU scheduling.
--
nosy: +pitrou
___
Python tracker
Mark Roseman added the comment:
Yes that's exactly what I was thinking. If everything is a frame rather than a
toplevel it'll be much easier to reconfigure things.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24826
New submission from R. David Murray:
After doing a make clean in Doc, the built documents no longer rendered
correctly. I tracked this down to the Sphinx warning I'd been ignoring for a
while:
WARNING: 'default' html theme has been renamed to 'classic'. Please change your
html_theme setting
Chetan Reddy added the comment:
Disregard my previous comment. I realize now that I shouldn't be calling
run_until_complete in a library function because it will fail if the user had
already started running the event loop. I will attempt to use a create and use
a new event loop in my library
Carol Willing added the comment:
Is the behavior different in default or 3.5 release and 2.7 release?
The default branch has html_theme in Doc/conf.py
https://hg.python.org/cpython/file/default/Doc/conf.py set to 'pydoctheme'.
The 2.7 branch has html_theme in Doc/conf.py
Larry Hastings added the comment:
FWIW I set up a test harness that runs test_collections and odict_reproduce
with monotonically increasing PYTHONHASHSEED values. I let it run overnight;
it's now past iteration 158600. Apart from some weirdness in the low 70ks that
I can't reproduce it's
Larry Hastings added the comment:
Can we do better? How about a new field on the Parameter object,
symbolic_default_value, which shows you the expression used to compute the
value? We could then set default_value to the result of the expression, pydoc
could print the symbolic expression,
Yury Selivanov added the comment:
Can we do better? How about a new field on the Parameter object,
symbolic_default_value, which shows you the expression used to compute the
value? We could then set default_value to the result of the expression,
pydoc could print the symbolic
David Bolen added the comment:
While running a manual test (make buildbottest) on my 2.7 Ubuntu buildbot, I
ran into an exception in this patch:
The tail end of the test run:
[401/401/1] test_signal
379 tests OK.
1 test failed:
test_curses
21 tests skipped:
test_aepack test_al
Larry Hastings added the comment:
I just tried every module, simulating pydoc on it. codecs is the only one that
failed. So, I can live with just changing codecs for now. But let's do it
properly in 3.6. Go ahead and check in for 3.5--or, if you don't get it done
before I want to tag the
R. David Murray added the comment:
I only checked this on 3.5 and 3.6, but 3.4 is using pydoctheme, and python2.7
is using default. So presumably none of them will build using Sphinx 1.3.1.
Yuri's change appears to be undoing a change he inadvertently committed, which
was probably a change
Serhiy Storchaka added the comment:
sys.getdefaultencoding() always returns utf-8 in 3.x (it left for
compatibility with 2.x). I suggested to set defaults to literal utf-8. This
matches documentation and signatures of str.encode() and bytes.decode().
--
Changes by R. David Murray rdmur...@bitdance.com:
--
resolution: fixed -
stage: resolved - needs patch
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24751
___
Serhiy Storchaka added the comment:
Any specific tests or all tests? 3.x has many new features in comparison with
2.x, and new tests for these features. For example zipfile and tarfile tests
run much longer due to testing with bzip2 and lzma compressions.
--
nosy: +serhiy.storchaka
Larry Hastings added the comment:
That's a fine change for 3.5. For 3.6 I want to solve the general problem, at
which point we can switch back to calling sys.getdefaultencoding() if we like.
Serhiy, can you make a patch a post it here? I want to tag 3.5.0rc1 in one or
two hours.
--
Serhiy Storchaka added the comment:
The patch is easy.
In future we should unify docstrings for codecs.encode() and codecs.decode()
with str.encode(), bytes.decode() and like.
--
Added file: http://bugs.python.org/file40153/codecs_default_encoding.patch
Marc-Andre Lemburg added the comment:
Please use encoding='utf-8' as definition for codecs.encode() and
codecs.decode().
There is no adjustable default encoding in Python 3 anymore.
For Python 3.6 this should probably be fixed everywhere.
--
___
Carol Willing added the comment:
David, Thanks for pointing this out. I totally forgot that the 2 and 3 versions
use different themes :(
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24832
Larry Hastings added the comment:
Please change Default encoding is to The default encoding is. Apart from
that, LGTM, please check in!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
Larry Hastings added the comment:
Can we mark this closed now?
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23973
___
___
Larry Hastings added the comment:
Did this work as hoped in beta 4? Can we mark it as fixed now?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24585
___
Larry Hastings added the comment:
If this is now fixed but still needs a unit test, can I change it from release
blocker to high priority?
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24732
Larry Hastings added the comment:
I assume what we've got is good enough for rc1?
Can we mark this closed / reduce the priority from release blocker?
Note that there are few (if any) restrictions on fixing docs during the release
candidates. (Though after today we'll be switching to the
Steve Dower added the comment:
We won't really know until we've gotten feedback from people with b4 who
install rc1 - the upgrade step is the part that needs testing, and that takes
two releases.
If you want to pull the priority down though, go ahead.
--
STINNER Victor added the comment:
Not today. I'm in holiday. Ping me in two weeks or find another core dev.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24764
___
Al Sweigart added the comment:
Is this a duplicate of https://bugs.python.org/issue9262 Either way, there's
some good discussion there and also on https://bugs.python.org/issue24750
(ctrl-f for tabbed)
--
nosy: +Al.Sweigart
___
Python tracker
Zachary Ware added the comment:
Ah. The problem is on 2.7 only; 3.x calls sorted() on the set operation. The
set operation should just go away, though; we don't count ENV_CHANGED as 'bad'
anymore.
Will fix shortly.
--
___
Python tracker
Zachary Ware added the comment:
I'm glad you understand it now :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24827
___
___
Python-bugs-list
Zachary Ware added the comment:
Which version of Sphinx are you using? The Docs buildbot is happily building
with 1.3.1 (though failing the lint check, which I missed when it started).
--
nosy: +zach.ware
___
Python tracker rep...@bugs.python.org
Changes by Zachary Ware zachary.w...@gmail.com:
--
assignee: - zach.ware
resolution: - fixed
stage: needs patch - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24751
Roundup Robot added the comment:
New changeset 7d69b214e668 by Zachary Ware in branch '2.7':
Issue #24751: Fix running regrtest with '-w' flag in case of test failures.
https://hg.python.org/cpython/rev/7d69b214e668
--
___
Python tracker
65 matches
Mail list logo