Giter Club home page Giter Club logo

fastnumbers's Introduction

fastnumbers

image

image

image

image

image

image

Super-fast and clean conversions to numbers.

fastnumbers is a module with the following three objectives (in order of decreasing importance as to why the module was created):

  1. Provide a set of convenience functions that wrap calls to int and float and provides easy, concise, powerful, fast and flexible error handling.
  2. Provide a set of functions that can be used to rapidly identify if an input could be converted to int or float.
  3. Provide drop-in replacements for the Python built-in int and float that are on par or faster with the Python equivalents (see the Timing section for details). These functions should behave identically to the Python built-ins except for a few specific corner-cases as mentioned in the API documentation for those functions.
    • PLEASE read the quick start for these functions to fully understand the caveats before using them.

What kind of speedups can you expect? Here are some highlights, but please see the Timing section for the raw data if you want details.

  • Up to 2x faster conversion of strings to integers than the built-in int() function
  • Up to 5x faster conversion of strings to floats than the built-in float() function (possibly greater for very long strings)
  • Up to 10x faster handling of errors during conversion than using user-side error handling
  • On top of the above, operations to convert a list of strings (with the map option or try_array function) is 2x faster than the equivalent list comprehension.

NOTICE: As of fastnumbers version 4.0.0, only Python >= 3.7 is supported.

NOTICE: As of fastnumbers version 4.0.0, the functions fast_real, fast_float, fast_int, fast_forceint, isreal, isfloat, isint, and isintlike have been deprecated and are replaced with try_real, try_float, try_int, try_forceint, check_real, check_float, check_int, and check_intlike, respectively. These new functions have more flexible APIs and have names that better reflect the intent of the functions. The old functions can still be used (they will never be removed from fastnumbers), but the new ones should be preferred for new development.

NOTICE: As of fastnumbers version 4.0.0, query_type now sets allow_underscores to False by default instead of True.

Quick Start

There are three broad categories of functions exposed by fastnumbers. The below quick start will demonstrate each of these categories. The quick start is "by example", and will show a sample interactive session using the fastnumbers API.

Error-Handling Functions

try_float will be used to demonstrate the functionality of the try_* functions.

>>> from fastnumbers import RAISE, try_float
>>> # Convert string to a float
>>> try_float('56.07')
56.07
>>> # Integers are converted to floats
>>> try_float(54)
54.0
>>>
>>> # Unconvertable string returned as-is by default
>>> try_float('bad input')
'bad input'
>>> # Unconvertable strings can trigger a default value
>>> try_float('bad input', on_fail=0)
0
>>>
>>> # One can ask inf or nan to be substituted with another value
>>> try_float('nan')
nan
>>> try_float('nan', nan=0.0)
0.0
>>> try_float(float('nan'), nan=0.0)
0.0
>>> try_float('56.07', nan=0.0)
56.07
>>>
>>> # The default built-in float behavior can be triggered with
>>> # RAISE given to "on_fail".
>>> try_float('bad input', on_fail=RAISE) #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
  ...
ValueError: invalid literal for float(): bad input
>>>
>>> # A function can be used to return an alternate value for invalid input
>>> try_float('bad input', on_fail=len)
9
>>> try_float(54, on_fail=len)
54.0
>>>
>>> # Single unicode characters can be converted.
>>> try_float('\u2164')  # Roman numeral 5 (V)
5.0
>>> try_float('\u2466')  # 7 enclosed in a circle
7.0

try_int behaves the same as try_float, but for integers.

>>> from fastnumbers import try_int
>>> try_int('1234')
1234
>>> try_int('\u2466')
7

try_real is like try_float or try_int depending on if there is any fractional component of thi return value.

>>> from fastnumbers import try_real
>>> try_real('56')
56
>>> try_real('56.0')
56
>>> try_real('56.0', coerce=False)
56.0
>>> try_real('56.07')
56.07
>>> try_real(56.07)
56.07
>>> try_real(56.0)
56
>>> try_real(56.0, coerce=False)
56.0

try_forceint always returns an integer.

>>> from fastnumbers import try_forceint
>>> try_forceint('56')
56
>>> try_forceint('56.0')
56
>>> try_forceint('56.07')
56
>>> try_forceint(56.07)
56

Fast operations on lists and other iterables

Each of the try_* functions have a map option causes the function to accept an iterable of items to convert and returns a list. Using try_float as an example, the following are all functionally equivalent.

>>> from fastnumbers import try_float
>>> iterable = ["5", "4.5", "34567.6", "32"]
>>> try_float(iterable, map=list) == list(map(try_float, iterable))
True
>>> try_float(iterable, map=list) == [try_float(x) for x in iterable]
True
>>> try_float(iterable, map=list) == list(try_float(iterable, map=True))
True

The difference is that the map option is 2x the speed of the list comprehension method, and 1.5x the speed of the map method. The reason is that it avoids Python function call overhead on each iteration. Note that True causes the function to return an iterator, and list causes it to return a list. In practice the performance of these are similar (see Timing for raw data).

If you need to store your output in a numpy array, you can use try_array to do this conversion directly. This function has some additional handling for overflow that is not present in the other fastnumbers functions that may come in handy when dealing with numpy arrays.

>>> from fastnumbers import try_array
>>> import numpy as np
>>> iterable = ["5", "4.5", "34567.6", "32"]
>>> np.array_equal(np.array(try_float(iterable, map=list), dtype=np.float64), try_array(iterable))
True

You will see about a 2x speedup of doing this in one step over converting to a list then converting that list to an array.

About the on_fail option

The on_fail option is a way for you to do anything in the event that the given input cannot be converted to a number. It can

  • return given object as-is if set to fastnumbers.INPUT (this is the default)
  • raise a ValueError if set to fastnumbers.RAISE
  • return a default value if given any non-callable object
  • call a function with the given object if given a single-argument callable

Below are a couple of ideas to get you thinking.

NOTE:: There is also an on_type_error option that behaves the same as on_fail except that a) it is triggered when the given object is of an invalid type and b) the default value is fastnumbers.RAISE, not fastnumbers.INPUT.

>>> from fastnumbers import INPUT, RAISE, try_float
>>> # You want to convert strings that can be converted to numbers, but
>>> # leave the rest as strings. Use fastnumbers.INPUT (the default)
>>> try_float('45.6')
45.6
>>> try_float('invalid input')
'invalid input'
>>> try_float('invalid input', on_fail=INPUT)
'invalid input'
>>>
>>>
>>>
>>> # You want to convert any invalid string to NaN
>>> try_float('45.6', on_fail=float('nan'))
45.6
>>> try_float('invalid input', on_fail=float('nan'))
nan
>>>
>>>
>>>
>>> # Simple callable case, send the input through some function to generate a number.
>>> try_float('invalid input', on_fail=lambda x: float(x.count('i')))  # count the 'i's
3.0
>>>
>>>
>>>
>>> # Suppose we know that our input could either be a number, or if not
>>> # then we know we just have to strip off parens to get to the number
>>> # e.g. the input could be '45' or '(45)'. Also, suppose that if it
>>> # still cannot be converted to a number we want to raise an exception.
>>> def strip_parens_and_try_again(x):
...     return try_float(x.strip('()'), on_fail=RAISE)
...
>>> try_float('45', on_fail=strip_parens_and_try_again)
45.0
>>> try_float('(45)', on_fail=strip_parens_and_try_again)
45.0
>>> try_float('invalid input', on_fail=strip_parens_and_try_again) #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
  ...
ValueError: invalid literal for float(): invalid input
>>>
>>>
>>>
>>> # Suppose that whenever an invalid input is given, it needs to be
>>> # logged and then a default value is returned.
>>> def log_and_default(x, log_method=print, default=0.0):
...     log_method("The input {!r} is not valid!".format(x))
...     return default
...
>>> try_float('45', on_fail=log_and_default)
45.0
>>> try_float('invalid input', on_fail=log_and_default)
The input 'invalid input' is not valid!
0.0
>>> try_float('invalid input', on_fail=lambda x: log_and_default(x, default=float('nan')))
The input 'invalid input' is not valid!
nan

About the denoise option

The denoise option is available on the try_real and try_forceint options. To best understand its usage, consider the following native Python behavior:

>>> int(3.453e21)
3452999999999999737856
>>> int(float("3.453e21"))
3452999999999999737856
>>> # Most users would likely expect this result from decimal.Decimal
>>> import decimal
>>> int(decimal.Decimal("3.453e21"))
3453000000000000000000
>>> # But watch out, even decimal.Decimal doesn't help for float input
>>> import decimal
>>> int(decimal.Decimal(3.453e21))
3452999999999999737856

Because the conversion of a float to an int goes through the C double data type which has inherent limitations on accuracy (See this Stack Overflow question for examples) the resulting int result has "noise" digits that are not part of the original float representation.

For functions where this makes sense, fastnumbers provides the denoise option to give you the results that decimal.Decimal would give for strings containing floats.

>>> from fastnumbers import try_real
>>> try_real(3.453e21)
3452999999999999737856
>>> try_real("3.453e21")
3452999999999999737856
>>> try_real(3.453e21, denoise=True)
3453000000000000000000
>>> try_real("3.453e21", denoise=True)
3453000000000000000000

Two things to keep in mind:

  1. The denoise option adds additional overhead to the conversion calculation, so please consider the trade-offs between speed and accuracy when determining whether or not to use it. It is significantly faster than using decimal.Decimal, but much slower than not using it at all.
  2. For string input, denoise will return results identical to decimal.Decimal. For float input, denoise will return results that are accurate to about 15 digits (C double can only store 16 decimal digits, so this means that only the last possible digit may not be accurate).

Checking Functions

check_float will be used to demonstrate the functionality of the check_* functions. There is also the query_type function.

>>> from fastnumbers import check_float
>>> from fastnumbers import ALLOWED, DISALLOWED, NUMBER_ONLY, STRING_ONLY
>>> # Check that a string can be converted to a float
>>> check_float('56')
True
>>> check_float('56', strict=True)
False
>>> check_float('56.07')
True
>>> check_float('56.07 lb')
False
>>>
>>> # Check if a given number is a float
>>> check_float(56.07)
True
>>> check_float(56)
False
>>>
>>> # Specify if only strings or only numbers are allowed
>>> check_float(56.07, consider=STRING_ONLY)
False
>>> check_float('56.07', consider=NUMBER_ONLY)
False
>>>
>>> # Customize handling for nan or inf (see API for more details)
>>> check_float('nan')
False
>>> check_float('nan', nan=ALLOWED)
True
>>> check_float(float('nan'))
True
>>> check_float(float('nan'), nan=DISALLOWED)
False

check_int works the same as check_float, but for integers.

>>> from fastnumbers import check_int
>>> check_int('56')
True
>>> check_int(56)
True
>>> check_int('56.0')
False
>>> check_int(56.0)
False

check_real is very permissive - any float or integer is accepted.

>>> from fastnumbers import check_real
>>> check_real('56.0')
True
>>> check_real('56')
True
>>> check_real(56.0)
True
>>> check_real(56)
True

check_intlike checks if a number is "int-like", if it has no fractional component.

>>> from fastnumbers import check_intlike
>>> check_intlike('56.0')
True
>>> check_intlike('56.7')
False
>>> check_intlike(56.0)
True
>>> check_intlike(56.7)
False

The query_type function can be used if you need to determine if a value is one of many types, rather than whether or not it is one specific type.

>>> from fastnumbers import query_type
>>> query_type('56.0')
<class 'float'>
>>> query_type('56')
<class 'int'>
>>> query_type(56.0)
<class 'float'>
>>> query_type(56)
<class 'int'>
>>> query_type(56.0, coerce=True)
<class 'int'>
>>> query_type('56.0', allowed_types=(float, int))
<class 'float'>
>>> query_type('hey')
<class 'str'>
>>> query_type('hey', allowed_types=(float, int))  # returns None

Drop-in Replacement Functions

PLEASE do not take it for granted that these functions will provide you with a speedup - they may not. Every platform, compiler, and data-set is different, and you should perform a timing test on your system with your data to evaluate if you will see a benefit. As you can see from the data linked in the Timing section, the amount of speedup you will get is particularly data-dependent. In general you will see a performance boost for floats (and this boost increases as the size of the float increases), but for integers it is largely dependent on the length of the integer. You will likely not see a performance boost if the input are already numbers instead of strings.

NOTE: in the below examples, we use from fastnumbers import int instead of import fastnumbers. This is because calling fastnumbers.int() is a bit slower than just int() because Python has to first find fastnumbers in your namespace, then find int in the fastnumbers namespace, instead of just finding int in your namespace - this will slow down the function call and defeat the purpose of using fastnumbers. If you do not want to actually shadow the built-in int function, you can do from fastnumbers import int as fn_int or something like that.

>>> # Use is identical to the built-in functions
>>> from fastnumbers import float, int
>>> float('10')
10.0
>>> int('10')
10
>>> float('bad input') #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
  ...
ValueError: invalid literal for float(): bad input

real is provided to give a float or int depending on the fractional component of the input.

>>> from fastnumbers import real
>>> real('56.0')
56
>>> real('56.7')
56.7
>>> real('56.0', coerce=False)
56.0

Timing

Just how much faster is fastnumbers than a pure python implementation? Please look https://github.com/SethMMorton/fastnumbers/tree/main/profiling.

High-Level Algorithm

For integers, CPython goes to great lengths to ensure that your string input is converted to a number correctly and losslessly (you can prove this to yourself by examining the source code for integer conversions). This extra effort is only needed for integers that cannot fit into a 64-bit integer data type - for those that can, a naive algorithm of < 10 lines of C code is sufficient and significantly faster. fastnumbers uses a heuristic to determine if the input can be safely converted with the much faster naive algorithm, and if so it does so, falling back on the CPython implementation for longer input strings. Most real-world numbers pass the heuristic and so you should generally see improved performance with fastnumbers for integers.

For floats, fastnumbers utilizes the ultra-fast fast_float::from_chars function to convert strings representing floats into a C double both quickly and safely - the conversion provides the same accuracy as the CPython float conversion function but instead of scaling linearly with length of the input string it seems to have roughly constant performance. By completely bypassing the CPython converter we get significant performance gains with no penalty, so you should always see improved performance with fastnumbers for floats.

Installation

Use pip!

$ pip install fastnumbers

How to Run Tests

Please note that fastnumbers is NOT set-up to support python setup.py test.

The recommended way to run tests is with tox. Suppose you want to run tests for Python 3.8 - you can run tests by simply executing the following:

$ tox run -e py38

tox will create virtual a virtual environment for your tests and install all the needed testing requirements for you.

If you want to run testing on all supported Python versions you can simply execute

$ tox run

You can change the how much "random" input your tests will try with

# Run fewer tests with "random" input - much faster
$ tox run -- --hypothesis-profile fast

# Run more tests with "random" input - takes much longer but is more thorough
$ tox run -- --hypothesis-profile thorough

If you want to run the performce analysis yourself, you can execute

# This assumes Python 3.9 - adjust for the version you want to profile
$ tox run -e py39-prof

If you do not wish to use tox, you can install the testing dependencies with the dev-requirements.txt file and then run the tests manually using pytest.

$ pip install -r dev/requirements.txt
$ pytest

Author

Seth M. Morton

History

Please visit the changelog on GitHub.

fastnumbers's People

Contributors

bmwiedemann avatar dependabot[bot] avatar odidev avatar pterjan avatar sethmmorton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fastnumbers's Issues

Drop support for Python 2.7 and Python 3.4

Describe the feature or enhancement
Remove support for Python 2.7 and Python 3.4, in all of

  • the code base
  • the tests
  • the dependencies
  • the setuptools allowed python versions
  • the build infrastructure

Provide a concrete example of how the feature or enhancement will improve fastnumbers

The fastnumbers codebase contains many #ifdefs for special Python 2.7 handling, and in some cases also Python 3.4 handling. It is challenging to read and even more challenging to maintain. The EOL for these versions are early 2020 and early 2019, respectively.

I will keep the fastnumbers 2.X branch as "long term support" for Python 2.7 and Python 3.4 and back-port bug fixes to that branch, but new features will not be supported.

Would you be willing to submit a Pull Request for this feature?

PRs are planned 😸

Unit test numeric issues on 32bit arm CPU

Describe the bug
I am getting a lot of unit test failures due to slight numeric issues on armv7

Expected behavior
Unit tests pass

Environment (please complete the following information):

  • Python Version: 3.7.3
  • OS openSUSE linux armv7l
  • Compiler (if known): gcc-9

To Reproduce

Executed pytest with PYTHONPATH set to the installation directory.

============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.0.1, py-1.8.0, pluggy-0.12.0
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/abuild/rpmbuild/BUILD/fastnumbers-2.2.1/.hypothesis/examples')
rootdir: /home/abuild/rpmbuild/BUILD/fastnumbers-2.2.1
plugins: hypothesis-4.32.2
collected 228 items

tests/test_builtins.py ..............................                    [ 13%]
tests/test_fastnumbers.py ....................................F......F.. [ 33%]
.............F.......F...............................................F.. [ 64%]
F............F.........................................................  [ 96%]
tests/test_fastnumbers_examples.py .........

FASNUMBERS NUMERICAL LIMITS FOR THIS COMPILER BEFORE PYTHON FALLBACK:
MAXIMUM INTEGER LENTH: 9
MAX NUMBER FLOAT DIGITS: 11
MAXIMUM FLOAT EXPONENT: 99
MINIMUM FLOAT EXPONENT: -98
                             [100%]

