Vajrasky Kok added the comment:
Okay, it looks like it has been fixed. The format has changed as well.
Previously:
5 hours ago R David Murray Merge: #18657: remove duplicate entries from
Misc/ACKS.default tip
5 hours ago R David Murray #18657: remove duplicate entries from
Petr.Salinger added the comment:
It is related to
http://bugs.python.org/issue12958
http://bugs.python.org/issue17684
The second one changed support.anticipate_failure to unittest.skipIf
--
nosy: +Petr.Salinger
___
Python tracker
Roundup Robot added the comment:
New changeset 238c37e4c395 by Jason R. Coombs in branch 'default':
Issue 18532: Added tests and documentation to formally specify the .name
attribute on hashlib objects.
http://hg.python.org/cpython/rev/238c37e4c395
--
nosy: +python-dev
Jason R. Coombs added the comment:
I've confirmed the tests pass and the updated documentation renders nicely and
without warnings. These changes now make the name attribute
officially-supported and tested.
--
resolution: - fixed
___
Python
Vajrasky Kok added the comment:
Wait, something weird is happening in CPython commits log website,
http://hg.python.org/cpython .
These are the latest four commits.
age author description
45 hours agoJason R. Coombs Issue 18532: Added tests and
documentation to formally
Ezio Melotti added the comment:
This is a separate issue though, isn't it?
Have you tried to ctrl+f5 the page?
(Also this is probably something that should be reported to the Mercurial bug
tracker, since -- unlike the issue links -- is not something we modified.)
--
nosy:
timm added the comment:
I would find it useful to have the exception classes listed in the Python
documentation rather than having to refer to two documents, but I don't have
strong feelings on this.
Given that nobody has fixed this for 4 years, should we just close the ticket?
I'd be happy
Ned Deily added the comment:
While it looks unusual, the commit list is fine. It reflects what you see
currently in a hg log. What happened is that someone imported an older local
change set or something similar. It's not always easy to tell from the log.
--
resolution: - invalid
New submission from Vajrasky Kok:
There is test_precision in Lib/test_format.py which is not being unit tested.
Also, there is a unused variable inside test_precision.
Attached the patch to fix these problems.
--
components: Tests
files: test_precision.patch
keywords: patch
messages:
Serhiy Storchaka added the comment:
Can you add a reference for the coefficients?
I have only link to Wikipedia which refers to Code of Federal Regulations
§73.682. This link (http://en.wikipedia.org/wiki/YIQ) already mentioned at the
top of the file.
(You claim about the current rounding
New submission from Louis RIVIERE:
A call to os.read that used to work on older Linux kernel, doesn't anymore with
newer Linux kernel.
As a workaroud we can use libc.read (ctypes) instead of os.read.
But I feel like os.read should work, as it used to.
The code (and comments) can be seen here :
Mark Dickinson added the comment:
Patch looks good to me.
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18659
___
___
Roundup Robot added the comment:
New changeset cfd875bcbe41 by Mark Dickinson in branch 'default':
Issue #18659: fix test_format test that wasn't being executed. Thanks Vajrasky
Kok for the patch.
http://hg.python.org/cpython/rev/cfd875bcbe41
--
nosy: +python-dev
Mark Dickinson added the comment:
Fixed. Thanks!
--
assignee: - mark.dickinson
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18659
New submission from Vajrasky Kok:
I guess, there is a typo in Modules/grpmodule.c. See the patch below:
diff -r f4f81ebc3de9 Modules/grpmodule.c
--- a/Modules/grpmodule.c Sun Aug 04 15:50:08 2013 -0400
+++ b/Modules/grpmodule.c Mon Aug 05 17:40:33 2013 +0800
@@ -10,7 +10,7 @@
Mark Dickinson added the comment:
{0} is fine; some compilers will warn about it, but I believe it's valid C.
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18661
Mark Dickinson added the comment:
Okay, that caused some buildbots to fail. I'm going to back out the change
until I have time to figure out what's going on.
--
resolution: fixed -
status: closed - open
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 9bee1fd64ee6 by Mark Dickinson in branch 'default':
Issue #18659: Backed out changeset cfd875bcbe41 after buildbot failures.
http://hg.python.org/cpython/rev/9bee1fd64ee6
--
___
Python tracker
Mark Dickinson added the comment:
Sample buildbot output here:
http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/2485/steps/test/logs/stdio
Relevant snippet:
test_precision (test.test_format.FormatTest) ... FAIL
Vajrasky Kok added the comment:
Let me help you to debug this issue.
ethan@amiau:~/Documents/code/python/cpython$ cat /tmp/a.py
import sys
INT_MAX = sys.maxsize
f = 1.2
format(f, .%sf % (INT_MAX + 1))
ethan@amiau:~/Documents/code/python/cpython$ ./python /tmp/a.py
Traceback (most recent call
Changes by Ronald Oussoren ronaldousso...@mac.com:
--
nosy: +ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18660
___
___
Vajrasky Kok added the comment:
For now, instead of hardcoding INT_MAX to 2147483647 in test, maybe we can use
module:
import IN
IN.INT_MAX
2147483647
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18659
Mark Dickinson added the comment:
+1 on the name 'first_true'. Does exactly what it says on the tin.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
Hynek Schlawack added the comment:
+1 on the name 'first_true'. Does exactly what it says on the tin.
I fully agree.
***
I assume what's missing now is a permission from Raymond to mess with his turf?
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
The objection to zipfile-no-crc32.patch is that binascii.crc32() and _crc32()
have different signatures. binascii.crc32() accepts a byte object while
_crc32() accepts a single integer. With packing this value into a bytes object
_crc32() will be much
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +haypo, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18659
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - Segfault when using re.finditer over mmap
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Agree.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13083
___
___
Python-bugs-list mailing list
STINNER Victor added the comment:
The IN module must not be used, it is hardcoded and never regenerated.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18659
___
STINNER Victor added the comment:
I added the test in the following commit:
changeset: 84266:ef5175d08e7e
branch: 3.3
parent: 84263:7ecca1a98220
user:Victor Stinner victor.stin...@gmail.com
date:Sun Jun 23 14:54:30 2013 +0200
files: Lib/test/test_format.py
Serhiy Storchaka added the comment:
We have _testcapi.INT_MAX.
I guess different exceptions raised on 64-bit platform. First parser checks
that a number can be represented as Py_ssize_t (i.e. = PY_SSIZE_T_MAX). Here
Too many decimal digits in format string can be raised. Then precision passed
Vajrasky Kok added the comment:
For the passers-by who want to help:
The precision too big exception is raised in Python/formatter_unicode.c line
1168 and 1002.
The Too many decimal digits... exception is raised in
Python/formatter_unicode.c line 71.
So the question is whether it is
Ezio Melotti added the comment:
I like the patch.
Can you make ./python Lib/test/test_json/ work too? Currently it doesn't
seem to work (it works for e.g. ./python Lib/test/test_email/).
--
stage: - patch review
___
Python tracker
Ezio Melotti added the comment:
LGTM.
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14323
___
___
João Bernardo added the comment:
Seems like just because I never used I don't support. Boost C++ libraries has
a wait_for_any functionality to synchronize futures. C# has a WaitAny in the
WaitHandle class (like our Condition).
Another problem is: the Condition class cannot be easily
Ezio Melotti added the comment:
[...] and ASCII are fine with me.
Perhaps there could be an argument controlling where to truncate
(left, right or centre). A good use-case for the new Enums, perhaps? :-)
I wrote a similar function once and in addition to the width it had this
feature too
Ezio Melotti added the comment:
Perhaps shorten would be a better name -- summarize sounds smarter than it
actually is :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18585
___
Vajrasky Kok added the comment:
Okay, I guess the fix for this ticket should be kept simple.
If we want to merge the exception message or touch the code base or do
something smarter than fixing the test, maybe we should create a separate
ticket.
So I used Serhiy Storchaka's suggestion to use
R. David Murray added the comment:
Looking just at the proposed functionality (taking a prefix) and ignoring the
requested complexification :), the usual name for the text produced by this
process is a lead
(http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Lead_section), although
Ezio Melotti added the comment:
I'm a bit late but I still have a few comments:
+ The paren-using form also means that when the exception arguments are
+ long or include string formatting, you don't need to use line
+ continuation characters thanks to the containing parentheses.
This
Steven D'Aprano added the comment:
On 03/08/13 13:22, Alexander Belopolsky wrote:
Alexander Belopolsky added the comment:
The implementation of median and mode families of functions as classes is
clever,
So long as it is not too clever.
but I am not sure it is a good idea to return
Tim Golden added the comment:
Here's an updated patch against trunk with tests doc changes
--
status: languishing - open
Added file: http://bugs.python.org/file31165/issue2528.2.patch
___
Python tracker rep...@bugs.python.org
Tim Golden added the comment:
... and to answer Amaury's question in msg109871 it creates a reasonable
consistency between the results of os.access and the user's actual ability to
read / write a file. eg, you might have no permissions whatsoever on the file
but as long as it wasn't
Laszlo Papp added the comment:
This has just made me switching away from xml.etree.ElementTree today, sadly.
What a pity; it would have been all kind of cool to stick to this minimal,
otherwise working parser and builder.
--
nosy: +lpapp
___
Python
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18606
___
___
Mark Dickinson added the comment:
Fixed. Thanks for the report!
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - behavior
versions: +Python 2.7, Python 3.3
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 395ac61ebe1a by Mark Dickinson in branch '2.7':
Issue #18661: typo in grp.struct_group docstring.
http://hg.python.org/cpython/rev/395ac61ebe1a
New changeset 791034a0ae1e by Mark Dickinson in branch '3.3':
Issue #18661: typo in grp.struct_group
Mark Dickinson added the comment:
I too find the use of a class that'll never be instantiated peculiar.
As you say, there's no state to be stored. So why not simply have separate
functions `median`, `median_low`, `median_high`, `median_grouped`, etc.?
--
New submission from James Laver:
Traceback (most recent call last):
File /Users/jlaver/retest.py, line 6, in test_escape
self.assertEquals(re.escape('-'), '-')
AssertionError: '\\-' != '-'
The only place you can do bad things with hyphens is in a character class. I
fail to see how you'd
Matthew Barnett added the comment:
The help says:
help(re.escape)
Help on function escape in module re:
escape(pattern)
Escape all the characters in pattern except ASCII letters, numbers and '_'.
The complementary approach is to escape _only_ the metacharacters.
--
James Laver added the comment:
Quite right, it does say that in the documentation. The documentation is
perfectly correct, but the behaviour is wrong in my opinion and as you suggest,
we should be escaping metacharacters only.
--
___
Python tracker
New submission from py.user:
http://docs.python.org/3/library/unittest.html#unittest.TestCase.assertAlmostEqual
If delta is supplied instead of places then the difference between first and
second must be less (or more) than delta.
--
assignee: docs@python
components: Documentation
Steven D'Aprano added the comment:
On 06/08/13 03:08, Mark Dickinson wrote:
I too find the use of a class that'll never be instantiated peculiar.
I'll accept unusual, but not peculiar. It's an obvious extension to classes
being first-class objects. We use classes as objects very frequently,
Changes by Tim Golden m...@timgolden.me.uk:
Removed file: http://bugs.python.org/file9919/os_access-r62091.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2528
___
Ned Deily added the comment:
Make sure the tests still work when run from an installed Python rather than
just from a build directory. In particular, if you rename test directories,
you will need to change LIBSUBDIRS in Makefile.pre.in to ensure the directories
and their files are installed.
Antoine Pitrou added the comment:
Looking just at the proposed functionality (taking a prefix) and
ignoring the requested complexification :), the usual name for the
text produced by this process is a
lead (http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Lead_section),
although
Alexander Belopolsky added the comment:
On Mon, Aug 5, 2013 at 2:14 PM, Steven D'Aprano rep...@bugs.python.orgwrote:
As you say, there's no state to be stored. So why not simply have
separate functions `median`, `median_low`, `median_high`, `median_grouped`,
etc.?
Why have a
Mark Dickinson added the comment:
My only objection is to having a class xyz such that isinstance(xyz(..),
xyz) is false.
Yep. Use a set of functions (median, median_low); use an instance of a class
as Alexander describes; use a single median function that takes an optional
method
Terry J. Reedy added the comment:
I agree. Go ahead and push.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14323
___
___
Python-bugs-list
Terry J. Reedy added the comment:
Ezio 2. Explicitly say use 'as' instead of ','. Someone who does not know
that 'as' is available since 2.6 may not understand.
3. 'byte' may be interpreted as 'char', especially for someone using 2.x
'bytes'.
--
R. David Murray added the comment:
Technically a bytes object is sequence of integers, not a sequence of bytes.
That is, if you iterate it, you get integers. Python doesn't have a 'byte'
type.
--
nosy: +r.david.murray
___
Python tracker
Mark Dickinson added the comment:
LGTM too.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14323
___
___
Python-bugs-list mailing list
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18078
___
___
Alex Henderson added the comment:
Proposed patch copied over from duplicate issue 17372.
--
keywords: +patch
nosy: +alex.henderson
Added file: http://bugs.python.org/file31168/issue14465.patch
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Your patch is now committed. Thanks for contributing!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4885
Roundup Robot added the comment:
New changeset 1754b7900da1 by Antoine Pitrou in branch 'default':
Issue #4885: Add weakref support to mmap objects. Patch by Valerie Lambert.
http://hg.python.org/cpython/rev/1754b7900da1
--
nosy: +python-dev
___
Roundup Robot added the comment:
New changeset 862ab99ab570 by Antoine Pitrou in branch 'default':
Issue #17934: Add a clear() method to frame objects, to help clean up expensive
details (local variables) and break reference cycles.
http://hg.python.org/cpython/rev/862ab99ab570
--
Antoine Pitrou added the comment:
Ok, I committed the RuntimeError-raising version.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17934
Antoine Pitrou added the comment:
frame.clear() was committed in issue17934, it would allow a less brutal
resolution.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9815
___
Antoine Pitrou added the comment:
frame.clear() was committed in issue17934.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1565525
___
Antoine Pitrou added the comment:
I would like to chime in and say that the fact that the functions exists in SQL
(and possibly Lisp, Snobol and PHP) sells me on the idea!
Okay, only joking, but I do think this is a useful addition.
first_true should be its name, but itertools already has a
Antoine Pitrou added the comment:
(but you don't have to trust me: itertools also has izip_longest() and
combinations_with_replacement())
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
New submission from Antoine Pitrou:
http://buildbot.python.org/all/builders/AMD64%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1021
==
FAIL: test_finalize_with_trace (test.test_threading.ThreadTests)
Alexander Belopolsky added the comment:
According to this comment, ssb.values can be null:
/* A sortslice contains a pointer to an array of keys and a pointer to
* an array of corresponding values. In other words, keys[i]
* corresponds with values[i]. If values == NULL, then the keys are
*
STINNER Victor added the comment:
I realized that the new tests checking that precision larger with
INT_MAX fail should be marked as specific to CPython. The import of
_testcapi should be moved to a CPython specific test.
--
___
Python tracker
STINNER Victor added the comment:
frame.clear() was committed in issue17934.
How should it be used to workaround this issue (tracebacks eat up memory by
holding references to locals and globals when they are not wanted)?
We need maybe an helper to clear all frames referenced by a traceback?
STINNER Victor added the comment:
Assertion failed: !PyErr_Occurred(), file ..\Objects\object.c, line 451
This error means that PyObject_Repr() was called with an exception set. It
would help to know which function called PyObject_Repr() and when.
--
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +christian.heimes, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18664
___
Vajrasky Kok added the comment:
Attached the third patch. The importing _testcapi part was moved inside the
test. Added cpython support only decorator for this test.
--
Added file: http://bugs.python.org/file31169/test_precision_v3.patch
___
Python
New submission from Vajrasky Kok:
See the patch for details:
diff -r 438cdc97d8ee Include/frameobject.h
--- a/Include/frameobject.h Mon Aug 05 23:35:43 2013 +0200
+++ b/Include/frameobject.h Tue Aug 06 12:38:15 2013 +0800
@@ -36,7 +36,7 @@
non-generator frames. See the
New submission from Vajrasky Kok:
There is a unused variable in Lib/test/test_frame.py.
def test_clear_executing_generator(self):
# Attempting to clear an executing generator frame is forbidden.
endly = False
def g():
nonlocal endly
try:
Ezio Melotti added the comment:
Can you attach the patch to the issue?
Full stops for one-sentence comments can be omitted.
--
nosy: +ezio.melotti
stage: - needs patch
type: - enhancement
versions: +Python 2.7, Python 3.3
___
Python tracker
Ezio Melotti added the comment:
In #2650 re.escape() was updated to match Perl's behavior. I don't think
there's any actual reason to change it -- it brings no benefits and it might
break some code (even if admittedly it's not very likely).
--
type: behavior - enhancement
versions:
83 matches
Mail list logo