Repository: modin-project/modin

Issue:
modin/pandas/test/test_io.py::TestCsv::test_read_csv_compression tests fail with numpy>1.20.3
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:

Ubuntu 20.04.1 LTS

- **Modin version** (`modin.__version__`):

0.10.0+6.gf9c99c38

- **Python version**:

Python 3.8.6

- **Code we can use to reproduce**:

Update numpy to the latest version (currently 1.21.0) and run modin/pandas/test/test_io.py::TestCsv::test_read_csv_compression tests. When they are ran together, tests with python engine fail with exception.

```
Traceback (most recent call last):
  File "/localdisk/gashiman/modin/modin/pandas/test/utils.py", line 668, in execute_callable
    pd_result = fn(pandas_df, **pd_kwargs)
  File "/localdisk/gashiman/modin/modin/pandas/test/utils.py", line 756, in applyier
    result = getattr(module, fn_name)(*args, **kwargs)
  File "/localdisk/gashiman/miniconda3/envs/modin/lib/python3.8/site-packages/pandas/io/parsers.py", line 610, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/localdisk/gashiman/miniconda3/envs/modin/lib/python3.8/site-packages/pandas/io/parsers.py", line 468, in _read
    return parser.read(nrows)
  File "/localdisk/gashiman/miniconda3/envs/modin/lib/python3.8/site-packages/pandas/io/parsers.py", line 1057, in read
    index, columns, col_dict = self._engine.read(nrows)
  File "/localdisk/gashiman/miniconda3/envs/modin/lib/python3.8/site-packages/pandas/io/parsers.py", line 2502, in read
    data = self._convert_data(data)
  File "/localdisk/gashiman/miniconda3/envs/modin/lib/python3.8/site-packages/pandas/io/parsers.py", line 2582, in _convert_data
    return self._convert_to_ndarrays(
  File "/localdisk/gashiman/miniconda3/envs/modin/lib/python3.8/site-packages/pandas/io/parsers.py", line 1704, in _convert_to_ndarrays
    cvals, na_count = self._infer_types(
  File "/localdisk/gashiman/miniconda3/envs/modin/lib/python3.8/site-packages/pandas/io/parsers.py", line 1765, in _infer_types
    na_count = isna(result).sum()
  File "/localdisk/gashiman/miniconda3/envs/modin/lib/python3.8/site-packages/numpy/core/_methods.py", line 48, in _sum
    return umr_sum(a, axis, dtype, out, keepdims, initial, where)
TypeError: int() argument must be a string, a bytes-like object or a number, not '_NoValueType'
```

<!--
You can obtain the Modin version with

python -c "import modin; print(modin.__version__)"
-->

### Describe the problem
<!-- Describe the problem clearly here. -->

### Source code / logs
<!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. -->



Discussion:
Reopened because we want to find out why new version of numpy doesn't work.

Resolving patch:
diff --git a/modin/experimental/pandas/numpy_wrap.py b/modin/experimental/pandas/numpy_wrap.py
--- a/modin/experimental/pandas/numpy_wrap.py
+++ b/modin/experimental/pandas/numpy_wrap.py
@@ -34,7 +34,7 @@
     import pandas
     import os
 
-    _EXCLUDE_MODULES = [modin, pandas]
+    _EXCLUDE_MODULES = [modin, pandas, real_numpy]
     try:
         import rpyc
     except ImportError:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -60,8 +60,7 @@ def is_pure(self):
     url="https://github.com/modin-project/modin",
     long_description=long_description,
     long_description_content_type="text/markdown",
-    # Restrition for numpy upper version is because of #3182
-    install_requires=["pandas==1.2.5", "packaging", "numpy>=1.16.5,<=1.20.3"],
+    install_requires=["pandas==1.2.5", "packaging", "numpy>=1.16.5"],
     extras_require={
         # can be installed by pip install modin[dask]
         "dask": dask_deps,


Test patch:
diff --git a/modin/pandas/test/test_io.py b/modin/pandas/test/test_io.py
--- a/modin/pandas/test/test_io.py
+++ b/modin/pandas/test/test_io.py
@@ -726,8 +726,8 @@ def test_read_csv_quoting(
 
     # Error Handling parameters tests
     @pytest.mark.xfail(
-        Engine.get() != "Python" and Backend.get() != "Omnisci",
-        reason="read_csv with Ray engine doen't raise `bad lines` exceptions - issue #2500",
+        Engine.get() not in ["Python", "Cloudpython"] and Backend.get() != "Omnisci",
+        reason="read_csv doesn't raise `bad lines` exceptions - issue #2500",
     )
     @pytest.mark.parametrize("warn_bad_lines", [True, False])
     @pytest.mark.parametrize("error_bad_lines", [True, False])