Repository: modin-project/modin

Issue:
after update fsspec to 0.8.5 AttributeError are appeared in CI
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:
- **Modin version** (`modin.__version__`): da83b62142944985acb571829a2dad9afbc49ecd
- **Python version**:
- **Code we can use to reproduce**:

<!--
You can obtain the Modin version with

python -c "import modin; print(modin.__version__)"
-->

### Describe the problem
<!-- Describe the problem clearly here. -->

We should implement `__iter__` method of `PatchedEnv` class for properly usage instances of it class in case:
```python
for x in PatchedEnv()
```
 
### 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. -->

```python
=================================== FAILURES ===================================
___________________________ TestCSV.test_usecols_csv ___________________________

self = <modin.experimental.engines.omnisci_on_ray.test.test_dataframe.TestCSV object at 0x7fd66412d250>

    def test_usecols_csv(self):
        """ check with the following arguments: names, dtype, skiprows, delimiter """
        csv_file = os.path.join(self.root, "modin/pandas/test/data", "test_usecols.csv")
    
        for kwargs in (
            {"delimiter": ","},
            {"sep": None},
            {"skiprows": 1, "names": ["A", "B", "C", "D", "E"]},
            {"dtype": {"a": "int32", "e": "string"}},
            {"dtype": {"a": np.dtype("int32"), "b": np.dtype("int64"), "e": "string"}},
        ):
>           rp = pandas.read_csv(csv_file, **kwargs)

modin/experimental/engines/omnisci_on_ray/test/test_dataframe.py:168: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/pandas/io/parsers.py:688: in read_csv
    return _read(filepath_or_buffer, kwds)
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/pandas/io/parsers.py:454: in _read
    parser = TextFileReader(fp_or_buf, **kwds)
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/pandas/io/parsers.py:948: in __init__
    self._make_engine(self.engine)
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/pandas/io/parsers.py:1191: in _make_engine
    self._engine = klass(self.f, **self.options)
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/pandas/io/parsers.py:2389: in __init__
    memory_map=self.memory_map,
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/pandas/io/common.py:418: in get_handle
    from s3fs import S3File
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/s3fs/__init__.py:1: in <module>
    from .core import S3FileSystem, S3File
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/s3fs/core.py:10: in <module>
    from fsspec.spec import AbstractBufferedFile
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/fsspec/__init__.py:3: in <module>
    from .spec import AbstractFileSystem
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/fsspec/spec.py:13: in <module>
    from .config import apply_config
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/fsspec/config.py:97: in <module>
    set_conf_env(conf)
/usr/share/miniconda/envs/modin_on_omnisci/lib/python3.7/site-packages/fsspec/config.py:25: in set_conf_env
    for key in envdict:
modin/conftest.py:131: in __getitem__
    self.__check_var(name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 0

    @staticmethod
    def __check_var(name):
>       if name.upper().startswith("MODIN_"):
E       AttributeError: 'int' object has no attribute 'upper'

modin/conftest.py:115: AttributeError
```


Discussion:

Resolving patch:
diff --git a/modin/config/envvars.py b/modin/config/envvars.py
--- a/modin/config/envvars.py
+++ b/modin/config/envvars.py
@@ -233,7 +233,7 @@ def _check_vars():
         and issubclass(obj, EnvironmentVariable)
         and not obj.is_abstract
     }
-    found_names = {name for name in os.environ.keys() if name.startswith("MODIN_")}
+    found_names = {name for name in os.environ if name.startswith("MODIN_")}
     unknown = found_names - valid_names
     if unknown:
         warnings.warn(
diff --git a/modin/conftest.py b/modin/conftest.py
--- a/modin/conftest.py
+++ b/modin/conftest.py
@@ -154,6 +154,9 @@ def __contains__(self, name):
         def __getattr__(self, name):
             return getattr(orig_env, name)
 
+        def __iter__(self):
+            return iter(orig_env)
+
     os.environ = PatchedEnv()
     yield
     os.environ = orig_env


Test patch: