Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23842
___
Roundup Robot added the comment:
New changeset cd7d51b5c951 by Serhiy Storchaka in branch '2.7':
Issue #23842: os.major(), os.minor() and os.makedev() now support ints again.
https://hg.python.org/cpython/rev/cd7d51b5c951
New changeset 998d967b8a57 by Serhiy Storchaka in branch '3.4':
Issue
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23842
___
___
Python-bugs-list
New submission from Matthias Klose:
an unreleased version of cinder fails a test when run with python 2.7 from the
branch. I don't have a test case yet, but looking at the error message and
list of fixed issues after the 2.7.9 release, the fix for issue #23098 could be
the culprit.
FAIL:
STINNER Victor added the comment:
return '%d:%d' % (os.major(st.st_rdev), os.minor(st.st_rdev))
Can you check if the error comes from os.major() or os.minor(), and please
provide the value of st_rdev?
You can modify the unit test to catch SystemError and raise a new exception
with more
Matthias Klose added the comment:
so the culprit is an optimization:
Committed to 2.7 with small change: stat() and makedev() should return int
instead of long if possible.
the test case however expects a long. st_dev is now not always a long, but an
int or long depending on the value.
Matthias Klose added the comment:
no, simpler:
import os
os.minor(os.makedev(8,65))
Traceback (most recent call last):
File stdin, line 1, in module
SystemError: ../Objects/longobject.c:998: bad argument to internal function
os.major(os.makedev(8,65))
Traceback (most recent call last):
Changes by Matthias Klose d...@debian.org:
--
nosy: +benjamin.peterson
priority: normal - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23842
___
STINNER Victor added the comment:
Obviously, an unit test is missing ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23842
___
___
Matthias Klose added the comment:
casting to a long works ...
os.major(long(os.makedev(8,65)))
8
so maybe revert that optimization for the released branches?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23842
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23842
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Oh, this is a catch when backport to 2.7. Here is a patch that makes dev_t
converter to support int and int-like types. Added tests (surprisingly there
were no tests for makedev/major/minor at all).
so maybe revert that optimization for the released
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23842
___
13 matches
Mail list logo