Fix #2193.

Merged Bitbucket Importer requested to merge bitbucket/merged-pr-361 into branch/default

Created originally on Bitbucket by posita (posita NA)

Was already merged in Bitbucket before import, marked as merged by the import user

Source changeset not longer availableat the time of import. Commit listwill look empty

isinstance(..., int) => isinstance(..., numbers.Integral) to allow for alternate int-like implementations (e.g., future.types.newint).

That looks like this does the trick:

% PYTHONPATH=.../pypy python
Python 2.7.10 (f3ad1e1e1d6215e20d34bb65ab85ff9188c9f559, Sep 04 2015, 05:13:03)
[PyPy 2.6.1 with GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>> import lib_pypy.datetime
>>>> from builtins import int as _int
>>>> i = int(1431216000)
>>>> k = _int(i)
>>>> lib_pypy.datetime.timedelta(seconds=i)
>>>> lib_pypy.datetime.timedelta(seconds=k)

I took a look at pypy/module/test_lib_pypy/, but didn't see a need to add any tests (at least not without creating a dependency on future, which I'm assuming is undesirable).

Merge request reports