Skip to content

TST: Fix pandas.io.stata imports in test_stata.py #40094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

AA-Turner
Copy link
Contributor

@AA-Turner AA-Turner commented Feb 26, 2021

@lithomas1 lithomas1 added this to the 1.3 milestone Feb 26, 2021
@lithomas1 lithomas1 added the Code Style Code style, linting, code_checks label Feb 26, 2021
@jreback
Copy link
Contributor

jreback commented Feb 26, 2021

great ping on green.

@AA-Turner
Copy link
Contributor Author

AA-Turner commented Feb 26, 2021

@jreback 1 failure in database tests but pretty sure that's not related to these changes - error is in http.server (OSError: [Errno 98] Address already in use). Other than that all green

Database CI Log:
 =================================== FAILURES ===================================
_ test_server_and_default_headers[GzippedJSONUserAgentResponder-read_json-34266-None] _
[gw0] linux -- Python 3.7.10 /usr/share/miniconda/envs/pandas-dev/bin/python

responder = <class 'pandas.tests.io.test_user_agent.GzippedJSONUserAgentResponder'>
read_method = <function read_json at 0x7f2e13fb2dd0>, port = 34266
parquet_engine = None

    @pytest.mark.parametrize(
        "responder, read_method, port, parquet_engine",
        [
            (CSVUserAgentResponder, pd.read_csv, 34259, None),
            pytest.param(
                JSONUserAgentResponder,
                pd.read_json,
                34260,
                None,
                marks=td.skip_array_manager_not_yet_implemented,
            ),
            (ParquetPyArrowUserAgentResponder, pd.read_parquet, 34261, "pyarrow"),
            (ParquetFastParquetUserAgentResponder, pd.read_parquet, 34262, "fastparquet"),
            (PickleUserAgentResponder, pd.read_pickle, 34263, None),
            (StataUserAgentResponder, pd.read_stata, 34264, None),
            (GzippedCSVUserAgentResponder, pd.read_csv, 34265, None),
            pytest.param(
                GzippedJSONUserAgentResponder,
                pd.read_json,
                34266,
                None,
                marks=td.skip_array_manager_not_yet_implemented,
            ),
        ],
    )
    def test_server_and_default_headers(responder, read_method, port, parquet_engine):
        if parquet_engine is not None:
            pytest.importorskip(parquet_engine)
            if parquet_engine == "fastparquet":
                pytest.importorskip("fsspec")
    
>       with http.server.HTTPServer(("localhost", port), responder) as server:

pandas/tests/io/test_user_agent.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/share/miniconda/envs/pandas-dev/lib/python3.7/socketserver.py:452: in __init__
    self.server_bind()
/usr/share/miniconda/envs/pandas-dev/lib/python3.7/http/server.py:137: in server_bind
    socketserver.TCPServer.server_bind(self)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.server.HTTPServer object at 0x7f2d78060f50>

    def server_bind(self):
        """Called by constructor to bind the socket.
    
        May be overridden.
    
        """
        if self.allow_reuse_address:
            self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
>       self.socket.bind(self.server_address)
E       OSError: [Errno 98] Address already in use

/usr/share/miniconda/envs/pandas-dev/lib/python3.7/socketserver.py:466: OSError

@jbrockmendel
Copy link
Member

LGTM

@jreback jreback merged commit 01c4c51 into pandas-dev:master Feb 26, 2021
@jreback
Copy link
Contributor

jreback commented Feb 26, 2021

thanks @AA-Turner

@AA-Turner
Copy link
Contributor Author

Thanks Jeff!

@AA-Turner AA-Turner deleted the namespaces-io-fix branch February 27, 2021 00:04
@MarcoGorelli
Copy link
Member

Thanks @rhshadrach and @AA-Turner for picking up on this and fixing it quickly, and I'm sorry for not having picked up on it myself - looks like we need to wait for these to be completely green, will do that next time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants