Title: GitHub · Where software is built
Open Graph Title: python-xlib/python-xlib
X Title: python-xlib/python-xlib
Description: XLib in pure Python (Py2/Py3 compatible). Contribute to python-xlib/python-xlib development by creating an account on GitHub.
Open Graph Description: XLib in pure Python (Py2/Py3 compatible). Contribute to python-xlib/python-xlib development by creating an account on GitHub.
X Description: XLib in pure Python (Py2/Py3 compatible). Contribute to python-xlib/python-xlib development by creating an account on GitHub.
Opengraph URL: https://github.com/python-xlib/python-xlib
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue with socket in Cygwin","articleBody":"Until Python 3.6.9 Xlib is working in Cygwin. However, now having upgraded to Python 3.6.13 I noticed that Xlib is now unable to connect to X11. The same error appears for Python 3.8 and 3.9. After overwriting _socket.cpython-36m-x86_64-cygwin.dll with the one from 3.6.9 Xlib is working again, so my guess is that this is due to some change in the socket module.\r\n\r\nI debugged the issue a bit and found this to be working in Python 3.6.9\r\n```\r\nPython 3.6.9 (default, Jul 21 2019, 14:33:59)\r\n[GCC 7.4.0] on cygwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n\u003e\u003e\u003e display = \":7\"\r\n\u003e\u003e\u003e data = b'l\\x00\\x0b\\x00\\x00\\x00\\x12\\x00\\x10\\x00\\x00\\x00MIT-MAGIC-COOKIE-1\\x00\\x00\\xc5\\xc1C\\xc1Y}\\xe6\\x1e\\x88P\\xab\\x98\\xd0\\x91\u003c%'\r\n\u003e\u003e\u003e import select\r\n\u003e\u003e\u003e from Xlib.support import lock, connect\r\n\u003e\u003e\u003e name, protocol, host, displayno, screenno = connect.get_display(display)\r\n\u003e\u003e\u003e socket = connect.get_socket(name, protocol, host, displayno)\r\n\u003e\u003e\u003e i = socket.send(data)\r\n\u003e\u003e\u003e select.select([socket], [], [], None)\r\n([\u003csocket.socket fd=3, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/tmp/.X11-unix/X7\u003e], [], [])\r\n\u003e\u003e\u003e socket.recv(512)\r\nb'\\x01\\x00\\x0b\\x00\\x00\\x00:\\x07\\xd0\\xab\\xb5\\x00\\x00\\x00`\\x00\\xff\\xff\\x1f\\x00\\x00\\x01\\x00\\x00\\x18\\x00\\xff\\xff\\x01\\x06\\x00\\x00 \\x08\\xff\\x00\\x00\\x00\\x00The Cygwin Ports project\r\n```\r\nwhile in Python 3.6.13 the same commands yield a Connection reset\r\n```\r\nPython 3.6.13 (default, Feb 16 2021, 07:46:47)\r\n[GCC 10.2.0] on cygwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n...\r\n\u003e\u003e\u003e socket.recv(512)\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\nConnectionResetError: [Errno 104] Connection reset by peer\r\n```\r\n\r\nAny help would be much appreciated!","author":{"url":"https://github.com/robertschulze","@type":"Person","name":"robertschulze"},"datePublished":"2023-07-27T09:04:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/267/python-xlib/issues/267"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:23ec365e-eaa0-b3dc-e036-e58fe9735460 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B826:22A73C:6ADF60:918E6A:696FE5CA |
| html-safe-nonce | 1bdf790f8be1d1c61d2c7967dd8fe5d2d7e84d847cac4fe8eb295f40fd355bf6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODI2OjIyQTczQzo2QURGNjA6OTE4RTZBOjY5NkZFNUNBIiwidmlzaXRvcl9pZCI6IjY5MjkwMTI4NDg1NDE1NTgyMTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | edb01e43b9f7a681674013328e921d023db9d4185e91a581c7bdf0306225056c |
| hovercard-subject-tag | repository:47391866 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-xlib/python-xlib/issues/267 |
| twitter:image | https://opengraph.githubassets.com/b49e5a01f876120b2e68564d1e86a2fbc2b2f25f9dacc2a6e972618ebe5536ca/python-xlib/python-xlib |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b49e5a01f876120b2e68564d1e86a2fbc2b2f25f9dacc2a6e972618ebe5536ca/python-xlib/python-xlib |
| og:image:alt | XLib in pure Python (Py2/Py3 compatible). Contribute to python-xlib/python-xlib development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | bb7c872aa74896d911608183f4997f8b9c121a1624064705ec4570cd91bd7839 |
| turbo-cache-control | no-cache |
| go-import | github.com/python-xlib/python-xlib git https://github.com/python-xlib/python-xlib.git |
| octolytics-dimension-user_id | 16151530 |
| octolytics-dimension-user_login | python-xlib |
| octolytics-dimension-repository_id | 47391866 |
| octolytics-dimension-repository_nwo | python-xlib/python-xlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 47391866 |
| octolytics-dimension-repository_network_root_nwo | python-xlib/python-xlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 257e1b418957178bd3ac9f7520608a40ebbb0f1e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width