=================================== FAILURES ===================================
______________ TestFastReal.test_given_float_string_returns_float ______________

self = <test_fastnumbers.TestFastReal object at 0xb4f9c530>

    @given(floats(allow_nan=False))
>   @example(5.675088586167575e-116)
    @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_given_float_string_returns_float(self, x):

tests/test_fastnumbers.py:239: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_fastnumbers.TestFastReal object at 0xb4f9c530>, x = 3.402823466e+38

    @given(floats(allow_nan=False))
    @example(5.675088586167575e-116)
    @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_given_float_string_returns_float(self, x):
        y = repr(x)
>       assert fastnumbers.fast_real(y, coerce=False) == x
E       AssertionError: assert 3.4028234659999998e+38 == 3.402823466e+38
E        +  where 3.4028234659999998e+38 = <built-in function fast_real>('3.402823466e+38', coerce=False)
E        +    where <built-in function fast_real> = fastnumbers.fast_real

tests/test_fastnumbers.py:248: AssertionError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_given_float_string_returns_float(self=<test_fastnumbers.TestFastReal at 0xb4f9c530>, x=3.402823466e+38)
__________ TestFastReal.test_given_padded_float_strings_returns_float __________

self = <test_fastnumbers.TestFastReal object at 0xb4f97d30>

    @given(floats(allow_nan=False), integers(0, 100), integers(0, 100))
>   @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_given_padded_float_strings_returns_float(self, x, y, z):

tests/test_fastnumbers.py:287: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_fastnumbers.TestFastReal object at 0xb4f97d30>, x = 3.402823466e+38
y = '3.402823466e+38', z = 0

    @given(floats(allow_nan=False), integers(0, 100), integers(0, 100))
    @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_given_padded_float_strings_returns_float(self, x, y, z):
        y = "".join(repeat(space(), y)) + repr(x) + "".join(repeat(space(), z))
>       assert fastnumbers.fast_real(y, coerce=False) == x
E       AssertionError: assert 3.4028234659999998e+38 == 3.402823466e+38
E        +  where 3.4028234659999998e+38 = <built-in function fast_real>('3.402823466e+38', coerce=False)
E        +    where <built-in function fast_real> = fastnumbers.fast_real

tests/test_fastnumbers.py:295: AssertionError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_given_padded_float_strings_returns_float(self=<test_fastnumbers.TestFastReal at 0xb4f97d30>, x=3.402823466e+38, y=0, z=0)
_______ TestFastReal.test_returns_input_as_is_if_valid_and_key_is_given ________

self = <test_fastnumbers.TestFastReal object at 0xb4f77c90>

    @given(integers() | floats(allow_nan=False))
>   @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_returns_input_as_is_if_valid_and_key_is_given(self, x):

tests/test_fastnumbers.py:402: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_fastnumbers.TestFastReal object at 0xb4f77c90>, x = 3.402823466e+38

    @given(integers() | floats(allow_nan=False))
    @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_returns_input_as_is_if_valid_and_key_is_given(self, x):
        assert fastnumbers.fast_real(x, key=len) == x
>       assert fastnumbers.fast_real(repr(x), key=len) == x
E       AssertionError: assert 340282346599999978372335459157852291072 == 3.402823466e+38
E        +  where 340282346599999978372335459157852291072 = <built-in function fast_real>('3.402823466e+38', key=len)
E        +    where <built-in function fast_real> = fastnumbers.fast_real
E        +    and   '3.402823466e+38' = repr(3.402823466e+38)

tests/test_fastnumbers.py:410: AssertionError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_returns_input_as_is_if_valid_and_key_is_given(self=<test_fastnumbers.TestFastReal at 0xb4f77c90>, x=3.402823466e+38)
_________ TestFastFloat.test_with_range_of_exponents_correctly_parses __________

self = <test_fastnumbers.TestFastFloat object at 0xb4f9a970>

    def test_with_range_of_exponents_correctly_parses(self):
        for x in range(-300, 300):
            val = "1.0E{0:d}".format(x)
>           assert fastnumbers.fast_float(val) == float(val)
E           AssertionError: assert 1.0000000000000001e-98 == 1e-98
E            +  where 1.0000000000000001e-98 = <built-in function fast_float>('1.0E-98')
E            +    where <built-in function fast_float> = fastnumbers.fast_float
E            +  and   1e-98 = float('1.0E-98')

tests/test_fastnumbers.py:449: AssertionError
_____________ TestFastForceInt.test_given_float_string_returns_int _____________

self = <test_fastnumbers.TestFastForceInt object at 0xb4f97c90>

    @given(floats(allow_nan=False, allow_infinity=False))
>   @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_given_float_string_returns_int(self, x):

tests/test_fastnumbers.py:821: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_fastnumbers.TestFastForceInt object at 0xb4f97c90>
x = 3.402823466e+38

    @given(floats(allow_nan=False, allow_infinity=False))
    @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_given_float_string_returns_int(self, x):
        y = repr(x)
>       assert fastnumbers.fast_forceint(y) == int(x)
E       AssertionError: assert 340282346599999978372335459157852291072 == 340282346600000016151267322115014000640
E        +  where 340282346599999978372335459157852291072 = <built-in function fast_forceint>('3.402823466e+38')
E        +    where <built-in function fast_forceint> = fastnumbers.fast_forceint
E        +  and   340282346600000016151267322115014000640 = int(3.402823466e+38)

tests/test_fastnumbers.py:829: AssertionError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_given_float_string_returns_int(self=<test_fastnumbers.TestFastForceInt at 0xb4f97c90>, x=3.402823466e+38)
_________ TestFastForceInt.test_given_padded_float_strings_returns_int _________

self = <test_fastnumbers.TestFastForceInt object at 0xb521f1b0>

    @given(
>       floats(allow_nan=False, allow_infinity=False),
        integers(0, 100),
        integers(0, 100),
    )
    @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_given_padded_float_strings_returns_int(self, x, y, z):

tests/test_fastnumbers.py:847: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_fastnumbers.TestFastForceInt object at 0xb521f1b0>
x = 3.402823466e+38, y = '3.402823466e+38', z = 0

    @given(
        floats(allow_nan=False, allow_infinity=False),
        integers(0, 100),
        integers(0, 100),
    )
    @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_given_padded_float_strings_returns_int(self, x, y, z):
        y = "".join(repeat(space(), y)) + repr(x) + "".join(repeat(space(), z))
>       assert fastnumbers.fast_forceint(y) == int(x)
E       AssertionError: assert 340282346599999978372335459157852291072 == 340282346600000016151267322115014000640
E        +  where 340282346599999978372335459157852291072 = <built-in function fast_forceint>('3.402823466e+38')
E        +    where <built-in function fast_forceint> = fastnumbers.fast_forceint
E        +  and   340282346600000016151267322115014000640 = int(3.402823466e+38)

tests/test_fastnumbers.py:859: AssertionError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_given_padded_float_strings_returns_int(self=<test_fastnumbers.TestFastForceInt at 0xb521f1b0>, x=3.402823466e+38, y=0, z=0)
_____ TestFastForceInt.test_returns_input_as_is_if_valid_and_key_is_given ______

self = <test_fastnumbers.TestFastForceInt object at 0xb4f9cbd0>

    @given(integers() | floats(allow_nan=False, allow_infinity=False))
>   @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_returns_input_as_is_if_valid_and_key_is_given(self, x):

tests/test_fastnumbers.py:955: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_fastnumbers.TestFastForceInt object at 0xb4f9cbd0>
x = 3.402823466e+38

    @given(integers() | floats(allow_nan=False, allow_infinity=False))
    @mark.xfail(
        is_windows and (is_27 or is_34),
        reason="Non-optimal floating-point handling on older VS versions "
        "creates small errors when creating high-precision doubles.",
        strict=False,
    )
    def test_returns_input_as_is_if_valid_and_key_is_given(self, x):
        assert fastnumbers.fast_forceint(x, key=len) == int(x)
>       assert fastnumbers.fast_forceint(repr(x), key=len) == int(x)
E       AssertionError: assert 340282346599999978372335459157852291072 == 340282346600000016151267322115014000640
E        +  where 340282346599999978372335459157852291072 = <built-in function fast_forceint>('3.402823466e+38', key=len)
E        +    where <built-in function fast_forceint> = fastnumbers.fast_forceint
E        +    and   '3.402823466e+38' = repr(3.402823466e+38)
E        +  and   340282346600000016151267322115014000640 = int(3.402823466e+38)

tests/test_fastnumbers.py:963: AssertionError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_returns_input_as_is_if_valid_and_key_is_given(self=<test_fastnumbers.TestFastForceInt at 0xb4f9cbd0>, x=3.402823466e+38)

Crash isreal python 3.6.1

