{"action":"opened","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4475","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4475/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4475/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4475/events","html_url":"https://github.com/astropy/astropy/issues/4475","id":126115346,"number":4475,"title":"pytest pastebin: py3 incompatible before v2.8.3","user":{"login":"keflavich","id":143715,"avatar_url":"https://avatars.githubusercontent.com/u/143715?v=3","gravatar_id":"","url":"https://api.github.com/users/keflavich","html_url":"https://github.com/keflavich","followers_url":"https://api.github.com/users/keflavich/followers","following_url":"https://api.github.com/users/keflavich/following{/other_user}","gists_url":"https://api.github.com/users/keflavich/gists{/gist_id}","starred_url":"https://api.github.com/users/keflavich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keflavich/subscriptions","organizations_url":"https://api.github.com/users/keflavich/orgs","repos_url":"https://api.github.com/users/keflavich/repos","events_url":"https://api.github.com/users/keflavich/events{/privacy}","received_events_url":"https://api.github.com/users/keflavich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-12T07:20:29Z","updated_at":"2016-01-12T07:20:29Z","closed_at":null,"body":"I've tried using the `--pastebin='failed'` functionality running tests in astroquery, and I get the following traceback/dump:\r\n```\r\n======================================================================================== Sending information to Paste Service ========================================================================================\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"/private/var/folders/_r/c4nkvmpn4vx6qc91qygz8h740000gr/T/astroquery-test-g65uipac/lib.macosx-10.5-x86_64-3.5/astroquery/_astropy_init.py\", line 114, in test\r\n    coverage=coverage, open_files=open_files, **kwargs)\r\n  File \"/Users/adam/anaconda/envs/astropy35/lib/python3.5/site-packages/astropy-1.1.1-py3.5-macosx-10.5-x86_64.egg/astropy/tests/runner.py\", line 253, in run_tests\r\n    return pytest.main(args=all_args, plugins=plugins)\r\n  File \"_pytest.config\", line 41, in main\r\n  File \"_pytest.core\", line 521, in __call__\r\n  File \"_pytest.core\", line 528, in _docall\r\n  File \"_pytest.core\", line 394, in execute\r\n  File \"_pytest.main\", line 116, in pytest_cmdline_main\r\n  File \"_pytest.main\", line 109, in wrap_session\r\n  File \"_pytest.core\", line 521, in __call__\r\n  File \"_pytest.core\", line 528, in _docall\r\n  File \"_pytest.core\", line 393, in execute\r\n  File \"_pytest.core\", line 109, in wrapped_call\r\n  File \"_pytest.terminal\", line 360, in pytest_sessionfinish\r\n  File \"_pytest.core\", line 521, in __call__\r\n  File \"_pytest.core\", line 528, in _docall\r\n  File \"_pytest.core\", line 394, in execute\r\n  File \"_pytest.pastebin\", line 87, in pytest_terminal_summary\r\n  File \"_pytest.pastebin\", line 64, in create_new_paste\r\n  File \"/Users/adam/anaconda/envs/astropy35/lib/python3.5/urllib/request.py\", line 162, in urlopen\r\n    return opener.open(url, data, timeout)\r\n  File \"/Users/adam/anaconda/envs/astropy35/lib/python3.5/urllib/request.py\", line 463, in open\r\n    req = meth(req)\r\n  File \"/Users/adam/anaconda/envs/astropy35/lib/python3.5/urllib/request.py\", line 1170, in do_request_\r\n    raise TypeError(msg)\r\nTypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str.\r\nsys:1: ResourceWarning: unclosed <socket.socket fd=18, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('134.171.35.27', 55017), raddr=('131.142.185.10', 80)>\r\nsys:1: ResourceWarning: unclosed <socket.socket fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('134.171.35.27', 54991)>\r\nsys:1: ResourceWarning: unclosed <socket.socket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('134.171.35.27', 54992)>\r\nsys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=15, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('134.171.35.27', 54988), raddr=('104.244.42.1', 443)>\r\nsys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='w' encoding='UTF-8'>\r\n```\r\n\r\nIt turns out this is a bug that was fixed only a few months ago: https://github.com/pytest-dev/pytest/issues/1198.  The first release that includes this fix is 2.8.3.  So we could include a warning in astropy about this, or this issue can just serve as a 'heads up' in case anyone tries using the pastebin feature and lands here.  conda still has 2.8.1 as its latest."}}