This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients hroncok, mark.dickinson, vstinner
Date 2020-02-06.14:19:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580998797.08.0.0062662763261.issue39350@roundup.psfhosted.org>
In-reply-to
Content
I managed to test my PR with numpy:

$ env/bin/python 
>>> import fractions
>>> import numpy
>>> f=fractions.Fraction(numpy.int64(1*3), numpy.int64(2*3))
>>> f
Fraction(1, 2)
>>> type(f.numerator)
<class 'numpy.int64'>
>>> type(f.denominator)
<class 'numpy.int64'>

So it works as expected: numerator and denominator have the expected type, and there is no exception ;-)

I used the following commands to get numpy in a Python 3.9 virtual environment:

./python -m venv env
env/bin/python -m pip install https://github.com/cython/cython/archive/master.tar.gz --install-option="--no-cython-compile"
curl -O https://files.pythonhosted.org/packages/40/de/0ea5092b8bfd2e3aa6fdbb2e499a9f9adf810992884d414defc1573dca3f/numpy-1.18.1.zip
unzip -d . numpy-1.18.1.zip
cd numpy-1.18.1/
../env/bin/python setup.py install
History
Date User Action Args
2020-02-06 14:19:57vstinnersetrecipients: + vstinner, mark.dickinson, hroncok
2020-02-06 14:19:57vstinnersetmessageid: <1580998797.08.0.0062662763261.issue39350@roundup.psfhosted.org>
2020-02-06 14:19:57vstinnerlinkissue39350 messages
2020-02-06 14:19:56vstinnercreate