$ pyenv virtualenv 3.6.1 props_service-3.6.1
$ pyenv local props_service-3.6.1
$ ln -s $PYENV_ROOT/versions/3.6.1/envs/props_service-3.6.1 venv3.6.1
$ pip install -U pip setuptools
...
Successfully installed appdirs-1.4.3 packaging-16.8 pyparsing-2.2.0 setuptools-34.4.1 six-1.10.0
$ pip install -Ur requirements.txt 
...
Successfully installed PyICU-1.9.6 PyMySQL-0.7.11 PyYAML-3.12 aiodns-1.1.1 aiohttp-2.0.7 aiomysql-0.0.9 ansi2html-1.2.0 async-timeout-1.2.0 cchardet-2.0.0 chardet-3.0.2 coverage-4.3.4 fastnumbers-1.0.0 multidict-2.1.4 natsort-5.0.2 py-1.4.33 pycares-2.1.1 pytest-3.0.7 pytest-aiohttp-0.1.3 pytest-cov-2.4.0 pytest-html-1.14.2 pytest-metadata-1.3.0 pytest-quickcheck-0.8.2 uvloop-0.8.0 yarl-0.10.0
$ gdb --args venv3.6.1/bin/python3 props_service.py
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
...
Reading symbols from venv3.6.1/bin/python3...done.
(gdb) r
Starting program: /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3 props_service.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2017-04-13 13:02:53,802 INFO       data_props.data_props          init_manager                           86: Start init_manager
[New Thread 0x7fffece2c700 (LWP 15965)]
======== Running on http://0.0.0.0:7667 ========
(Press CTRL+C to quit)
[New Thread 0x7fffc4839700 (LWP 16036)]
2017-04-13 13:03:14,685 INFO       data_props.model_props         load_from_db                          141: Mast read 15149 goods
2017-04-13 13:03:14,686 INFO       data_props.model_props         load_from_db                          146: next chanl 0 500 <280351 500539>
*** Error in `/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3': free(): invalid pointer: 0x00007fffec135538 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ffff71587e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7ffff7160e0a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ffff716498c]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/fastnumbers.cpython-36m-x86_64-linux-gnu.so(convert_PyUnicode_to_unicode_char+0x148)[0x7fffef9e7dc8]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/fastnumbers.cpython-36m-x86_64-linux-gnu.so(PyString_is_a_number+0x155)[0x7fffef9e8625]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/fastnumbers.cpython-36m-x86_64-linux-gnu.so(+0x4f35)[0x7fffef9e8f35]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyCFunction_FastCallKeywords+0x1bc)[0x4addfc]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e3ae]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x3887)[0x542c17]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x477d96]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(PyIter_Next+0xb)[0x455e6b]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x4b79df]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x4ba596]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x4c3c13]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyObject_FastCallDict+0xa2)[0x452e02]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e178]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x3887)[0x542c17]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyGen_Send+0x8e)[0x4791ce]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x613b)[0x5454cb]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyGen_Send+0x8e)[0x4791ce]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x613b)[0x5454cb]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyGen_Send+0x8e)[0x4791ce]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x613b)[0x5454cb]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyGen_Send+0x8e)[0x4791ce]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x613b)[0x5454cb]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyGen_Send+0x8e)[0x4791ce]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x613b)[0x5454cb]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyGen_Send+0x8e)[0x4791ce]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x613b)[0x5454cb]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyGen_Send+0x8e)[0x4791ce]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x613b)[0x5454cb]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyGen_Send+0x8e)[0x4791ce]
/home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_asyncio.cpython-36m-x86_64-linux-gnu.so(+0x6372)[0x7ffff34c3372]
/home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_asyncio.cpython-36m-x86_64-linux-gnu.so(+0x6fee)[0x7ffff34c3fee]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(PyObject_Call+0x5c)[0x452c1c]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x40e6)[0x543476]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53d671]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e521]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x3887)[0x542c17]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53d671]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e521]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x3887)[0x542c17]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53d671]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e521]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x3887)[0x542c17]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e015]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e2c7]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x4ad4)[0x543e64]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53d671]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e521]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_PyEval_EvalFrameDefault+0x3887)[0x542c17]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3[0x53e015]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(PyEval_EvalCode+0x23)[0x53ee43]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(PyRun_FileExFlags+0x16f)[0x42740f]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(PyRun_SimpleFileExFlags+0xec)[0x42763c]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(Py_Main+0xd85)[0x43b975]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(main+0x162)[0x41dc52]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ffff7101830]
/home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/bin/python3(_start+0x29)[0x41dd29]
======= Memory map: ========
00400000-00663000 r-xp 00000000 00:15 33815994                           /home/tonal/.pyenv/versions/3.6.1/bin/python3.6
00862000-00863000 r--p 00262000 00:15 33815994                           /home/tonal/.pyenv/versions/3.6.1/bin/python3.6
00863000-008c7000 rw-p 00263000 00:15 33815994                           /home/tonal/.pyenv/versions/3.6.1/bin/python3.6
008c7000-010e7000 rw-p 00000000 00:00 0                                  [heap]
7fffa0000000-7fffa0021000 rw-p 00000000 00:00 0 
7fffa0021000-7fffa4000000 ---p 00000000 00:00 0 
7fffa8000000-7fffa8021000 rw-p 00000000 00:00 0 
7fffa8021000-7fffac000000 ---p 00000000 00:00 0 
7ffface7f000-7fffbc000000 rw-p 00000000 00:00 0 
7fffbc000000-7fffbcf40000 rw-p 00000000 00:00 0 
7fffbcf40000-7fffc0000000 ---p 00000000 00:00 0 
7fffc0028000-7fffc0868000 rw-p 00000000 00:00 0 
7fffc3dd1000-7fffc3ddc000 r-xp 00000000 00:15 10238978                   /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fffc3ddc000-7fffc3fdb000 ---p 0000b000 00:15 10238978                   /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fffc3fdb000-7fffc3fdc000 r--p 0000a000 00:15 10238978                   /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fffc3fdc000-7fffc3fdd000 rw-p 0000b000 00:15 10238978                   /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fffc3fdd000-7fffc3fe3000 rw-p 00000000 00:00 0 
7fffc4039000-7fffc403a000 ---p 00000000 00:00 0 
7fffc403a000-7fffc483a000 rw-p 00000000 00:00 0 
7fffc483a000-7fffc4869000 r--p 00000000 00:15 6182445                    /usr/share/locale-langpack/ru/LC_MESSAGES/libc.mo
7fffc4869000-7fffd3d69000 rw-p 00000000 00:00 0 
7fffd3d6a000-7fffdc86a000 rw-p 00000000 00:00 0 
7fffdc87b000-7fffde3bb000 rw-p 00000000 00:00 0 
7fffde3bb000-7fffdebfb000 rw-p 00000000 00:00 0 
7fffdebfc000-7fffe34fc000 rw-p 00000000 00:00 0 
7fffe34fd000-7fffe5efd000 rw-p 00000000 00:00 0 
7fffe5efe000-7fffe72fe000 rw-p 00000000 00:00 0 
7fffe72ff000-7fffe7c7f000 rw-p 00000000 00:00 0 
7fffe7c80000-7fffe8000000 rw-p 00000000 00:00 0 
7fffe8000000-7fffebff1000 rw-p 00000000 00:00 0 
7fffebff1000-7fffec000000 ---p 00000000 00:00 0 
7fffec02b000-7fffec1ab000 rw-p 00000000 00:00 0 
7fffec1ac000-7fffec62c000 rw-p 00000000 00:00 0 
7fffec62c000-7fffec62d000 ---p 00000000 00:00 0 
7fffec62d000-7fffeceed000 rw-p 00000000 00:00 0 
7fffeceed000-7fffecfac000 r-xp 00000000 00:15 33822966                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/unicodedata.cpython-36m-x86_64-linux-gnu.so
7fffecfac000-7fffed1ab000 ---p 000bf000 00:15 33822966                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/unicodedata.cpython-36m-x86_64-linux-gnu.so
7fffed1ab000-7fffed1ac000 r--p 000be000 00:15 33822966                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/unicodedata.cpython-36m-x86_64-linux-gnu.so
7fffed1ac000-7fffed1c7000 rw-p 000bf000 00:15 33822966                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/unicodedata.cpython-36m-x86_64-linux-gnu.so
7fffed1c7000-7fffeea7d000 r-xp 00000000 00:15 10019771                   /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7fffeea7d000-7fffeec7c000 ---p 018b6000 00:15 10019771                   /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7fffeec7c000-7fffeec7d000 r--p 018b5000 00:15 10019771                   /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7fffeec7d000-7fffeec7e000 rw-p 018b6000 00:15 10019771                   /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7fffeec7e000-7fffeecd3000 r-xp 00000000 00:15 10019770                   /usr/lib/x86_64-linux-gnu/libicule.so.55.1
7fffeecd3000-7fffeeed3000 ---p 00055000 00:15 10019770                   /usr/lib/x86_64-linux-gnu/libicule.so.55.1
7fffeeed3000-7fffeeed5000 r--p 00055000 00:15 10019770                   /usr/lib/x86_64-linux-gnu/libicule.so.55.1
7fffeeed5000-7fffeeed6000 rw-p 00057000 00:15 10019770                   /usr/lib/x86_64-linux-gnu/libicule.so.55.1
7fffeeed6000-7fffef055000 r-xp 00000000 00:15 10019766                   /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7fffef055000-7fffef255000 ---p 0017f000 00:15 10019766                   /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7fffef255000-7fffef265000 r--p 0017f000 00:15 10019766                   /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7fffef265000-7fffef266000 rw-p 0018f000 00:15 10019766                   /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7fffef266000-7fffef26a000 rw-p 00000000 00:00 0 
7fffef26a000-7fffef4bc000 r-xp 00000000 00:15 10019768                   /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
7fffef4bc000-7fffef6bc000 ---p 00252000 00:15 10019768                   /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
7fffef6bc000-7fffef6cb000 r--p 00252000 00:15 10019768                   /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
7fffef6cb000-7fffef6cc000 rw-p 00261000 00:15 10019768                   /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
7fffef6e2000-7fffef722000 rw-p 00000000 00:00 0 
7fffef722000-7fffef7cd000 r-xp 00000000 00:15 34960848                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/_icu.cpython-36m-x86_64-linux-gnu.so
7fffef7cd000-7fffef9cc000 ---p 000ab000 00:15 34960848                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/_icu.cpython-36m-x86_64-linux-gnu.so
7fffef9cc000-7fffef9cd000 r--p 000aa000 00:15 34960848                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/_icu.cpython-36m-x86_64-linux-gnu.so
7fffef9cd000-7fffef9e3000 rw-p 000ab000 00:15 34960848                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/_icu.cpython-36m-x86_64-linux-gnu.so
7fffef9e3000-7fffef9e4000 rw-p 00000000 00:00 0 
7fffef9e4000-7fffef9ed000 r-xp 00000000 00:15 34960706                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/fastnumbers.cpython-36m-x86_64-linux-gnu.so
7fffef9ed000-7fffefbec000 ---p 00009000 00:15 34960706                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/fastnumbers.cpython-36m-x86_64-linux-gnu.so
7fffefbec000-7fffefbed000 r--p 00008000 00:15 34960706                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/fastnumbers.cpython-36m-x86_64-linux-gnu.so
7fffefbed000-7fffefbf3000 rw-p 00009000 00:15 34960706                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/fastnumbers.cpython-36m-x86_64-linux-gnu.so
7fffefbf3000-7fffefcf3000 rw-p 00000000 00:00 0 
7fffefcf3000-7fffefd0e000 r-xp 00000000 00:15 34960133                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/pycares/_core.cpython-36m-x86_64-linux-gnu.so
7fffefd0e000-7fffeff0e000 ---p 0001b000 00:15 34960133                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/pycares/_core.cpython-36m-x86_64-linux-gnu.so
7fffeff0e000-7fffeff0f000 r--p 0001b000 00:15 34960133                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/pycares/_core.cpython-36m-x86_64-linux-gnu.so
7fffeff0f000-7fffeff11000 rw-p 0001c000 00:15 34960133                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/pycares/_core.cpython-36m-x86_64-linux-gnu.so
7fffeff11000-7fffeff12000 rw-p 00000000 00:00 0 
7fffeff12000-7fffeff28000 r-xp 00000000 00:15 5843268                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7fffeff28000-7ffff0127000 ---p 00016000 00:15 5843268                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff0127000-7ffff0128000 rw-p 00015000 00:15 5843268                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff0128000-7ffff029a000 r-xp 00000000 00:15 7739045                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ffff029a000-7ffff049a000 ---p 00172000 00:15 7739045                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ffff049a000-7ffff04a4000 r--p 00172000 00:15 7739045                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ffff04a4000-7ffff04a6000 rw-p 0017c000 00:15 7739045                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ffff04a6000-7ffff04aa000 rw-p 00000000 00:00 0 
7ffff04aa000-7ffff04e1000 r-xp 00000000 00:15 34960602                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/cchardet/_cchardet.cpython-36m-x86_64-linux-gnu.so
7ffff04e1000-7ffff06e1000 ---p 00037000 00:15 34960602                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/cchardet/_cchardet.cpython-36m-x86_64-linux-gnu.so
7ffff06e1000-7ffff06e5000 rw-p 00037000 00:15 34960602                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/cchardet/_cchardet.cpython-36m-x86_64-linux-gnu.so
7ffff06e5000-7ffff06e9000 r-xp 00000000 00:15 8973150                    /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ffff06e9000-7ffff08e8000 ---p 00004000 00:15 8973150                    /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ffff08e8000-7ffff08e9000 r--p 00003000 00:15 8973150                    /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ffff08e9000-7ffff08ea000 rw-p 00004000 00:15 8973150                    /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7ffff08ea000-7ffff08f1000 r-xp 00000000 00:15 5953004                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7ffff08f1000-7ffff0af0000 ---p 00007000 00:15 5953004                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7ffff0af0000-7ffff0af1000 r--p 00006000 00:15 5953004                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7ffff0af1000-7ffff0af2000 rw-p 00007000 00:15 5953004                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7ffff0b08000-7ffff0b48000 rw-p 00000000 00:00 0 
7ffff0b48000-7ffff0b63000 r-xp 00000000 00:15 33823002                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
7ffff0b63000-7ffff0d62000 ---p 0001b000 00:15 33823002                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
7ffff0d62000-7ffff0d63000 r--p 0001a000 00:15 33823002                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
7ffff0d63000-7ffff0d67000 rw-p 0001b000 00:15 33823002                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
7ffff0d67000-7ffff0da7000 rw-p 00000000 00:00 0 
7ffff0da7000-7ffff0dab000 r-xp 00000000 00:15 34960330                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/aiohttp/_websocket.cpython-36m-x86_64-linux-gnu.so
7ffff0dab000-7ffff0fab000 ---p 00004000 00:15 34960330                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/aiohttp/_websocket.cpython-36m-x86_64-linux-gnu.so
7ffff0fab000-7ffff0fac000 rw-p 00004000 00:15 34960330                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/aiohttp/_websocket.cpython-36m-x86_64-linux-gnu.so
7ffff0fac000-7ffff0fcd000 r-xp 00000000 00:15 34960321                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/aiohttp/_http_parser.cpython-36m-x86_64-linux-gnu.so
7ffff0fcd000-7ffff11cc000 ---p 00021000 00:15 34960321                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/aiohttp/_http_parser.cpython-36m-x86_64-linux-gnu.so
7ffff11cc000-7ffff11cf000 rw-p 00020000 00:15 34960321                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/aiohttp/_http_parser.cpython-36m-x86_64-linux-gnu.so
7ffff11cf000-7ffff13cf000 rw-p 00000000 00:00 0 
7ffff13cf000-7ffff13dd000 r-xp 00000000 00:15 34960181                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/yarl/_quoting.cpython-36m-x86_64-linux-gnu.so
7ffff13dd000-7ffff15dc000 ---p 0000e000 00:15 34960181                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/yarl/_quoting.cpython-36m-x86_64-linux-gnu.so
7ffff15dc000-7ffff15dd000 r--p 0000d000 00:15 34960181                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/yarl/_quoting.cpython-36m-x86_64-linux-gnu.so
7ffff15dd000-7ffff15de000 rw-p 0000e000 00:15 34960181                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/yarl/_quoting.cpython-36m-x86_64-linux-gnu.so
7ffff15de000-7ffff161e000 rw-p 00000000 00:00 0 
7ffff161e000-7ffff1628000 r-xp 00000000 00:15 33822949                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so
7ffff1628000-7ffff1827000 ---p 0000a000 00:15 33822949                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so
7ffff1827000-7ffff1828000 r--p 00009000 00:15 33822949                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so
7ffff1828000-7ffff1829000 rw-p 0000a000 00:15 33822949                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so
7ffff1829000-7ffff1869000 rw-p 00000000 00:00 0 
7ffff1869000-7ffff1892000 r-xp 00000000 00:15 34960165                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/multidict/_multidict.cpython-36m-x86_64-linux-gnu.so
7ffff1892000-7ffff1a92000 ---p 00029000 00:15 34960165                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/multidict/_multidict.cpython-36m-x86_64-linux-gnu.so
7ffff1a92000-7ffff1a93000 r--p 00029000 00:15 34960165                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/multidict/_multidict.cpython-36m-x86_64-linux-gnu.so
7ffff1a93000-7ffff1a97000 rw-p 0002a000 00:15 34960165                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/multidict/_multidict.cpython-36m-x86_64-linux-gnu.so
7ffff1a97000-7ffff1ad8000 rw-p 00000000 00:00 0 
7ffff1ad8000-7ffff1adc000 r-xp 00000000 00:15 33822979                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/termios.cpython-36m-x86_64-linux-gnu.so
7ffff1adc000-7ffff1cdb000 ---p 00004000 00:15 33822979                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/termios.cpython-36m-x86_64-linux-gnu.so
7ffff1cdb000-7ffff1cdc000 r--p 00003000 00:15 33822979                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/termios.cpython-36m-x86_64-linux-gnu.so
7ffff1cdc000-7ffff1cde000 rw-p 00004000 00:15 33822979                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/termios.cpython-36m-x86_64-linux-gnu.so
7ffff1cde000-7ffff1d28000 r-xp 00000000 00:15 33823004                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so
7ffff1d28000-7ffff1f27000 ---p 0004a000 00:15 33823004                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so
7ffff1f27000-7ffff1f28000 r--p 00049000 00:15 33823004                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so
7ffff1f28000-7ffff1f31000 rw-p 0004a000 00:15 33823004                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so
7ffff1f31000-7ffff1fc2000 rw-p 00000000 00:00 0 
7ffff1fc2000-7ffff1fc9000 r-xp 00000000 00:15 10238981                   /lib/x86_64-linux-gnu/librt-2.23.so
7ffff1fc9000-7ffff21c8000 ---p 00007000 00:15 10238981                   /lib/x86_64-linux-gnu/librt-2.23.so
7ffff21c8000-7ffff21c9000 r--p 00006000 00:15 10238981                   /lib/x86_64-linux-gnu/librt-2.23.so
7ffff21c9000-7ffff21ca000 rw-p 00007000 00:15 10238981                   /lib/x86_64-linux-gnu/librt-2.23.so
7ffff21e0000-7ffff2220000 rw-p 00000000 00:00 0 
7ffff2220000-7ffff237c000 r-xp 00000000 00:15 34961119                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/uvloop/loop.cpython-36m-x86_64-linux-gnu.so
7ffff237c000-7ffff257c000 ---p 0015c000 00:15 34961119                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/uvloop/loop.cpython-36m-x86_64-linux-gnu.so
7ffff257c000-7ffff2592000 rw-p 0015c000 00:15 34961119                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/uvloop/loop.cpython-36m-x86_64-linux-gnu.so
7ffff2592000-7ffff2599000 rw-p 00000000 00:00 0 
7ffff2599000-7ffff25b6000 r-xp 00000000 00:15 5959905                    /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
7ffff25b6000-7ffff27b6000 ---p 0001d000 00:15 5959905                    /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
7ffff27b6000-7ffff27b7000 r--p 0001d000 00:15 5959905                    /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
7ffff27b7000-7ffff27b8000 rw-p 0001e000 00:15 5959905                    /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
7ffff27ce000-7ffff280e000 rw-p 00000000 00:00 0 
7ffff280e000-7ffff283e000 r-xp 00000000 00:15 34961088                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/_yaml.cpython-36m-x86_64-linux-gnu.so
7ffff283e000-7ffff2a3d000 ---p 00030000 00:15 34961088                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/_yaml.cpython-36m-x86_64-linux-gnu.so
7ffff2a3d000-7ffff2a3e000 r--p 0002f000 00:15 34961088                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/_yaml.cpython-36m-x86_64-linux-gnu.so
7ffff2a3e000-7ffff2a41000 rw-p 00030000 00:15 34961088                   /home/tonal/.pyenv/versions/3.6.1/envs/props_service-3.6.1/lib/python3.6/site-packages/_yaml.cpython-36m-x86_64-linux-gnu.so
7ffff2a41000-7ffff2a42000 rw-p 00000000 00:00 0 
7ffff2a42000-7ffff2a58000 r-xp 00000000 00:15 33822948                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_datetime.cpython-36m-x86_64-linux-gnu.so
7ffff2a58000-7ffff2c57000 ---p 00016000 00:15 33822948                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_datetime.cpython-36m-x86_64-linux-gnu.so
7ffff2c57000-7ffff2c58000 r--p 00015000 00:15 33822948                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_datetime.cpython-36m-x86_64-linux-gnu.so
7ffff2c58000-7ffff2c5b000 rw-p 00016000 00:15 33822948                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_datetime.cpython-36m-x86_64-linux-gnu.so
7ffff2c5b000-7ffff2d1b000 rw-p 00000000 00:00 0 
7ffff2d1b000-7ffff2d20000 r-xp 00000000 00:15 33822987                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/binascii.cpython-36m-x86_64-linux-gnu.so
7ffff2d20000-7ffff2f1f000 ---p 00005000 00:15 33822987                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/binascii.cpython-36m-x86_64-linux-gnu.so
7ffff2f1f000-7ffff2f20000 r--p 00004000 00:15 33822987                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/binascii.cpython-36m-x86_64-linux-gnu.so
7ffff2f20000-7ffff2f21000 rw-p 00005000 00:15 33822987                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/binascii.cpython-36m-x86_64-linux-gnu.so
7ffff2f21000-7ffff2f7f000 r-xp 00000000 00:15 9116692                    /lib/x86_64-linux-gnu/libssl.so.1.0.0
7ffff2f7f000-7ffff317f000 ---p 0005e000 00:15 9116692                    /lib/x86_64-linux-gnu/libssl.so.1.0.0
7ffff317f000-7ffff3183000 r--p 0005e000 00:15 9116692                    /lib/x86_64-linux-gnu/libssl.so.1.0.0
7ffff3183000-7ffff318a000 rw-p 00062000 00:15 9116692                    /lib/x86_64-linux-gnu/libssl.so.1.0.0
7ffff31a0000-7ffff31e0000 rw-p 00000000 00:00 0 
7ffff31e0000-7ffff31f8000 r-xp 00000000 00:15 33822975                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so
7ffff31f8000-7ffff33f7000 ---p 00018000 00:15 33822975                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so
7ffff33f7000-7ffff33f8000 r--p 00017000 00:15 33822975                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so
7ffff33f8000-7ffff33fd000 rw-p 00018000 00:15 33822975                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so
7ffff33fd000-7ffff34bd000 rw-p 00000000 00:00 0 
7ffff34bd000-7ffff34c7000 r-xp 00000000 00:15 33822960                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_asyncio.cpython-36m-x86_64-linux-gnu.so
7ffff34c7000-7ffff36c6000 ---p 0000a000 00:15 33822960                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_asyncio.cpython-36m-x86_64-linux-gnu.so
7ffff36c6000-7ffff36c7000 r--p 00009000 00:15 33822960                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_asyncio.cpython-36m-x86_64-linux-gnu.so
7ffff36c7000-7ffff36ca000 rw-p 0000a000 00:15 33822960                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_asyncio.cpython-36m-x86_64-linux-gnu.so
7ffff36ca000-7ffff370a000 rw-p 00000000 00:00 0 
7ffff370a000-7ffff370b000 r-xp 00000000 00:15 33822954                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so
7ffff370b000-7ffff390a000 ---p 00001000 00:15 33822954                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so
7ffff390a000-7ffff390b000 r--p 00000000 00:15 33822954                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so
7ffff390b000-7ffff390c000 rw-p 00001000 00:15 33822954                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so
7ffff390c000-7ffff394c000 rw-p 00000000 00:00 0 
7ffff394c000-7ffff394f000 r-xp 00000000 00:15 33822968                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-x86_64-linux-gnu.so
7ffff394f000-7ffff3b4e000 ---p 00003000 00:15 33822968                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-x86_64-linux-gnu.so
7ffff3b4e000-7ffff3b4f000 r--p 00002000 00:15 33822968                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-x86_64-linux-gnu.so
7ffff3b4f000-7ffff3b50000 rw-p 00003000 00:15 33822968                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-x86_64-linux-gnu.so
7ffff3b50000-7ffff3b53000 r-xp 00000000 00:15 33822998                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_multiprocessing.cpython-36m-x86_64-linux-gnu.so
7ffff3b53000-7ffff3d52000 ---p 00003000 00:15 33822998                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_multiprocessing.cpython-36m-x86_64-linux-gnu.so
7ffff3d52000-7ffff3d53000 r--p 00002000 00:15 33822998                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_multiprocessing.cpython-36m-x86_64-linux-gnu.so
7ffff3d53000-7ffff3d54000 rw-p 00003000 00:15 33822998                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_multiprocessing.cpython-36m-x86_64-linux-gnu.so
7ffff3d54000-7ffff3d57000 r-xp 00000000 00:15 33822944                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_random.cpython-36m-x86_64-linux-gnu.so
7ffff3d57000-7ffff3f56000 ---p 00003000 00:15 33822944                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_random.cpython-36m-x86_64-linux-gnu.so
7ffff3f56000-7ffff3f57000 r--p 00002000 00:15 33822944                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_random.cpython-36m-x86_64-linux-gnu.so
7ffff3f57000-7ffff3f58000 rw-p 00003000 00:15 33822944                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_random.cpython-36m-x86_64-linux-gnu.so
7ffff3f58000-7ffff3f5a000 r-xp 00000000 00:15 33822945                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_bisect.cpython-36m-x86_64-linux-gnu.so
7ffff3f5a000-7ffff4159000 ---p 00002000 00:15 33822945                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_bisect.cpython-36m-x86_64-linux-gnu.so
7ffff4159000-7ffff415a000 r--p 00001000 00:15 33822945                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_bisect.cpython-36m-x86_64-linux-gnu.so
7ffff415a000-7ffff415b000 rw-p 00002000 00:15 33822945                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_bisect.cpython-36m-x86_64-linux-gnu.so
7ffff415b000-7ffff416d000 r-xp 00000000 00:15 33822990                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so
7ffff416d000-7ffff436c000 ---p 00012000 00:15 33822990                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so
7ffff436c000-7ffff436d000 r--p 00011000 00:15 33822990                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so
7ffff436d000-7ffff436f000 rw-p 00012000 00:15 33822990                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so
7ffff436f000-7ffff4378000 r-xp 00000000 00:15 33822982                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_blake2.cpython-36m-x86_64-linux-gnu.so
7ffff4378000-7ffff4578000 ---p 00009000 00:15 33822982                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_blake2.cpython-36m-x86_64-linux-gnu.so
7ffff4578000-7ffff4579000 r--p 00009000 00:15 33822982                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_blake2.cpython-36m-x86_64-linux-gnu.so
7ffff4579000-7ffff457a000 rw-p 0000a000 00:15 33822982                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_blake2.cpython-36m-x86_64-linux-gnu.so
7ffff457a000-7ffff4794000 r-xp 00000000 00:15 9116691                    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff4794000-7ffff4993000 ---p 0021a000 00:15 9116691                    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff4993000-7ffff49af000 r--p 00219000 00:15 9116691                    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff49af000-7ffff49bb000 rw-p 00235000 00:15 9116691                    /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7ffff49bb000-7ffff49be000 rw-p 00000000 00:00 0 
7ffff49be000-7ffff49c3000 r-xp 00000000 00:15 33822971                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so
7ffff49c3000-7ffff4bc2000 ---p 00005000 00:15 33822971                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so
7ffff4bc2000-7ffff4bc3000 r--p 00004000 00:15 33822971                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so
7ffff4bc3000-7ffff4bc4000 rw-p 00005000 00:15 33822971                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so
7ffff4bc4000-7ffff4bc6000 r-xp 00000000 00:15 33822958                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/grp.cpython-36m-x86_64-linux-gnu.so
7ffff4bc6000-7ffff4dc5000 ---p 00002000 00:15 33822958                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/grp.cpython-36m-x86_64-linux-gnu.so
7ffff4dc5000-7ffff4dc6000 r--p 00001000 00:15 33822958                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/grp.cpython-36m-x86_64-linux-gnu.so
7ffff4dc6000-7ffff4dc7000 rw-p 00002000 00:15 33822958                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/grp.cpython-36m-x86_64-linux-gnu.so
7ffff4dc7000-7ffff4de8000 r-xp 00000000 00:15 16893                      /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ffff4de8000-7ffff4fe7000 ---p 00021000 00:15 16893                      /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ffff4fe7000-7ffff4fe8000 r--p 00020000 00:15 16893                      /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ffff4fe8000-7ffff4fe9000 rw-p 00021000 00:15 16893                      /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ffff4fff000-7ffff503f000 rw-p 00000000 00:00 0 
7ffff503f000-7ffff5046000 r-xp 00000000 00:15 33822989                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so
7ffff5046000-7ffff5245000 ---p 00007000 00:15 33822989                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so
7ffff5245000-7ffff5246000 r--p 00006000 00:15 33822989                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so
7ffff5246000-7ffff5248000 rw-p 00007000 00:15 33822989                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so
7ffff5248000-7ffff5257000 r-xp 00000000 00:15 5951297                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7ffff5257000-7ffff5456000 ---p 0000f000 00:15 5951297                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7ffff5456000-7ffff5457000 r--p 0000e000 00:15 5951297                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7ffff5457000-7ffff5458000 rw-p 0000f000 00:15 5951297                    /lib/x86_64-linux-gnu/libbz2.so.1.0.4
7ffff5458000-7ffff545c000 r-xp 00000000 00:15 33822986                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so
7ffff545c000-7ffff565b000 ---p 00004000 00:15 33822986                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so
7ffff565b000-7ffff565c000 r--p 00003000 00:15 33822986                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so
7ffff565c000-7ffff565d000 rw-p 00004000 00:15 33822986                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so
7ffff565d000-7ffff5676000 r-xp 00000000 00:15 5952612                    /lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff5676000-7ffff5875000 ---p 00019000 00:15 5952612                    /lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff5875000-7ffff5876000 r--p 00018000 00:15 5952612                    /lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff5876000-7ffff5877000 rw-p 00019000 00:15 5952612                    /lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff588d000-7ffff58cd000 rw-p 00000000 00:00 0 
7ffff58cd000-7ffff58d3000 r-xp 00000000 00:15 33822985                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/zlib.cpython-36m-x86_64-linux-gnu.so
7ffff58d3000-7ffff5ad2000 ---p 00006000 00:15 33822985                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/zlib.cpython-36m-x86_64-linux-gnu.so
7ffff5ad2000-7ffff5ad3000 r--p 00005000 00:15 33822985                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/zlib.cpython-36m-x86_64-linux-gnu.so
7ffff5ad3000-7ffff5ad5000 rw-p 00006000 00:15 33822985                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/zlib.cpython-36m-x86_64-linux-gnu.so
7ffff5ad5000-7ffff5ae1000 r-xp 00000000 00:15 33822942                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/array.cpython-36m-x86_64-linux-gnu.so
7ffff5ae1000-7ffff5ce0000 ---p 0000c000 00:15 33822942                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/array.cpython-36m-x86_64-linux-gnu.so
7ffff5ce0000-7ffff5ce1000 r--p 0000b000 00:15 33822942                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/array.cpython-36m-x86_64-linux-gnu.so
7ffff5ce1000-7ffff5ce4000 rw-p 0000c000 00:15 33822942                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/array.cpython-36m-x86_64-linux-gnu.so
7ffff5ce4000-7ffff5d24000 rw-p 00000000 00:00 0 
7ffff5d24000-7ffff5d37000 r-xp 00000000 00:15 33822976                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_socket.cpython-36m-x86_64-linux-gnu.so
7ffff5d37000-7ffff5f37000 ---p 00013000 00:15 33822976                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_socket.cpython-36m-x86_64-linux-gnu.so
7ffff5f37000-7ffff5f38000 r--p 00013000 00:15 33822976                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_socket.cpython-36m-x86_64-linux-gnu.so
7ffff5f38000-7ffff5f3d000 rw-p 00014000 00:15 33822976                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_socket.cpython-36m-x86_64-linux-gnu.so
7ffff5f3d000-7ffff5f54000 r-xp 00000000 00:15 33822956                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_pickle.cpython-36m-x86_64-linux-gnu.so
7ffff5f54000-7ffff6153000 ---p 00017000 00:15 33822956                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_pickle.cpython-36m-x86_64-linux-gnu.so
7ffff6153000-7ffff6154000 r--p 00016000 00:15 33822956                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_pickle.cpython-36m-x86_64-linux-gnu.so
7ffff6154000-7ffff6158000 rw-p 00017000 00:15 33822956                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_pickle.cpython-36m-x86_64-linux-gnu.so
7ffff6158000-7ffff6161000 r-xp 00000000 00:15 33822941                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_struct.cpython-36m-x86_64-linux-gnu.so
7ffff6161000-7ffff6360000 ---p 00009000 00:15 33822941                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_struct.cpython-36m-x86_64-linux-gnu.so
7ffff6360000-7ffff6361000 r--p 00008000 00:15 33822941                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_struct.cpython-36m-x86_64-linux-gnu.so
7ffff6361000-7ffff6363000 rw-p 00009000 00:15 33822941                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_struct.cpython-36m-x86_64-linux-gnu.so
7ffff6363000-7ffff63a3000 rw-p 00000000 00:00 0 
7ffff63ac000-7ffff64ac000 rw-p 00000000 00:00 0 
7ffff64ac000-7ffff64b1000 r-xp 00000000 00:15 33822961                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/select.cpython-36m-x86_64-linux-gnu.so
7ffff64b1000-7ffff66b0000 ---p 00005000 00:15 33822961                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/select.cpython-36m-x86_64-linux-gnu.so
7ffff66b0000-7ffff66b1000 r--p 00004000 00:15 33822961                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/select.cpython-36m-x86_64-linux-gnu.so
7ffff66b1000-7ffff66b3000 rw-p 00005000 00:15 33822961                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/select.cpython-36m-x86_64-linux-gnu.so
7ffff66b3000-7ffff66be000 r-xp 00000000 00:15 33822943                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/math.cpython-36m-x86_64-linux-gnu.so
7ffff66be000-7ffff68bd000 ---p 0000b000 00:15 33822943                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/math.cpython-36m-x86_64-linux-gnu.so
7ffff68bd000-7ffff68be000 r--p 0000a000 00:15 33822943                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/math.cpython-36m-x86_64-linux-gnu.so
7ffff68be000-7ffff68c0000 rw-p 0000b000 00:15 33822943                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/math.cpython-36m-x86_64-linux-gnu.so
7ffff68c0000-7ffff68c2000 r-xp 00000000 00:15 33822946                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_heapq.cpython-36m-x86_64-linux-gnu.so
7ffff68c2000-7ffff6ac2000 ---p 00002000 00:15 33822946                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_heapq.cpython-36m-x86_64-linux-gnu.so
7ffff6ac2000-7ffff6ac3000 r--p 00002000 00:15 33822946                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_heapq.cpython-36m-x86_64-linux-gnu.so
7ffff6ac3000-7ffff6ac5000 rw-p 00003000 00:15 33822946                   /home/tonal/.pyenv/versions/3.6.1/lib/python3.6/lib-dynload/_heapq.cpython-36m-x86_64-linux-gnu.so
7ffff6ac5000-7ffff6b45000 rw-p 00000000 00:00 0 
7ffff6b45000-7ffff70e1000 r--p 00000000 00:15 10265017                   /usr/lib/locale/locale-archive
7ffff70e1000-7ffff72a0000 r-xp 00000000 00:15 10238974                   /lib/x86_64-linux-gnu/libc-2.23.so
7ffff72a0000-7ffff74a0000 ---p 001bf000 00:15 10238974                   /lib/x86_64-linux-gnu/libc-2.23.so
7ffff74a0000-7ffff74a4000 r--p 001bf000 00:15 10238974                   /lib/x86_64-linux-gnu/libc-2.23.so
7ffff74a4000-7ffff74a6000 rw-p 001c3000 00:15 10238974                   /lib/x86_64-linux-gnu/libc-2.23.so
7ffff74a6000-7ffff74aa000 rw-p 00000000 00:00 0 
7ffff74aa000-7ffff75b2000 r-xp 00000000 00:15 10238972                   /lib/x86_64-linux-gnu/libm-2.23.so
7ffff75b2000-7ffff77b1000 ---p 00108000 00:15 10238972                   /lib/x86_64-linux-gnu/libm-2.23.so
7ffff77b1000-7ffff77b2000 r--p 00107000 00:15 10238972                   /lib/x86_64-linux-gnu/libm-2.23.so
7ffff77b2000-7ffff77b3000 rw-p 00108000 00:15 10238972                   /lib/x86_64-linux-gnu/libm-2.23.so
7ffff77b3000-7ffff77b5000 r-xp 00000000 00:15 10238988                   /lib/x86_64-linux-gnu/libutil-2.23.so
7ffff77b5000-7ffff79b4000 ---p 00002000 00:15 10238988                   /lib/x86_64-linux-gnu/libutil-2.23.so
7ffff79b4000-7ffff79b5000 r--p 00001000 00:15 10238988                   /lib/x86_64-linux-gnu/libutil-2.23.so
7ffff79b5000-7ffff79b6000 rw-p 00002000 00:15 10238988                   /lib/x86_64-linux-gnu/libutil-2.23.so
7ffff79b6000-7ffff79b9000 r-xp 00000000 00:15 10238970                   /lib/x86_64-linux-gnu/libdl-2.23.so
7ffff79b9000-7ffff7bb8000 ---p 00003000 00:15 10238970                   /lib/x86_64-linux-gnu/libdl-2.23.so
7ffff7bb8000-7ffff7bb9000 r--p 00002000 00:15 10238970                   /lib/x86_64-linux-gnu/libdl-2.23.so
7ffff7bb9000-7ffff7bba000 rw-p 00003000 00:15 10238970                   /lib/x86_64-linux-gnu/libdl-2.23.so
7ffff7bba000-7ffff7bd2000 r-xp 00000000 00:15 10238985                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7ffff7bd2000-7ffff7dd1000 ---p 00018000 00:15 10238985                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7ffff7dd1000-7ffff7dd2000 r--p 00017000 00:15 10238985                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7ffff7dd2000-7ffff7dd3000 rw-p 00018000 00:15 10238985                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7ffff7dd3000-7ffff7dd7000 rw-p 00000000 00:00 0 
7ffff7dd7000-7ffff7dfd000 r-xp 00000000 00:15 10238975                   /lib/x86_64-linux-gnu/ld-2.23.so
7ffff7e1c000-7ffff7fa0000 rw-p 00000000 00:00 0 
7ffff7fad000-7ffff7fae000 rw-p 00000000 00:00 0 
7ffff7fae000-7ffff7faf000 rwxp 00000000 00:00 0 
7ffff7faf000-7ffff7fef000 rw-p 00000000 00:00 0 
7ffff7fef000-7ffff7ff6000 r--s 00000000 00:15 10238746                   /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7ffff7ff6000-7ffff7ff8000 rw-p 00000000 00:00 0 
7ffff7ff8000-7ffff7ffa000 r--p 00000000 00:00 0                          [vvar]
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00025000 00:15 10238975                   /lib/x86_64-linux-gnu/ld-2.23.so
7ffff7ffd000-7ffff7ffe000 rw-p 00026000 00:15 10238975                   /lib/x86_64-linux-gnu/ld-2.23.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0 
7ffffffdd000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Thread 1 "python3" received signal SIGABRT, Aborted.
0x00007ffff7116428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54      ../sysdeps/unix/sysv/linux/raise.c: Нет такого файла или каталога.
(gdb) bt
#0  0x00007ffff7116428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff711802a in __GI_abort () at abort.c:89
#2  0x00007ffff71587ea in __libc_message (do_abort=do_abort@entry=2, 
    fmt=fmt@entry=0x7ffff72712e0 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff7160e0a in malloc_printerr (ar_ptr=<optimized out>, ptr=<optimized out>, 
    str=0x7ffff726e0b2 "free(): invalid pointer", action=3) at malloc.c:5004
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3865
#5  0x00007ffff716498c in __GI___libc_free (mem=<optimized out>) at malloc.c:2966
#6  0x00007fffef9e7dc8 in convert_PyUnicode_to_unicode_char (input=<optimized out>)
    at src/py_to_char.c:122
#7  0x00007fffef9e8625 in PyUnicode_is_float (obj=<optimized out>) at src/py_shortcuts.c:256
#8  PyUnicode_is_a_number (type=REAL, obj=0x7ffface94f38) at src/py_shortcuts.c:269
#9  PyString_is_a_number (obj=0x7ffface94f38, type=type@entry=REAL, 
    allow_inf=0x86b5c0 <_Py_FalseStruct>, allow_nan=0x86b5c0 <_Py_FalseStruct>)
    at src/py_shortcuts.c:309
#10 0x00007fffef9e8f35 in fastnumbers_isreal (self=<optimized out>, args=<optimized out>, 
    kwargs=<optimized out>) at src/fastnumbers.c:179
#11 0x00000000004addfc in _PyCFunction_FastCallDict (kwargs=0x0, nargs=<optimized out>, 
    args=0x7fffdd09aaf8, func_obj=0x7fffefc9fca8) at Objects/methodobject.c:231
#12 _PyCFunction_FastCallKeywords (func=func@entry=0x7fffefc9fca8, stack=stack@entry=0x7fffdd09aaf8, 
    nargs=<optimized out>, kwnames=kwnames@entry=0x0) at Objects/methodobject.c:295
#13 0x000000000053e3ae in call_function (pp_stack=pp_stack@entry=0x7fffffffbce0, oparg=oparg@entry=1, 
    kwnames=kwnames@entry=0x0) at Python/ceval.c:4798
#14 0x0000000000542c17 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3284
#15 0x0000000000477d96 in gen_send_ex (closing=0, exc=0, arg=0x0, gen=0x7fffec3bf5c8)
    at Objects/genobject.c:189
#16 gen_iternext (gen=0x7fffec3bf5c8) at Objects/genobject.c:563
#17 0x0000000000455e6b in PyIter_Next (iter=iter@entry=0x7fffec3bf5c8) at Objects/abstract.c:3146
#18 0x00000000004b79df in set_update_internal (so=0x7fffe035d748, other=<optimized out>)
    at Objects/setobject.c:1007
#19 0x00000000004ba596 in make_new_set (iterable=0x7fffec3bf5c8, type=0x882ac0 <PyFrozenSet_Type>)
    at Objects/setobject.c:1061
#20 frozenset_new (type=<optimized out>, args=<optimized out>, kwds=<optimized out>)
    at Objects/setobject.c:1106
#21 0x00000000004c3c13 in type_call (type=0x882ac0 <PyFrozenSet_Type>, args=0x7fffad51c860, kwds=0x0)
    at Objects/typeobject.c:895
#22 0x0000000000452e02 in _PyObject_FastCallDict (func=0x882ac0 <PyFrozenSet_Type>, args=0xe26d38, 
    nargs=1, kwargs=0x0) at Objects/abstract.c:2316
#23 0x000000000053e178 in call_function (pp_stack=pp_stack@entry=0x7fffffffbfb0, oparg=oparg@entry=1, 
    kwnames=kwnames@entry=0x0) at Python/ceval.c:4822
#24 0x0000000000542c17 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3284
#25 0x00000000004791ce in gen_send_ex (closing=0, exc=0, arg=0x8816e0 <_Py_NoneStruct>, 
    gen=0x7fffec3bf0a0) at Objects/genobject.c:189
#26 _PyGen_Send (gen=gen@entry=0x7fffec3bf0a0, arg=arg@entry=0x8816e0 <_Py_NoneStruct>)
    at Objects/genobject.c:308
#27 0x00000000005454cb in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
---Type <return> to continue, or q <return> to quit---q

My Os - ubuntu 16.04 with all updates

Fastnumbers install on Windows fails

Hey, it's me again! I'm trying to install fastnumbers on a Windows 7 virtualbox and it fails with the following error. I get the same error via easy_install, pip, or setup.py with the source. Is it me?

C:\Python27\fastnumbers-0.5.1>c:\python27\python setup.py install
running install
running bdist_egg
running egg_info
writing fastnumbers.egg-info\PKG-INFO
writing top-level names to fastnumbers.egg-info\top_level.txt
writing dependency_links to fastnumbers.egg-info\dependency_links.txt
reading manifest file 'fastnumbers.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tests__pycache__'
writing manifest file 'fastnumbers.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_ext
building 'fastnumbers' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\src
C:\Users\w32\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\V
C\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\fastnumbers-0.5.
1\include -Ic:\python27\include -Ic:\python27\PC /Tcsrc\fast_atoi.c /Fobuild\tem
p.win32-2.7\Release\src\fast_atoi.obj
fast_atoi.c
c:\python27\fastnumbers-0.5.1\include\fn_bool.h(20) : error C2061: syntax error
: identifier 'Bool'
c:\python27\fastnumbers-0.5.1\include\fn_bool.h(20) : error C2059: syntax error
: ';'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(11) : error C2143: synt
ax error : missing ')' before '
'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(11) : error C2081: 'Bo
ol' : name in formal parameter list illegal
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(11) : error C2143: synt
ax error : missing '{' before '
'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(11) : error C2143: synt
ax error : missing ';' before ''
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(11) : error C2059: synt
ax error : ')'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(12) : error C2143: synt
ax error : missing ')' before '
'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(12) : error C2081: 'Bo
ol' : name in formal parameter list illegal
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(12) : error C2143: synt
ax error : missing '{' before '
'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(12) : error C2143: synt
ax error : missing ';' before ''
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(12) : error C2059: synt
ax error : ')'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(13) : error C2061: synt
ax error : identifier 'fast_atof_test'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(13) : error C2059: synt
ax error : ';'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(13) : error C2059: synt
ax error : 'type'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(14) : error C2061: synt
ax error : identifier 'fast_atoi_test'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(14) : error C2059: synt
ax error : ';'
C:\Python27\fastnumbers-0.5.1\include\fast_conversions.h(14) : error C2059: synt
ax error : 'type'
src\fast_atoi.c(15) : error C2143: syntax error : missing ')' before '
'
src\fast_atoi.c(15) : error C2081: 'Bool' : name in formal parameter list illeg
al
src\fast_atoi.c(15) : error C2143: syntax error : missing '{' before '
'
src\fast_atoi.c(15) : error C2143: syntax error : missing ';' before '*'
src\fast_atoi.c(15) : error C2059: syntax error : ')'
src\fast_atoi.c(16) : error C2054: expected '(' to follow 'overflow'
error: command 'C:\Users\w32\AppData\Local\Programs\Common\Microsoft\Vis
ual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

Segmentation fault on isfloat()

Hello,
I was using fastnumers.isfloat() to know is a string is a float or not. The string format was like "-0.353" most of the time. I used the function on a tons of data. I coud not spoted the string that made the segfault.
As there is a safe_float function I was wondering if this is normal or not.

Hopping this might help.
D.

Nov  5 16:17:54 (none) kernel: [7791607.024856] python[26864]: segfault at 7f4e52560050 ip 00007f4e5373ae42 sp 00007fff79343ad0 error 4 in fastnumbers.cpython-33m.so[7f4e53739000+4000]
Nov  5 16:18:30 (none) kernel: [7791642.889630] python[26905]: segfault at 7f7286bf9050 ip 00007f7287d56e42 sp 00007fffe251bba0 error 4 in fastnumbers.cpython-33m.so[7f7287d55000+4000]

Rename "key" option to "on_fail"

The key option to the fast_* functions is intended to be executed when the input cannot be converted. key is usually something that is executed before the algorithm, not after, so this name has always been a bother. I think on_fail is more descriptive of when the function is executed.

key will remain valid but deprecated/discouraged. If both key and on_fail are given, an error will be raised.

OverflowError when raise_on_invalid=True

Minimum, Complete, Verifiable Example

from fastnumbers import fast_real

a = fast_real("03e106196") # This is OK
try:
  b = fast_real("03e106196", raise_on_invalid=True) # This throws exception
except ValueError:  # It doesn't get caught, as it's not a ValueError
  pass

Error message, Traceback, Desired behavior, Suggestion, Request, or Question

I would expect a ValueError as it's not a valid float. However, instead there's an OverflowError.

Traceback (most recent call last):
  File "test.py", line 5, in <module>
    b = fast_real("03e106196", raise_on_invalid=True) # This throws exception
OverflowError: cannot convert float infinity to integer

It looks like this is because string_contains_intlike_float returns true for this value, but isn't aware about the exponent being really big.

Integrate with numpy and pandas

Since floating point numbers are often used in large datasets and that is where speed is of the utmost importance, would it make sense to integrate this as a drop-in replacement for use in numpy and as a result, also in Pandas?

Although there are other projects to speed up Pandas, they tend not to be stable or mature enough yet to use broadly. If this could approximately double the speed of reading and formatting floats, it would be very useful but it would have to work out-of-the-box with these other packages.

Does it also speed up float comparisons?

What do you think?

Make "coerce" of fast_real apply to both string and numeric input

Currently, if a string with an int-like float (i.e. '4.0') is given to fast_real, it will be returned as an int instead of a float. The user has the option to toggle this behavior for numeric input with the coerce option.

I will make the coerce option apply to both string and numeric input, and change the default to True; the default is currently False, but since it only applies to numbers currently and the option was only recently added I feel like making it True will be the least invasive for backwards-compatibility purposes.

Support for unicode digit/numeric characters in Python 3.7.

Minimum, Complete, Verifiable Example

>>> import fastnumbers
>>> fastnumbers.fast_real('⑦', raise_on_invalid=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: could not convert string to float: '⑦'

Error message, Traceback, Desired behavior, Suggestion, Request, or Question

This works perfectly fine in Python <= 3.6, but fails in Python 3.7. I have traced it to the use of _PyUnicode_TransformDecimalAndSpaceToASCII, which in Python <= 3.6 ignores characters outside the ASCII range that are non-decimal, but in Python 3.7 converts them to the "?" character. This breaks the assumption within fastnumbers that a unicode digit/numeral would be left as-is.

It think it is time for fastnumbers to implement this functionality itself.

Segfaults on tests for Python 3.7.0

Inconsistently, and at "random" points during testing, I experience segmentation faults on Python 3.7.0. It happens no matter the OS (Mac, Windows, Linux). I strongly believe that this is not a bug in fastnumbers but rather with Python itself. My logic for this conclusion is

  • There is an open issue on bugs.python.org (https://bugs.python.org/issue34087, called "int(s), float(s) and others may cause segmentation fault") that points out that a change to the unicode handling internal function _PyUnicode_TransformDecimalAndSpaceToASCII that is called by int and float can introduce segfaults.
  • There is no difference in code within fastnumbers between Python 3.6 and 3.7, and no segfaults occur on Python 3.6.

I will leave this issue open till Python 3.7.1 is released (which has a patch for the segfault) and I can verify that this resolves the issue.


In interesting coincidence - it is the fact that _PyUnicode_TransformDecimalAndSpaceToASCII changed in 3.7 that started PR #16, but it was because its behavior changed, not because of segfaults.

Please strip the shared library

$ file ./work-py27/stage/usr/local/lib/python2.7/site-packages/fastnumbers.so
./work-py27/stage/usr/local/lib/python2.7/site-packages/fastnumbers.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, not stripped

The FreeBSD port always strips it with a separate instruction. It would be better if it would be stripped during build.

Thank you.

Add support for operating on iterables

Describe the feature or enhancement

Add support for conversion on an iterable, either by directly adding that support to existing functions, or providing a new function e.g. map_float or map_try_float. These would behave basically like

map(try_float, some_iterable)

Provide a concrete example of how the feature or enhancement will improve fastnumbers

Every time a function is called in Python, there is some overhead due to memory allocations and whatnot. When operating on a large data set this overhead will start to become a sizable fraction of the net runtime. While it is true that using map() can mitigate this somewhat over standard for-loops or list-comprehensions, it still does not eliminate the problem.

Allowing fastnumbers functions to accept an iterable and then internally loop over the data and return either a list or iterator would circumvent this overhead and provide meaningful speedups for large datasets.

Re-write using C++ and pybind11

While attempting #37 I ran into some troubles with how cumbersome changing things was. Maintenance has become a problem. This is mostly because the code is written in pure C.

When fastnumbers was started, the landscape of packaging and distributing extensions was much poorer than it is today. There were no wheels. Extensions basically had to be compiled by the user when installed every time. I wanted to minimize potential troubles for the user so I chose to write in pure C using the raw Python API. C compilers are more likely to be installed, and compilation typically takes less time than C++. I had considered Cython, but at the time there was no way to define build-time dependencies so users would face problems if they had not pre-installed it on their machine before installing fastnumbers.

Today, things look much better. With the advent of wheels, it basically makes no difference what language or framework I choose. C++ is far more expressive than C, and with templates and OOP I can reduce the maintenance burden. Doing this will make it easier to address problems going forward.

Use fast C++ methods like std::from_chars or fast_float

There is an opportunity for a massive speed bump.

The C++ world alone has about a 10x spread between the slowest string to int/float method (iostream) and the fastest (from_chars). The standard Python int() and float() methods match up with the slowest C++ methods.

I did some benchmarks tailored for a particular application, hence the bytes/second units, but the general magnitudes of the numbers are informative:

image

I tried fastnumbers and the difference wasn't significant (I could be doing something wrong, I'd love a correction if I am). Even so, the fastnumbers best case promise is only 2x speedup, while even the C standard library offers methods that are significantly faster.

See https://github.com/alugowski/parse-bench for benchmarks

Broken 3.2.0 installation

See pypa/cibuildwheel#902.

Because GitHub actions doesn't let me restart just one job, the fact that macos failed cratered my ability to deploy all platforms. Linux got installed but Windows and macos did not.

When the linked issue is resolved I will re-deploy as 3.2.1.

[BUG] FastNumbers can crash with a SystemError due to returning NULL without setting an exception

Describe the bug
Observed in bug 274 of Mikado by myself and @fmarletaz: in certain conditions, FastNumbers crashes the program by returning NULL rather than None.

Expected behavior
FastNumbers should return None or another valid Python value.

Environment (please complete the following information):

  • Python Version: 3.7
  • OS: LInux
  • Compiler (if known): @fmarletaz could check

To Reproduce
Please see the bug above.

Suspicion is that in all instances where there is a
return NULL

in fastnumbers.c (e.g. line 189), the correct line would be instead:

Py_RETURN_NONE

See here for why this is my suspicion.

Add support to release Linux aarch64 wheels

Problem

On aarch64, ‘pip install fastnumbers’ builds the wheels from source code and then installs it. It requires the user to have a development environment installed on his system. Also, it takes some time to build the wheels than downloading and extracting the wheels from pypi.

Resolution

On aarch64, ‘pip install fastnumbers’ should download the wheels from pypi

@SethMMorton Please let me know your interest in releasing aarch64 wheels. I can help in this.

Speed not better than Python's int/float

Hi,

I don't quite see the speed improvement in my own tests.

In [28]: len(numbs)
Out[28]: 1000000

In [29]: numbs[:5]
Out[29]: 
['0.7900414395464864',
 '0.9789330973579582',
 '0.8321431542764068',
 '0.3254459594374661',
 '0.9098654575745327']


In [33]: start_time = time.time()
    ...: for i in numbs:
    ...:     a = float(i)
    ...: print(time.time() - start_time)
    ...: 
0.44566822052001953

In [34]: start_time = time.time()
    ...: for i in numbs:
    ...:     a = fastnumbers.float(i)
    ...: print(time.time() - start_time)
    ...: 
0.5358688831329346

In [36]: %timeit float("3.1939130238")
The slowest run took 25.31 times longer than the fastest. This could mean that an intermediate result is being cached.
10000000 loops, best of 5: 140 ns per loop

In [37]: %timeit fastnumbers.float("3.1939130238")
The slowest run took 32.50 times longer than the fastest. This could mean that an intermediate result is being cached.
1000000 loops, best of 5: 213 ns per loop

Am I using the package incorrectly?

Possible segfault

I'm new to python and debugging things, but I seem to have come across a segfault in fastnumbers. I'm using natsort in my python code, and natsort recommended that I install fastnumbers, so I did. Now on rare occasions my code crashes and I can't figure out why. Unfortunately my code is very long and the file that crashes it is huge. However, here is the crash and backtrace from gdb:

Program received signal SIGSEGV, Segmentation fault.
fast_atoi (p=0xac980034 <error: Cannot access memory at address 0xac980034>, error=0xbfffcc26, overflow=0xbfffcc27) at src/fast_atoi.c:24
24 src/fast_atoi.c: No such file or directory.
(gdb) bt
#0 fast_atoi (p=0xac980034 <error: Cannot access memory at address 0xac980034>, error=0xbfffcc26, overflow=0xbfffcc27) at src/fast_atoi.c:24
#1 0xb01266f8 in fastnumbers_fast_int (self=0x0, args=0xadfc944c, kwargs=0x0) at src/fastnumbers.c:209
#2 0x0810a1bd in PyEval_EvalFrameEx ()
#3 0x08108dbd in PyEval_EvalCodeEx ()
#4 0x0810b975 in PyEval_EvalFrameEx ()
#5 0x0812299d in ?? ()
#6 0x08193e7c in ?? ()
#7 0x08100162 in PyObject_CallFunctionObjArgs ()
#8 0x080ef072 in ?? ()
#9 0x081743d2 in ?? ()
#10 0x0810f286 in PyEval_EvalFrameEx ()
#11 0x08108dbd in PyEval_EvalCodeEx ()
#12 0x0810a86e in PyEval_EvalFrameEx ()
#13 0x0812299d in ?? ()
#14 0x081430ec in ?? ()
#15 0x08111141 in PyEval_CallObjectWithKeywords ()
#16 0xafeff012 in wxPyCallback::EventThunker(wxEvent&) () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/core.so
#17 0xaf92d033 in wxAppConsole::HandleEvent(wxEvtHandler_, void (wxEvtHandler::_)(wxEvent&), wxEvent&) const () from /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0
#18 0xaf9c1028 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0
#19 0xaf9c1404 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0
#20 0xaf9c14de in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/i386-linux-gnu/libwx_baseu-2.8.so.0
#21 0xafbe2c96 in ?? () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-2.8.so.0
#22 0xaf2bf557 in g_cclosure_marshal_VOID__VOIDv () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#23 0xaf2bdabf in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#24 0xaf2d77a5 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#25 0xaf2d8075 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#26 0xaf46a261 in gtk_button_clicked () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#27 0xaf46b411 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#28 0xaf2bf537 in g_cclosure_marshal_VOID__VOIDv () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#29 0xaf2bc332 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#30 0xaf2bdabf in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#31 0xaf2d77a5 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#32 0xaf2d8075 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#33 0xaf46a191 in gtk_button_released () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0

---Type to continue, or q to quit---
#34 0xaf46a1d4 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#35 0xaf51742c in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#36 0xaf2bc3e4 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#37 0xaf2bd89b in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#38 0xaf2cf791 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#39 0xaf2d7a02 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#40 0xaf2d8075 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#41 0xaf637aac in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#42 0xaf5157c9 in gtk_propagate_event () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#43 0xaf515cdd in gtk_main_do_event () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#44 0xaf3891c9 in ?? () from /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#45 0xaf1ced64 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#46 0xaf1cf089 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#47 0xaf1cf439 in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#48 0xaf5149a5 in gtk_main () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#49 0xafb97fc3 in wxEventLoop::Run() () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-2.8.so.0
#50 0xafc249c9 in wxAppBase::MainLoop() () from /usr/lib/i386-linux-gnu/libwx_gtk2u_core-2.8.so.0
#51 0xaff03451 in wxPyApp::MainLoop() () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/core.so
#52 0xaff2bf61 in ?? () from /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/core.so
#53 0x0810ddcd in PyEval_EvalFrameEx ()
#54 0x0812299d in ?? ()
#55 0x081430ec in ?? ()
#56 0x0810ab8f in PyEval_EvalFrameEx ()
#57 0x0810a6e3 in PyEval_EvalFrameEx ()
#58 0x0810a6e3 in PyEval_EvalFrameEx ()
#59 0x08108dbd in PyEval_EvalCodeEx ()
#60 0x0813dacc in ?? ()
#61 0x08135898 in PyRun_FileExFlags ()
#62 0x08134b05 in PyRun_SimpleFileExFlags ()
#63 0x080dd500 in Py_Main ()
#64 0x080dcf5b in main ()

I think it traces back to fastnumbers. Thanks for taking a look at this, and sorry if I haven't provided enough information.

Big numbers handling: silencing arbitrary digits beyond least significant bit

Describe the bug

fast_real(3.453e78)

returns

3453000000000000090829207640410620202184021047720495530415184879687805108748288

instead of

3453000000000000000000000000000000000000000000000000000000000000000000000000000

Environment (please complete the following information):

  • fastnumbers version: 5.0.1 (installed by pip on conda environment)
  • Python Version: 3.10.11
  • OS: Windows

Observations

I know that the current behaviour is due to unavoidable numeric representation error, however the result is somewhat "disturbing". IMHO the ideal behaviour should be to round the result to the digit before the least significant bit. It's not a surprise that

math.ulp(3.453e78)

gives

4.113761393303015e+62

which tells us that the last 62 digits of the integer output of fast_real(3.453e78) are, so to say, arbitrary and therefore misleading.

Proposal: Do not raise an exception on None

Hi @SethMMorton,

It could be possible for fastnumbers to handle None instead of rising and exception?

import fastnumbers
fastnumbers.fast_float(None)
TypeError: float() argument must be a string or a number, not 'NoneType'

Maybe return None?

[regression] error: unknown type name 'PyObject'

While trying to update the FreeBSD port to 2.1.0 this new error occurs:

In file included from /usr/ports/devel/py-fastnumbers/work-py27/fastnumbers-2.1.0/include/strings.h:9:
/usr/ports/devel/py-fastnumbers/work-py27/fastnumbers-2.1.0/include/options.h:15:5: error: unknown type name 'PyObject'
    PyObject *retval;
    ^
/usr/ports/devel/py-fastnumbers/work-py27/fastnumbers-2.1.0/include/options.h:16:5: error: unknown type name 'PyObject'
    PyObject *input;
    ^
/usr/ports/devel/py-fastnumbers/work-py27/fastnumbers-2.1.0/include/options.h:17:5: error: unknown type name 'PyObject'
    PyObject *key;
    ^

Fast Numbers on its own isinstance()

I am not sure if it's worth looking into because when importing fastnumbers by simply stating: import fastnumbers An error does not occur, but...

This code causes an error (Python 3.63 windows 10 64bit):

from fastnumbers import *

x = 1

if isinstance(x,int):
    print ("it's an integer")

the error is:

if isinstance(x,int):
TypeError: isinstance() arg 2 must be a type or tuple of types

Error: <built-in function isint/isfloat> returned NULL without setting an error

Describe the bug
The following two related errors appeared:
"<built-in function isint> returned NULL without setting an error" and "<built-in function isfloat> returned NULL without setting an error" when running isint('X') / isfloat('X').
The issue happens only in specific situations, but happens consistently when such a situation arises.

Expected behavior
Returns False, and continues with the rest of the program.

Environment (please complete the following information):

  • fastnumbers version: 3.2.1
  • Python Version: 3.7
  • OS: Amazon Linux 2
  • Compiler (if known): don't know

To Reproduce

import logging
import pandas as pd
from fastnumbers import isfloat, isint

def retrieve(var,dictionary):
    if isint(var):
        return int(var)
    elif isfloat(var):
        return float(var)
    elif var in dictionary:
        return dictionary[var]
    else:
        return var

from flask import Flask
app = Flask(__name__)

@app.route("/1", methods=["POST"])
def project_api_1():
    var_dict = {}
    try:
        variables = ["X", "TestData"]
        *var_list, filename = variables
        csv_file_loc = filename+".csv"
        df = pd.read_csv(csv_file_loc,dtype=str, keep_default_na=False)
        for var in var_list:
            var_dict[var] = list(df[var])
            
        inputvar = 'X'
        inputvar = retrieve(inputvar,var_dict)
        return '', 200
    except Exception as e:
        logging.error(e, exc_info=True)
        return '', 400

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=8003)

Brief description: Upon calling the flask API, the program goes into 'TestData.csv" and imports the column "X". This column contains a list of numbers from 1 to 1048575 (basically filling up the entire column on Excel), and saves it to a dictionary var_dict.

I have the "retrieve" function which, when given a string, checks (hierarchically) if it is an int / float / exists in the dictionary and returns the int / float / dictionary value respectively. Given the value 'X', I would like the function to first of all ascertain "X" is not an int / float, and then return var_dict['X']. However, the isint / isfloat functions both fail to run as expected.

This issue seems to occur only when the size of column "X" in the csv is smaller it works as expected, so it looks like that might be causing an issue, though I'm not sure why. Have tried sizes up to about 500000 and it still works, so the crossover point must be somewhere above that.

Update documentation and metadata

Describe the bug
Somehow, none of the package data got uploaded to PyPI in version 2.2.0, and the documentation on ReadTheDocs does not match what I would expect.

Expected behavior
All the metadata and documentation should match the code.

fatal error: Python.h: No such file or directory

I receive this error when installing fastnumbers on a raspberry pi 3. Prior to installing I updated "sudo apt-get update" and then "sudo apt-get dist-upgrade", then "sudo rip-update" and reboot.

I then attempted to install fastnumbers. Thank you

 $ sudo pip install fastnumbers
Downloading/unpacking fastnumbers
  Downloading fastnumbers-1.0.0.zip (64kB): 64kB downloaded
  Running setup.py (path:/tmp/pip-build-RJWObW/fastnumbers/setup.py) egg_info for package fastnumbers
    
    warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
Installing collected packages: fastnumbers
  Running setup.py install for fastnumbers
    building 'fastnumbers' extension
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pip-build-RJWObW/fastnumbers/include -I/usr/include/python2.7 -c src/parse_integer_from_string.c -o build/temp.linux-armv7l-2.7/src/parse_integer_from_string.o
    In file included from src/parse_integer_from_string.c:3:0:
    /tmp/pip-build-RJWObW/fastnumbers/include/parsing.h:4:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-RJWObW/fastnumbers/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-KjuPQN-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_ext

building 'fastnumbers' extension

creating build

creating build/temp.linux-armv7l-2.7

creating build/temp.linux-armv7l-2.7/src

arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pip-build-RJWObW/fastnumbers/include -I/usr/include/python2.7 -c src/parse_integer_from_string.c -o build/temp.linux-armv7l-2.7/src/parse_integer_from_string.o

In file included from src/parse_integer_from_string.c:3:0:

/tmp/pip-build-RJWObW/fastnumbers/include/parsing.h:4:20: fatal error: Python.h: No such file or directory

 #include <Python.h>

                    ^

compilation terminated.

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-RJWObW/fastnumbers/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-KjuPQN-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-RJWObW/fastnumbers
Storing debug log for failure in /root/.pip/pip.log

Missing -lm breaks build on armv7hl

Describe the bug
Build failure on armv7hl

/usr/bin/ld: build/temp.linux-armv8l-3.10/src/numbers.o: in function `_PyFloat_is_Intlike':
/home/iurt/rpmbuild/BUILD/fastnumbers-3.2.1/src/numbers.c:69: undefined reference to `floor'

As the code uses floor() it should set -lm when linking. I guess on other architectures something else is already pulling in -lm so it was not noticed.

Adding extra_link_args=["-lm"]to setup.py fixes it.

Environment (please complete the following information):

  • fastnumbers version: 3.2.1
  • Python Version: 3.10
  • OS: Mageia
  • Compiler (if known): gcc 11.2

Add numpy support?

Describe the feature or enhancement

Add support for operating on numpy arrays.

Provide a concrete example of how the feature or enhancement will improve fastnumbers

I'm not 100% if this would be useful... generally, we don't store strings in numpy arrays so I don't know when one would be needing to perform a string to float/int conversion on a numpy array.

It might be useful in pandas, where stringish data is often stored, but pandas has its own very fast conversion functionality, especially when using read_csv, so I'm not sure how much value this would even bring there.

My guess is that if #61 were implemented, it would cover most of the cases where this feature would be needed.

Proposal: change behavior of isfloat function with respect to treatment of strings containing integers

Describe the feature or enhancement
The proposal is to change how isfloat interprets strings. Currently, it has the following behavior:

>>> isfloat("56")
True
>>> isfloat("56.0")
True
>>> isfloat(56)
False
>>> isfloat(56.0)
True

The proposal is to change the behavior to the following:

>>> isfloat("56")
False
>>> isfloat("56.0")
True
>>> isfloat(56)
False
>>> isfloat(56.0)
True

Provide a concrete example of how the feature or enhancement will improve fastnumbers
isfloat is inconsistent. For strings that look like integers, it returns True, but for numeric types it is strict. In fact, isfloat behaves identically to isreal for string input. Users wanting to detect if string input is actually a float an not an int cannot in a single call.

The rational behind this was that for string input, isfloat would return True if fast_float would successfully convert to a float. The intention was to introduce symmetry between the functions, but unfortunately this was not achieved because of how the function behaves with numeric input.

Really, the current behavior of isfloat is acting like isreal.

A successful introduction will have a deprecation schedule, so that users are not completely caught off-guard. At the very least, this needs to be advertised at the top of the README for a while.


NOTE: This was brought up as part of #37 by @argenisleon.

Improve performance with METH_FASTCALL

Starting in Python 3.7, there is a new way for C functions to define how arguments are passed from python called "fast call" or "vector call" that is supposed to be much faster than the standard method. Taking advantage of this should provide a performance boost for fastnumbers.

Unfortunately, there is as-of-yet no public API for parsing arguments when using this method, so I will have to write one. I will likely heavily borrow from numpy/numpy#15269.

python3.9 compatibility

Describe the bug
Arch Linux is currently rebuilding all python related things against python3.9.
The python-fastnumbers package has failing tests on python3.9 and looking at the build output I am not entirely sure they can just be ignored.

Expected behavior
python3.9 is supported

Environment (please complete the following information):

  • fastnumbers version: 3.0.0
  • Python Version: 3.9.0
  • OS: Arch Linux
  • Compiler (if known): gcc 10.2.0

To Reproduce

python setup.py build
local _py3_ver=$(python --version | cut -d " " -f2)
export PYTHONPATH="build/lib.linux-$CARCH-${_py3_ver%"."*}:${PYTHONPATH}"
pytest -v
running build
running build_ext
building 'fastnumbers' extension
creating build
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/build/python-fastnumbers/src/python-fastnumbers-3.0.0/include -I/usr/include/python3.9 -c src/fastnumbers.c -o build/temp.linux-x86_64-3.9/src/fastnumbers.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/build/python-fastnumbers/src/python-fastnumbers-3.0.0/include -I/usr/include/python3.9 -c src/numbers.c -o build/temp.linux-x86_64-3.9/src/numbers.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/build/python-fastnumbers/src/python-fastnumbers-3.0.0/include -I/usr/include/python3.9 -c src/objects.c -o build/temp.linux-x86_64-3.9/src/objects.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/build/python-fastnumbers/src/python-fastnumbers-3.0.0/include -I/usr/include/python3.9 -c src/parsing.c -o build/temp.linux-x86_64-3.9/src/parsing.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/build/python-fastnumbers/src/python-fastnumbers-3.0.0/include -I/usr/include/python3.9 -c src/strings.c -o build/temp.linux-x86_64-3.9/src/strings.o
In file included from src/strings.c:14:
src/strings.c: In function ‘str_to_PyFloat’:
/build/python-fastnumbers/src/python-fastnumbers-3.0.0/include/fastnumbers/numbers.h:24:55: warning: implicit declaration of function ‘_Py_dg_stdnan’ [-Wimplicit-function-declaration]
   24 | #define PyFloat_from_NaN(negative) PyFloat_FromDouble(_Py_dg_stdnan(negative));
      |                                                       ^~~~~~~~~~~~~
src/strings.c:115:20: note: in expansion of macro ‘PyFloat_from_NaN’
  115 |             return PyFloat_from_NaN(sign < 0);
      |                    ^~~~~~~~~~~~~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/build/python-fastnumbers/src/python-fastnumbers-3.0.0/include -I/usr/include/python3.9 -c src/unicode_character.c -o build/temp.linux-x86_64-3.9/src/unicode_character.o
creating build/lib.linux-x86_64-3.9
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.9/src/fastnumbers.o build/temp.linux-x86_64-3.9/src/numbers.o build/temp.linux-x86_64-3.9/src/objects.o build/temp.linux-x86_64-3.9/src/parsing.o build/temp.linux-x86_64-3.9/src/strings.o build/temp.linux-x86_64-3.9/src/unicode_character.o -L/usr/lib -o build/lib.linux-x86_64-3.9/fastnumbers.cpython-39-x86_64-linux-gnu.so

============================= test session starts ==============================
platform linux -- Python 3.9.0, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/build/python-fastnumbers/src/python-fastnumbers-3.0.0/.hypothesis/examples')
rootdir: /build/python-fastnumbers/src/python-fastnumbers-3.0.0
plugins: hypothesis-5.41.2
collecting ... collected 233 items

tests/test_builtins.py::GeneralFloatCases::test_error_message PASSED     [  0%]
tests/test_builtins.py::GeneralFloatCases::test_float PASSED             [  0%]
tests/test_builtins.py::GeneralFloatCases::test_float_memoryview PASSED  [  1%]
tests/test_builtins.py::GeneralFloatCases::test_float_with_comma SKIPPED [  1%]
tests/test_builtins.py::GeneralFloatCases::test_floatconversion PASSED   [  2%]
tests/test_builtins.py::GeneralFloatCases::test_keyword_args PASSED      [  2%]
tests/test_builtins.py::GeneralFloatCases::test_non_numeric_input_types PASSED [  3%]
tests/test_builtins.py::GeneralFloatCases::test_underscores PASSED       [  3%]
tests/test_builtins.py::InfNanTest::test_inf_as_str PASSED               [  3%]
tests/test_builtins.py::InfNanTest::test_inf_from_str PASSED             [  4%]
tests/test_builtins.py::InfNanTest::test_inf_signs PASSED                [  4%]
tests/test_builtins.py::InfNanTest::test_nan_as_str PASSED               [  5%]
tests/test_builtins.py::InfNanTest::test_nan_from_str FAILED             [  5%]
tests/test_builtins.py::InfNanTest::test_nan_signs FAILED                [  6%]
tests/test_builtins.py::IntTestCases::test_basic PASSED                  [  6%]
tests/test_builtins.py::IntTestCases::test_error_message PASSED          [  6%]
tests/test_builtins.py::IntTestCases::test_int_base_bad_types PASSED     [  7%]
tests/test_builtins.py::IntTestCases::test_int_base_indexable PASSED     [  7%]
tests/test_builtins.py::IntTestCases::test_int_base_limits PASSED        [  8%]
tests/test_builtins.py::IntTestCases::test_int_memoryview PASSED         [  8%]
tests/test_builtins.py::IntTestCases::test_int_returns_int_subclass PASSED [  9%]
tests/test_builtins.py::IntTestCases::test_int_subclass_with_index PASSED [  9%]
tests/test_builtins.py::IntTestCases::test_int_subclass_with_int PASSED  [  9%]
tests/test_builtins.py::IntTestCases::test_intconversion PASSED          [ 10%]
tests/test_builtins.py::IntTestCases::test_issue31619 PASSED             [ 10%]
tests/test_builtins.py::IntTestCases::test_keyword_args PASSED           [ 11%]
tests/test_builtins.py::IntTestCases::test_no_args PASSED                [ 11%]
tests/test_builtins.py::IntTestCases::test_non_numeric_input_types PASSED [ 12%]
tests/test_builtins.py::IntTestCases::test_small_ints PASSED             [ 12%]
tests/test_builtins.py::IntTestCases::test_string_float PASSED           [ 12%]
tests/test_builtins.py::IntTestCases::test_underscores PASSED            [ 13%]
tests/test_fastnumbers.py::test_version PASSED                           [ 13%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[fast_real] PASSED [ 14%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[fast_float] PASSED [ 14%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[fast_int] PASSED [ 15%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[fast_forceint] PASSED [ 15%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[isreal] PASSED [ 15%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[isfloat] PASSED [ 16%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[isint] PASSED [ 16%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[isintlike] PASSED [ 17%]
tests/test_fastnumbers.py::test_invalid_argument_raises_type_error[real] PASSED [ 17%]
tests/test_fastnumbers.py::test_no_arguments_raises_type_error[fast_real] PASSED [ 18%]
tests/test_fastnumbers.py::test_no_arguments_raises_type_error[fast_float] PASSED [ 18%]
tests/test_fastnumbers.py::test_no_arguments_raises_type_error[fast_int] PASSED [ 18%]
tests/test_fastnumbers.py::test_no_arguments_raises_type_error[fast_forceint] PASSED [ 19%]
tests/test_fastnumbers.py::test_no_arguments_raises_type_error[isreal] PASSED [ 19%]
tests/test_fastnumbers.py::test_no_arguments_raises_type_error[isfloat] PASSED [ 20%]
tests/test_fastnumbers.py::test_no_arguments_raises_type_error[isint] PASSED [ 20%]
tests/test_fastnumbers.py::test_no_arguments_raises_type_error[isintlike] PASSED [ 21%]
tests/test_fastnumbers.py::test_key_backwards_compatibility[fast_real] PASSED [ 21%]
tests/test_fastnumbers.py::test_key_backwards_compatibility[fast_float] PASSED [ 21%]
tests/test_fastnumbers.py::test_key_backwards_compatibility[fast_int] PASSED [ 22%]
tests/test_fastnumbers.py::test_key_backwards_compatibility[fast_forceint] PASSED [ 22%]
tests/test_fastnumbers.py::test_real_no_arguments_returns_0 PASSED       [ 23%]
tests/test_fastnumbers.py::test_real_returns_same_as_fast_real PASSED    [ 23%]
tests/test_fastnumbers.py::test_numbers_with_underscores_converted_according_to_allow_underscores_option[fast_real] PASSED [ 24%]
tests/test_fastnumbers.py::test_numbers_with_underscores_converted_according_to_allow_underscores_option[fast_float] PASSED [ 24%]
tests/test_fastnumbers.py::test_numbers_with_underscores_converted_according_to_allow_underscores_option[fast_int] PASSED [ 24%]
tests/test_fastnumbers.py::test_numbers_with_underscores_converted_according_to_allow_underscores_option[fast_forceint] PASSED [ 25%]
tests/test_fastnumbers.py::test_numbers_with_underscores_identified_according_to_allow_underscores_option[isreal] PASSED [ 25%]
tests/test_fastnumbers.py::test_numbers_with_underscores_identified_according_to_allow_underscores_option[isfloat] PASSED [ 26%]
tests/test_fastnumbers.py::test_numbers_with_underscores_identified_according_to_allow_underscores_option[isint] PASSED [ 26%]
tests/test_fastnumbers.py::test_numbers_with_underscores_identified_according_to_allow_underscores_option[isintlike] PASSED [ 27%]
tests/test_fastnumbers.py::TestFastReal::test_with_coerce_given_dumb_class_responds_to_internal_valueerror PASSED [ 27%]
tests/test_fastnumbers.py::TestFastReal::test_given_float_returns_float PASSED [ 27%]
tests/test_fastnumbers.py::TestFastReal::test_given_float_returns_int_if_intlike_with_coerce PASSED [ 28%]
tests/test_fastnumbers.py::TestFastReal::test_given_float_returns_float_or_int_with_coerce PASSED [ 28%]
tests/test_fastnumbers.py::TestFastReal::test_given_nan_returns_nan PASSED [ 29%]
tests/test_fastnumbers.py::TestFastReal::test_given_nan_returns_sub_value PASSED [ 29%]
tests/test_fastnumbers.py::TestFastReal::test_given_inf_returns_inf PASSED [ 30%]
tests/test_fastnumbers.py::TestFastReal::test_given_inf_returns_sub_value PASSED [ 30%]
tests/test_fastnumbers.py::TestFastReal::test_given_float_string_returns_float PASSED [ 30%]
tests/test_fastnumbers.py::TestFastReal::test_given_float_string_returns_int_with_coerce_with_intlike PASSED [ 31%]
tests/test_fastnumbers.py::TestFastReal::test_given_nan_string_returns_nan FAILED [ 31%]
tests/test_fastnumbers.py::TestFastReal::test_with_nan_given_nan_string_returns_sub_value PASSED [ 32%]
tests/test_fastnumbers.py::TestFastReal::test_given_inf_string_returns_inf PASSED [ 32%]
tests/test_fastnumbers.py::TestFastReal::test_given_very_large_float_returns_inf_with_coerce_on_or_off PASSED [ 33%]
tests/test_fastnumbers.py::TestFastReal::test_with_inf_given_inf_string_returns_sub_value PASSED [ 33%]
tests/test_fastnumbers.py::TestFastReal::test_given_padded_float_strings_returns_float PASSED [ 33%]
tests/test_fastnumbers.py::TestFastReal::test_given_padded_nan_returns_nan FAILED [ 34%]
tests/test_fastnumbers.py::TestFastReal::test_given_padded_inf_string_returns_inf PASSED [ 34%]
tests/test_fastnumbers.py::TestFastReal::test_given_int_returns_int PASSED [ 35%]
tests/test_fastnumbers.py::TestFastReal::test_given_int_returns_int_with_coerce PASSED [ 35%]
tests/test_fastnumbers.py::TestFastReal::test_given_int_string_returns_int PASSED [ 36%]
tests/test_fastnumbers.py::TestFastReal::test_given_padded_int_string_returns_int PASSED [ 36%]
tests/test_fastnumbers.py::TestFastReal::test_given_unicode_digit_returns_int PASSED [ 36%]
tests/test_fastnumbers.py::TestFastReal::test_given_unicode_numeral_returns_float PASSED [ 37%]
tests/test_fastnumbers.py::TestFastReal::test_given_unicode_non_numeral_returns_as_is PASSED [ 37%]
tests/test_fastnumbers.py::TestFastReal::test_given_unicode_of_more_than_one_char_returns_as_is PASSED [ 38%]
tests/test_fastnumbers.py::TestFastReal::test_given_invalid_string_returns_string_as_is PASSED [ 38%]
tests/test_fastnumbers.py::TestFastReal::test_given_invalid_string_raises_valueerror_if_raise_on_invalid_is_true PASSED [ 39%]
tests/test_fastnumbers.py::TestFastReal::test_given_invalid_type_raises_typeerror PASSED [ 39%]
tests/test_fastnumbers.py::TestFastReal::test_returns_default_value_if_given_invalid_string PASSED [ 39%]
tests/test_fastnumbers.py::TestFastReal::test_raises_valueerror_if_raise_on_invalid_is_true_with_default PASSED [ 40%]
tests/test_fastnumbers.py::TestFastReal::test_returns_input_as_is_if_valid_and_on_fail_is_given PASSED [ 40%]
tests/test_fastnumbers.py::TestFastReal::test_returns_transformed_input_if_invalid_and_on_fail_is_given PASSED [ 41%]
tests/test_fastnumbers.py::TestFastFloat::test_given_dumb_class_responds_to_internal_valueerror PASSED [ 41%]
tests/test_fastnumbers.py::TestFastFloat::test_given_float_returns_float PASSED [ 42%]
tests/test_fastnumbers.py::TestFastFloat::test_given_nan_returns_nan PASSED [ 42%]
tests/test_fastnumbers.py::TestFastFloat::test_given_nan_returns_sub_value PASSED [ 42%]
tests/test_fastnumbers.py::TestFastFloat::test_given_inf_returns_inf PASSED [ 43%]
tests/test_fastnumbers.py::TestFastFloat::test_given_inf_returns_sub_value PASSED [ 43%]
tests/test_fastnumbers.py::TestFastFloat::test_with_range_of_exponents_correctly_parses PASSED [ 44%]
tests/test_fastnumbers.py::TestFastFloat::test_given_float_string_returns_float PASSED [ 44%]
tests/test_fastnumbers.py::TestFastFloat::test_given_nan_string_returns_nan FAILED [ 45%]
tests/test_fastnumbers.py::TestFastFloat::test_given_inf_string_returns_inf PASSED [ 45%]
tests/test_fastnumbers.py::TestFastFloat::test_given_padded_float_strings_returns_float PASSED [ 45%]
tests/test_fastnumbers.py::TestFastFloat::test_given_padded_nan_returns_nan FAILED [ 46%]
tests/test_fastnumbers.py::TestFastFloat::test_given_padded_inf_string_returns_inf PASSED [ 46%]
tests/test_fastnumbers.py::TestFastFloat::test_given_int_returns_float PASSED [ 47%]
tests/test_fastnumbers.py::TestFastFloat::test_given_int_string_returns_float PASSED [ 47%]
tests/test_fastnumbers.py::TestFastFloat::test_given_padded_int_string_returns_float PASSED [ 48%]
tests/test_fastnumbers.py::TestFastFloat::test_given_unicode_digit_returns_float PASSED [ 48%]
tests/test_fastnumbers.py::TestFastFloat::test_given_unicode_numeral_returns_float PASSED [ 48%]
tests/test_fastnumbers.py::TestFastFloat::test_given_unicode_non_numeral_returns_as_is PASSED [ 49%]
tests/test_fastnumbers.py::TestFastFloat::test_given_unicode_of_more_than_one_char_returns_as_is PASSED [ 49%]
tests/test_fastnumbers.py::TestFastFloat::test_given_invalid_string_returns_string_as_is PASSED [ 50%]
tests/test_fastnumbers.py::TestFastFloat::test_given_invalid_string_raises_valueerror_if_raise_on_invalid_is_true PASSED [ 50%]
tests/test_fastnumbers.py::TestFastFloat::test_given_invalid_type_raises_typeerror PASSED [ 51%]
tests/test_fastnumbers.py::TestFastFloat::test_returns_default_value_if_given_invalid_string PASSED [ 51%]
tests/test_fastnumbers.py::TestFastFloat::test_raises_valueerror_if_raise_on_invalid_is_true_with_default PASSED [ 51%]
tests/test_fastnumbers.py::TestFastFloat::test_returns_input_as_is_if_valid_and_on_fail_is_given PASSED [ 52%]
tests/test_fastnumbers.py::TestFastFloat::test_returns_transformed_input_if_invalid_and_on_fail_is_given PASSED [ 52%]
tests/test_fastnumbers.py::TestFastInt::test_given_dumb_class_responds_to_internal_valueerror PASSED [ 53%]
tests/test_fastnumbers.py::TestFastInt::test_given_invalid_base_errors_with_valueerror PASSED [ 53%]
tests/test_fastnumbers.py::TestFastInt::test_given_float_returns_int PASSED [ 54%]
tests/test_fastnumbers.py::TestFastInt::test_given_nan_raises_valueerror_or_returns_as_is_or_returns_default PASSED [ 54%]
tests/test_fastnumbers.py::TestFastInt::test_given_inf_raises_overflowerror PASSED [ 54%]
tests/test_fastnumbers.py::TestFastInt::test_given_float_string_returns_string_as_is PASSED [ 55%]
tests/test_fastnumbers.py::TestFastInt::test_given_float_intlike_string_returns_string_as_is PASSED [ 55%]
tests/test_fastnumbers.py::TestFastInt::test_given_float_string_raises_valueerror_if_raise_on_invalid_is_true PASSED [ 56%]
tests/test_fastnumbers.py::TestFastInt::test_given_int_returns_int PASSED [ 56%]
tests/test_fastnumbers.py::TestFastInt::test_given_int_string_returns_int PASSED [ 57%]
tests/test_fastnumbers.py::TestFastInt::test_given_multiple_zeros_with_base_returns_zero PASSED [ 57%]
tests/test_fastnumbers.py::TestFastInt::test_given_padded_int_string_returns_int PASSED [ 57%]
tests/test_fastnumbers.py::TestFastInt::test_given_unicode_digit_returns_int PASSED [ 58%]
tests/test_fastnumbers.py::TestFastInt::test_given_unicode_numeral_returns_as_is PASSED [ 58%]
tests/test_fastnumbers.py::TestFastInt::test_given_unicode_non_numeral_returns_as_is PASSED [ 59%]
tests/test_fastnumbers.py::TestFastInt::test_given_unicode_of_more_than_one_char_returns_as_is PASSED [ 59%]
tests/test_fastnumbers.py::TestFastInt::test_given_invalid_string_returns_string_as_is PASSED [ 60%]
tests/test_fastnumbers.py::TestFastInt::test_given_invalid_string_raises_valueerror_if_raise_on_invalid_is_true PASSED [ 60%]
tests/test_fastnumbers.py::TestFastInt::test_given_invalid_type_raises_typeerror PASSED [ 60%]
tests/test_fastnumbers.py::TestFastInt::test_returns_default_value_if_given_invalid_string PASSED [ 61%]
tests/test_fastnumbers.py::TestFastInt::test_raises_valueerror_if_raise_on_invalid_is_true_with_default PASSED [ 61%]
tests/test_fastnumbers.py::TestFastInt::test_returns_input_as_is_if_valid_and_on_fail_is_given PASSED [ 62%]
tests/test_fastnumbers.py::TestFastInt::test_returns_transformed_input_if_invalid_and_on_fail_is_given PASSED [ 62%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_dumb_class_responds_to_internal_valueerror PASSED [ 63%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_float_returns_int PASSED [ 63%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_nan_raises_valueerror_or_returns_as_is_or_returns_default PASSED [ 63%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_inf_raises_overflowerror PASSED [ 64%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_float_string_returns_int PASSED [ 64%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_nan_string_raises_valueerror_with_raise_on_invalid_as_true FAILED [ 65%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_inf_string_raises_overflowerror_with_raise_on_invalid_as_true PASSED [ 65%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_padded_float_strings_returns_int PASSED [ 66%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_int_returns_int PASSED [ 66%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_int_string_returns_int PASSED [ 66%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_padded_int_string_returns_int PASSED [ 67%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_unicode_digit_returns_int PASSED [ 67%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_unicode_numeral_returns_int PASSED [ 68%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_unicode_non_numeral_returns_as_is PASSED [ 68%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_unicode_of_more_than_one_char_returns_as_is PASSED [ 69%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_invalid_string_returns_string_as_is PASSED [ 69%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_invalid_string_raises_valueerror_if_raise_on_invalid_is_true PASSED [ 69%]
tests/test_fastnumbers.py::TestFastForceInt::test_given_invalid_type_raises_typeerror PASSED [ 70%]
tests/test_fastnumbers.py::TestFastForceInt::test_returns_default_value_if_given_invalid_string PASSED [ 70%]
tests/test_fastnumbers.py::TestFastForceInt::test_raises_valueerror_if_raise_on_invalid_is_true_with_default PASSED [ 71%]
tests/test_fastnumbers.py::TestFastForceInt::test_returns_input_as_is_if_valid_and_on_fail_is_given PASSED [ 71%]
tests/test_fastnumbers.py::TestFastForceInt::test_returns_transformed_input_if_invalid_and_on_fail_is_given PASSED [ 72%]
tests/test_fastnumbers.py::TestIsReal::test_returns_true_if_given_int PASSED [ 72%]
tests/test_fastnumbers.py::TestIsReal::test_returns_true_if_given_float PASSED [ 72%]
tests/test_fastnumbers.py::TestIsReal::test_returns_false_if_given_int_and_str_only_is_true PASSED [ 73%]
tests/test_fastnumbers.py::TestIsReal::test_returns_false_if_given_float_and_str_only_is_true PASSED [ 73%]
tests/test_fastnumbers.py::TestIsReal::test_returns_true_if_given_int_string_padded_or_not PASSED [ 74%]
tests/test_fastnumbers.py::TestIsReal::test_returns_true_if_given_float_string_padded_or_not PASSED [ 74%]
tests/test_fastnumbers.py::TestIsReal::test_returns_false_if_given_string_and_num_only_is_true PASSED [ 75%]
tests/test_fastnumbers.py::TestIsReal::test_given_unicode_digit_returns_true PASSED [ 75%]
tests/test_fastnumbers.py::TestIsReal::test_given_unicode_numeral_returns_true PASSED [ 75%]
tests/test_fastnumbers.py::TestIsReal::test_given_unicode_non_numeral_returns_false PASSED [ 76%]
tests/test_fastnumbers.py::TestIsReal::test_given_unicode_of_more_than_one_char_returns_false PASSED [ 76%]
tests/test_fastnumbers.py::TestIsReal::test_returns_false_if_given_non_number_string PASSED [ 77%]
tests/test_fastnumbers.py::TestIsReal::test_returns_false_for_nan_string_unless_allow_nan_is_true PASSED [ 77%]
tests/test_fastnumbers.py::TestIsReal::test_returns_false_for_inf_string_unless_allow_infinity_is_true PASSED [ 78%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_false_if_given_int PASSED [ 78%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_true_if_given_float PASSED [ 78%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_false_if_given_float_and_str_only_is_true PASSED [ 79%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_true_if_given_int_string_padded_or_not PASSED [ 79%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_true_if_given_float_string_padded_or_not PASSED [ 80%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_false_if_given_string_and_num_only_is_true PASSED [ 80%]
tests/test_fastnumbers.py::TestIsFloat::test_given_unicode_digit_returns_true PASSED [ 81%]
tests/test_fastnumbers.py::TestIsFloat::test_given_unicode_numeral_returns_true PASSED [ 81%]
tests/test_fastnumbers.py::TestIsFloat::test_given_unicode_non_numeral_returns_false PASSED [ 81%]
tests/test_fastnumbers.py::TestIsFloat::test_given_unicode_of_more_than_one_char_returns_false PASSED [ 82%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_false_if_given_non_number_string PASSED [ 82%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_false_for_nan_string_unless_allow_nan_is_true PASSED [ 83%]
tests/test_fastnumbers.py::TestIsFloat::test_returns_false_for_inf_string_unless_allow_infinity_is_true PASSED [ 83%]
tests/test_fastnumbers.py::TestIsInt::test_returns_true_if_given_int PASSED [ 84%]
tests/test_fastnumbers.py::TestIsInt::test_returns_false_if_given_float PASSED [ 84%]
tests/test_fastnumbers.py::TestIsInt::test_returns_false_if_given_int_and_str_only_is_true PASSED [ 84%]
tests/test_fastnumbers.py::TestIsInt::test_returns_true_if_given_int_string_padded_or_not PASSED [ 85%]
tests/test_fastnumbers.py::TestIsInt::test_underscores PASSED            [ 85%]
tests/test_fastnumbers.py::TestIsInt::test_returns_false_if_given_float_string_padded_or_not PASSED [ 86%]
tests/test_fastnumbers.py::TestIsInt::test_returns_false_if_given_string_and_num_only_is_true PASSED [ 86%]
tests/test_fastnumbers.py::TestIsInt::test_given_unicode_digit_returns_true PASSED [ 87%]
tests/test_fastnumbers.py::TestIsInt::test_given_unicode_numeral_returns_false PASSED [ 87%]
tests/test_fastnumbers.py::TestIsInt::test_given_unicode_non_numeral_returns_false PASSED [ 87%]
tests/test_fastnumbers.py::TestIsInt::test_given_unicode_of_more_than_one_char_returns_false PASSED [ 88%]
tests/test_fastnumbers.py::TestIsInt::test_returns_false_if_given_non_number_string PASSED [ 88%]
tests/test_fastnumbers.py::TestIsInt::test_returns_false_for_nan_or_inf_string PASSED [ 89%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_true_if_given_int PASSED [ 89%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_false_if_given_non_integer_float PASSED [ 90%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_true_if_given_integer_float PASSED [ 90%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_false_if_given_int_and_str_only_is_true PASSED [ 90%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_false_if_given_integer_float_and_str_only_is_true PASSED [ 91%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_true_if_given_int_string_padded_or_not PASSED [ 91%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_true_if_given_integer_float_string_padded_or_not PASSED [ 92%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_false_if_given_non_integer_float_string_padded_or_not PASSED [ 92%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_false_if_given_string_and_num_only_is_true PASSED [ 93%]
tests/test_fastnumbers.py::TestIsIntLike::test_given_unicode_digit_returns_true PASSED [ 93%]
tests/test_fastnumbers.py::TestIsIntLike::test_given_unicode_non_digit_numeral_returns_false PASSED [ 93%]
tests/test_fastnumbers.py::TestIsIntLike::test_given_unicode_digit_numeral_returns_false PASSED [ 94%]
tests/test_fastnumbers.py::TestIsIntLike::test_given_unicode_non_numeral_returns_false PASSED [ 94%]
tests/test_fastnumbers.py::TestIsIntLike::test_given_unicode_of_more_than_one_char_returns_false PASSED [ 95%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_false_if_given_non_number_string PASSED [ 95%]
tests/test_fastnumbers.py::TestIsIntLike::test_returns_false_for_nan_or_inf_string PASSED [ 96%]
tests/test_fastnumbers_examples.py::test_fast_real FAILED                [ 96%]
tests/test_fastnumbers_examples.py::test_fast_float FAILED               [ 96%]
tests/test_fastnumbers_examples.py::test_fast_int PASSED                 [ 97%]
tests/test_fastnumbers_examples.py::test_fast_forceint FAILED            [ 97%]
tests/test_fastnumbers_examples.py::test_isreal PASSED                   [ 98%]
tests/test_fastnumbers_examples.py::test_isfloat PASSED                  [ 98%]
tests/test_fastnumbers_examples.py::test_isint PASSED                    [ 99%]
tests/test_fastnumbers_examples.py::test_isintlike PASSED                [ 99%]
tests/test_fastnumbers_examples.py::test_print_limits PASSED             [100%]

FASNUMBERS NUMERICAL LIMITS FOR THIS COMPILER BEFORE PYTHON FALLBACK:
MAXIMUM INTEGER LENTH: 18
MAX NUMBER FLOAT DIGITS: 11
MAXIMUM FLOAT EXPONENT: 99
MINIMUM FLOAT EXPONENT: -98


=================================== FAILURES ===================================
_________________________ InfNanTest.test_nan_from_str _________________________

self = <builtin_tests.py38.builtin_test_float.InfNanTest testMethod=test_nan_from_str>

    def test_nan_from_str(self):
>       self.assertTrue(isnan(float("nan")))
E       AssertionError: False is not true

tests/builtin_tests/py38/builtin_test_float.py:310: AssertionError
__________________________ InfNanTest.test_nan_signs ___________________________

self = <builtin_tests.py38.builtin_test_float.InfNanTest testMethod=test_nan_signs>

    @unittest.skipUnless(
        getattr(sys, "float_repr_style", "") == "short",
        "applies only when using short float repr style",
    )
    def test_nan_signs(self):
        # When using the dtoa.c code, the sign of float('nan') should
        # be predictable.
        self.assertEqual(copysign(1.0, float("nan")), 1.0)
>       self.assertEqual(copysign(1.0, float("-nan")), -1.0)
E       AssertionError: 1.0 != -1.0

tests/builtin_tests/py38/builtin_test_float.py:357: AssertionError
________________ TestFastReal.test_given_nan_string_returns_nan ________________

self = <test_fastnumbers.TestFastReal object at 0x652fc8244610>

    def test_given_nan_string_returns_nan(self):
>       assert math.isnan(fastnumbers.fast_real("nan"))
E       AssertionError: assert False
E        +  where False = <built-in function isnan>(0.0)
E        +    where <built-in function isnan> = math.isnan
E        +    and   0.0 = <built-in function fast_real>('nan')
E        +      where <built-in function fast_real> = fastnumbers.fast_real

tests/test_fastnumbers.py:245: AssertionError
________________ TestFastReal.test_given_padded_nan_returns_nan ________________

self = <test_fastnumbers.TestFastReal object at 0x652fcab765b0>

    def test_given_padded_nan_returns_nan(self):
>       assert math.isnan(fastnumbers.fast_real("     nan "))
E       AssertionError: assert False
E        +  where False = <built-in function isnan>(0.0)
E        +    where <built-in function isnan> = math.isnan
E        +    and   0.0 = <built-in function fast_real>('     nan ')
E        +      where <built-in function fast_real> = fastnumbers.fast_real

tests/test_fastnumbers.py:272: AssertionError
_______________ TestFastFloat.test_given_nan_string_returns_nan ________________

self = <test_fastnumbers.TestFastFloat object at 0x652fc81a9c10>

    def test_given_nan_string_returns_nan(self):
>       assert math.isnan(fastnumbers.fast_float("nan"))
E       AssertionError: assert False
E        +  where False = <built-in function isnan>(0.0)
E        +    where <built-in function isnan> = math.isnan
E        +    and   0.0 = <built-in function fast_float>('nan')
E        +      where <built-in function fast_float> = fastnumbers.fast_float

tests/test_fastnumbers.py:430: AssertionError
_______________ TestFastFloat.test_given_padded_nan_returns_nan ________________

self = <test_fastnumbers.TestFastFloat object at 0x652fc82293d0>

    def test_given_padded_nan_returns_nan(self):
>       assert math.isnan(fastnumbers.fast_float("     nan "))
E       AssertionError: assert False
E        +  where False = <built-in function isnan>(0.0)
E        +    where <built-in function isnan> = math.isnan
E        +    and   0.0 = <built-in function fast_float>('     nan ')
E        +      where <built-in function fast_float> = fastnumbers.fast_float

tests/test_fastnumbers.py:450: AssertionError
_ TestFastForceInt.test_given_nan_string_raises_valueerror_with_raise_on_invalid_as_true _

self = <test_fastnumbers.TestFastForceInt object at 0x652fc83ff460>

    def test_given_nan_string_raises_valueerror_with_raise_on_invalid_as_true(self):
        with raises(ValueError):
>           fastnumbers.fast_forceint("nan", raise_on_invalid=True)
E           Failed: DID NOT RAISE <class 'ValueError'>

tests/test_fastnumbers.py:765: Failed
________________________________ test_fast_real ________________________________

    def test_fast_real():
        # 1. float number
        assert fastnumbers.fast_real(-367.3268) == -367.3268
        assert fastnumbers.fast_real(-367.3268, raise_on_invalid=True) == -367.3268
        # 2. signed float string
        assert fastnumbers.fast_real("+367.3268") == +367.3268
        assert fastnumbers.fast_real("+367.3268", raise_on_invalid=True) == +367.3268
        # 3. float string with exponents
        assert fastnumbers.fast_real("-367.3268e207") == -367.3268e207
        assert fastnumbers.fast_real("1.175494351e-3810000000") == 0.0
        # 4. float string with padded whitespace
        assert fastnumbers.fast_real("   -367.04   ") == -367.04
        # 5. int number
        assert fastnumbers.fast_real(499) == 499
        # 6. signed int string
        assert fastnumbers.fast_real("-499") == -499
        # 7. int string with padded whitespace
        assert fastnumbers.fast_real("   +3001   ") == 3001
        # 8. long number
        assert fastnumbers.fast_real(35892482945872302493) == 35892482945872302493
        # 9. long string
        assert fastnumbers.fast_real("35892482945872302493") == 35892482945872302493
        # 10. return type
        assert isinstance(fastnumbers.fast_real(4029), int)
        assert isinstance(fastnumbers.fast_real(4029.0, coerce=False), float)
        assert isinstance(fastnumbers.fast_real(4029), int)
        assert isinstance(fastnumbers.fast_real(4029.0), int)
        assert isinstance(fastnumbers.fast_real(4029.5), float)
        assert isinstance(fastnumbers.fast_real("4029"), int)
        assert isinstance(fastnumbers.fast_real("4029.0"), int)
        assert isinstance(fastnumbers.fast_real("4029.0", coerce=False), float)
        # 11. TypeError for invalid input
        with raises(TypeError):
            fastnumbers.fast_real(["hey"])
        # 12. Invalid input string
        assert fastnumbers.fast_real("not_a_number") == "not_a_number"
        with raises(ValueError):
            assert fastnumbers.fast_real("not_a_number", raise_on_invalid=True)
        # 13. Invalid input string with numbers
        assert fastnumbers.fast_real("26.8 lb") == "26.8 lb"
        with raises(ValueError):
            assert fastnumbers.fast_real("26.8 lb", raise_on_invalid=True)
        # 14. Infinity
        assert fastnumbers.fast_real("inf") == float("inf")
        assert fastnumbers.fast_real("-iNFinity") == float("-inf")
        assert fastnumbers.fast_real("-iNFinity", inf=7608) == 7608
        # 15. NaN
>       assert math.isnan(fastnumbers.fast_real("nan"))
E       AssertionError: assert False
E        +  where False = <built-in function isnan>(0.0)
E        +    where <built-in function isnan> = math.isnan
E        +    and   0.0 = <built-in function fast_real>('nan')
E        +      where <built-in function fast_real> = fastnumbers.fast_real

tests/test_fastnumbers_examples.py:79: AssertionError
_______________________________ test_fast_float ________________________________

    def test_fast_float():
        # 1. float number
        assert fastnumbers.fast_float(-367.3268) == -367.3268
        assert fastnumbers.fast_float(-367.3268, raise_on_invalid=True) == -367.3268
        # 2. signed float string
        assert fastnumbers.fast_float("+367.3268") == +367.3268
        assert fastnumbers.fast_float("+367.3268", raise_on_invalid=True) == +367.3268
        # 3. float string with exponents
        assert fastnumbers.fast_float("-367.3268e27") == -367.3268e27
        assert fastnumbers.fast_float("-367.3268E27") == -367.3268e27
        assert fastnumbers.fast_float("-367.3268e207") == -367.3268e207
        assert fastnumbers.fast_float("1.175494351E-3810000000") == 0.0
        # 4. float string with padded whitespace
        assert fastnumbers.fast_float("   -367.04   ") == -367.04
        # 5. int number
        assert fastnumbers.fast_float(499) == 499.0
        # 6. signed int string
        assert fastnumbers.fast_float("-499") == -499.0
        # 7. int string with padded whitespace
        assert fastnumbers.fast_float("   +3001   ") == 3001
        # 8. long number
        assert fastnumbers.fast_float(35892482945872302493) == 35892482945872302493.0
        # 9. long string
        assert fastnumbers.fast_float("35892482945872302493") == 35892482945872302493.0
        # 10. return type
        assert isinstance(fastnumbers.fast_float(4029), float)
        assert isinstance(fastnumbers.fast_float("4029"), float)
        # 11. TypeError for invalid input
        with raises(TypeError):
            fastnumbers.fast_float(["hey"])
        # 12. Invalid input string
        assert fastnumbers.fast_float("not_a_number") == "not_a_number"
        with raises(ValueError):
            assert fastnumbers.fast_float("not_a_number", raise_on_invalid=True)
        # 13. Invalid input string with numbers
        assert fastnumbers.fast_float("26.8 lb") == "26.8 lb"
        with raises(ValueError):
            assert fastnumbers.fast_float("26.8 lb", raise_on_invalid=True)
        # 14. Infinity
        assert fastnumbers.fast_float("inf") == float("inf")
        assert fastnumbers.fast_float("-iNFinity") == float("-inf")
        assert fastnumbers.fast_float("-iNFinity", inf=523) == 523
        # 15. NaN
>       assert math.isnan(fastnumbers.fast_float("nAn"))
E       AssertionError: assert False
E        +  where False = <built-in function isnan>(0.0)
E        +    where <built-in function isnan> = math.isnan
E        +    and   0.0 = <built-in function fast_float>('nAn')
E        +      where <built-in function fast_float> = fastnumbers.fast_float

tests/test_fastnumbers_examples.py:147: AssertionError
______________________________ test_fast_forceint ______________________________

    def test_fast_forceint():
        # 1. float number
        assert fastnumbers.fast_forceint(-367.3268) == -367
        assert fastnumbers.fast_forceint(-367.3268, raise_on_invalid=True) == -367
        # 2. signed float string
        assert fastnumbers.fast_forceint("+367.3268") == 367
        assert fastnumbers.fast_forceint("+367.3268", raise_on_invalid=True) == 367
        # 3. float string with exponents
        assert fastnumbers.fast_forceint("-367.3268e207") == int(-367.3268e207)
        # 4. float string with padded whitespace
        assert fastnumbers.fast_forceint("   -367.04   ") == -367
        # 5. int number
        assert fastnumbers.fast_forceint(499) == 499
        # 6. signed int string
        assert fastnumbers.fast_forceint("-499") == -499
        # 7. int string with padded whitespace
        assert fastnumbers.fast_forceint("   +3001   ") == 3001
        # 8. long number
        assert fastnumbers.fast_forceint(35892482945872302493) == 35892482945872302493
        # 9. long string
        assert fastnumbers.fast_forceint("35892482945872302493") == 35892482945872302493
        # 10. return type
        assert isinstance(fastnumbers.fast_forceint(4029.00), int)
        assert isinstance(fastnumbers.fast_forceint("4029.00"), int)
        # 11. TypeError for invalid input
        with raises(TypeError):
            fastnumbers.fast_forceint(["hey"])
        # 12. Invalid input string
        assert fastnumbers.fast_forceint("not_a_number") == "not_a_number"
        with raises(ValueError):
            assert fastnumbers.fast_forceint("not_a_number", raise_on_invalid=True)
        # 13. Invalid input string with numbers
        assert fastnumbers.fast_forceint("26.8 lb") == "26.8 lb"
        with raises(ValueError):
            assert fastnumbers.fast_forceint("26.8 lb", raise_on_invalid=True)
        # 14. Infinity
        assert fastnumbers.fast_forceint("inf") == "inf"
        assert fastnumbers.fast_forceint("-iNFinity") == "-iNFinity"
        # 15. NaN
>       assert fastnumbers.fast_forceint("nan") == "nan"
E       AssertionError: assert 0 == 'nan'
E         +0
E         -'nan'

tests/test_fastnumbers_examples.py:273: AssertionError
=========================== short test summary info ============================
FAILED tests/test_builtins.py::InfNanTest::test_nan_from_str - AssertionError...
FAILED tests/test_builtins.py::InfNanTest::test_nan_signs - AssertionError: 1...
FAILED tests/test_fastnumbers.py::TestFastReal::test_given_nan_string_returns_nan
FAILED tests/test_fastnumbers.py::TestFastReal::test_given_padded_nan_returns_nan
FAILED tests/test_fastnumbers.py::TestFastFloat::test_given_nan_string_returns_nan
FAILED tests/test_fastnumbers.py::TestFastFloat::test_given_padded_nan_returns_nan
FAILED tests/test_fastnumbers.py::TestFastForceInt::test_given_nan_string_raises_valueerror_with_raise_on_invalid_as_true
FAILED tests/test_fastnumbers_examples.py::test_fast_real - AssertionError: a...
FAILED tests/test_fastnumbers_examples.py::test_fast_float - AssertionError: ...
FAILED tests/test_fastnumbers_examples.py::test_fast_forceint - AssertionErro...
================== 10 failed, 222 passed, 1 skipped in 13.77s ==================

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.