python-socks 2.5.2__tar.gz → 2.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. {python_socks-2.5.2/python_socks.egg-info → python_socks-2.6.0}/PKG-INFO +32 -13
  2. {python_socks-2.5.2 → python_socks-2.6.0}/README.md +4 -4
  3. python_socks-2.6.0/pyproject.toml +69 -0
  4. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_abc.py +3 -26
  5. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/factory_async.py +4 -3
  6. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/factory_sync.py +4 -3
  7. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/http_async.py +3 -2
  8. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/http_sync.py +3 -2
  9. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/socks4_async.py +3 -2
  10. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/socks4_sync.py +3 -2
  11. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/socks5_async.py +6 -4
  12. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/socks5_sync.py +6 -4
  13. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_helpers.py +17 -10
  14. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_protocols/http.py +3 -2
  15. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_protocols/socks4.py +2 -1
  16. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_protocols/socks5.py +7 -7
  17. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_version.py +1 -1
  18. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/_proxy_chain.py +1 -2
  19. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/_proxy.py +11 -9
  20. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/v2/_proxy.py +13 -10
  21. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/_proxy.py +24 -17
  22. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/v2/_proxy.py +20 -16
  23. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/curio/_proxy.py +10 -8
  24. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/_proxy.py +13 -9
  25. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/v2/_proxy.py +10 -9
  26. python_socks-2.6.0/python_socks/py.typed +0 -0
  27. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/_proxy.py +13 -9
  28. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/v2/_proxy.py +10 -10
  29. {python_socks-2.5.2 → python_socks-2.6.0/python_socks.egg-info}/PKG-INFO +32 -13
  30. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks.egg-info/SOURCES.txt +20 -1
  31. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks.egg-info/requires.txt +2 -2
  32. python_socks-2.6.0/tests/__pycache__/__init__.cpython-313.pyc +0 -0
  33. python_socks-2.6.0/tests/__pycache__/config.cpython-313.pyc +0 -0
  34. python_socks-2.6.0/tests/__pycache__/conftest.cpython-313-pytest-8.0.2.pyc +0 -0
  35. python_socks-2.6.0/tests/__pycache__/http_app.cpython-313.pyc +0 -0
  36. python_socks-2.6.0/tests/__pycache__/http_server.cpython-313.pyc +0 -0
  37. python_socks-2.6.0/tests/__pycache__/mocks.cpython-313.pyc +0 -0
  38. python_socks-2.6.0/tests/__pycache__/proxy_server.cpython-313.pyc +0 -0
  39. python_socks-2.6.0/tests/__pycache__/test_misc.cpython-313-pytest-8.0.2.pyc +0 -0
  40. python_socks-2.6.0/tests/__pycache__/test_proxy_async_aio.cpython-313-pytest-8.0.2.pyc +0 -0
  41. python_socks-2.6.0/tests/__pycache__/test_proxy_async_aio.cpython-38-pytest-8.0.2.pyc +0 -0
  42. python_socks-2.6.0/tests/__pycache__/test_proxy_async_aio_v2.cpython-313-pytest-8.0.2.pyc +0 -0
  43. python_socks-2.6.0/tests/__pycache__/test_proxy_async_anyio.cpython-313-pytest-8.0.2.pyc +0 -0
  44. python_socks-2.6.0/tests/__pycache__/test_proxy_async_anyio_v2.cpython-313-pytest-8.0.2.pyc +0 -0
  45. python_socks-2.6.0/tests/__pycache__/test_proxy_async_curio.cpython-313-pytest-8.0.2.pyc +0 -0
  46. python_socks-2.6.0/tests/__pycache__/test_proxy_async_trio.cpython-313-pytest-8.0.2.pyc +0 -0
  47. python_socks-2.6.0/tests/__pycache__/test_proxy_async_trio.cpython-38-pytest-8.0.2.pyc +0 -0
  48. python_socks-2.6.0/tests/__pycache__/test_proxy_async_trio_v2.cpython-313-pytest-8.0.2.pyc +0 -0
  49. python_socks-2.6.0/tests/__pycache__/test_proxy_sync.cpython-313-pytest-8.0.2.pyc +0 -0
  50. python_socks-2.6.0/tests/__pycache__/test_proxy_sync_v2.cpython-313-pytest-8.0.2.pyc +0 -0
  51. python_socks-2.6.0/tests/__pycache__/test_resolvers.cpython-313-pytest-8.0.2.pyc +0 -0
  52. python_socks-2.6.0/tests/__pycache__/utils.cpython-313.pyc +0 -0
  53. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_async_aio.py +1 -2
  54. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_async_trio.py +1 -2
  55. python_socks-2.5.2/pyproject.toml +0 -9
  56. python_socks-2.5.2/setup.py +0 -58
  57. python_socks-2.5.2/tests/__pycache__/test_proxy_async_aio.cpython-38-pytest-8.0.2.pyc +0 -0
  58. python_socks-2.5.2/tests/__pycache__/test_proxy_async_trio.cpython-38-pytest-8.0.2.pyc +0 -0
  59. {python_socks-2.5.2 → python_socks-2.6.0}/LICENSE.txt +0 -0
  60. {python_socks-2.5.2 → python_socks-2.6.0}/MANIFEST.in +0 -0
  61. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/__init__.py +0 -0
  62. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/__init__.py +0 -0
  63. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_connectors/abc.py +0 -0
  64. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_errors.py +0 -0
  65. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_protocols/__init__.py +0 -0
  66. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_protocols/errors.py +0 -0
  67. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/_types.py +0 -0
  68. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/__init__.py +0 -0
  69. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/__init__.py +0 -0
  70. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/_chain.py +0 -0
  71. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/_connect.py +0 -0
  72. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/_resolver.py +0 -0
  73. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/_stream.py +0 -0
  74. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/v2/__init__.py +0 -0
  75. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/v2/_chain.py +0 -0
  76. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/v2/_connect.py +0 -0
  77. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/anyio/v2/_stream.py +0 -0
  78. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/__init__.py +0 -0
  79. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/_connect.py +0 -0
  80. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/_resolver.py +0 -0
  81. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/_stream.py +0 -0
  82. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/v2/__init__.py +0 -0
  83. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/v2/_chain.py +0 -0
  84. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/v2/_connect.py +0 -0
  85. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/asyncio/v2/_stream.py +0 -0
  86. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/curio/__init__.py +0 -0
  87. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/curio/_connect.py +0 -0
  88. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/curio/_resolver.py +0 -0
  89. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/curio/_stream.py +0 -0
  90. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/__init__.py +0 -0
  91. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/_connect.py +0 -0
  92. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/_resolver.py +0 -0
  93. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/_stream.py +0 -0
  94. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/v2/__init__.py +0 -0
  95. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/v2/_chain.py +0 -0
  96. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/v2/_connect.py +0 -0
  97. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/async_/trio/v2/_stream.py +0 -0
  98. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/__init__.py +0 -0
  99. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/_chain.py +0 -0
  100. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/_connect.py +0 -0
  101. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/_resolver.py +0 -0
  102. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/_stream.py +0 -0
  103. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/v2/__init__.py +0 -0
  104. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/v2/_chain.py +0 -0
  105. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/v2/_connect.py +0 -0
  106. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/v2/_ssl_transport.py +0 -0
  107. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks/sync/v2/_stream.py +0 -0
  108. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks.egg-info/dependency_links.txt +0 -0
  109. {python_socks-2.5.2 → python_socks-2.6.0}/python_socks.egg-info/top_level.txt +0 -0
  110. {python_socks-2.5.2 → python_socks-2.6.0}/setup.cfg +0 -0
  111. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__init__.py +0 -0
  112. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/__init__.cpython-310.pyc +0 -0
  113. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/__init__.cpython-311.pyc +0 -0
  114. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  115. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/__init__.cpython-36.pyc +0 -0
  116. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/__init__.cpython-37.pyc +0 -0
  117. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/__init__.cpython-38.pyc +0 -0
  118. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/__init__.cpython-39.pyc +0 -0
  119. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/config.cpython-310.pyc +0 -0
  120. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/config.cpython-311.pyc +0 -0
  121. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/config.cpython-312.pyc +0 -0
  122. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/config.cpython-36.pyc +0 -0
  123. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/config.cpython-37.pyc +0 -0
  124. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/config.cpython-38.pyc +0 -0
  125. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/config.cpython-39.pyc +0 -0
  126. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-310-pytest-7.0.1.pyc +0 -0
  127. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-311-pytest-7.0.1.pyc +0 -0
  128. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-312-pytest-8.0.2.pyc +0 -0
  129. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-36-pytest-6.2.5.pyc +0 -0
  130. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-36-pytest-7.0.1.pyc +0 -0
  131. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-37-pytest-7.0.1.pyc +0 -0
  132. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-38-pytest-8.0.2.pyc +0 -0
  133. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-39-pytest-6.2.2.pyc +0 -0
  134. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-39-pytest-6.2.5.pyc +0 -0
  135. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/conftest.cpython-39-pytest-7.0.1.pyc +0 -0
  136. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_app.cpython-310.pyc +0 -0
  137. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_app.cpython-311.pyc +0 -0
  138. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_app.cpython-312.pyc +0 -0
  139. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_app.cpython-36.pyc +0 -0
  140. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_app.cpython-37.pyc +0 -0
  141. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_app.cpython-38.pyc +0 -0
  142. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_app.cpython-39.pyc +0 -0
  143. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_server.cpython-310.pyc +0 -0
  144. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_server.cpython-311.pyc +0 -0
  145. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_server.cpython-312.pyc +0 -0
  146. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_server.cpython-36.pyc +0 -0
  147. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_server.cpython-37.pyc +0 -0
  148. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_server.cpython-38.pyc +0 -0
  149. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/http_server.cpython-39.pyc +0 -0
  150. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/mocks.cpython-310.pyc +0 -0
  151. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/mocks.cpython-311.pyc +0 -0
  152. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/mocks.cpython-312.pyc +0 -0
  153. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/mocks.cpython-36.pyc +0 -0
  154. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/mocks.cpython-37.pyc +0 -0
  155. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/mocks.cpython-38.pyc +0 -0
  156. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/mocks.cpython-39.pyc +0 -0
  157. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/proxy_server.cpython-310.pyc +0 -0
  158. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/proxy_server.cpython-311.pyc +0 -0
  159. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/proxy_server.cpython-312.pyc +0 -0
  160. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/proxy_server.cpython-37.pyc +0 -0
  161. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/proxy_server.cpython-38.pyc +0 -0
  162. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/proxy_server.cpython-39.pyc +0 -0
  163. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_aio.cpython-36-pytest-6.2.5.pyc +0 -0
  164. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_aio.cpython-39-pytest-6.2.2.pyc +0 -0
  165. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_aio.cpython-39-pytest-6.2.5.pyc +0 -0
  166. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_aio_ext.cpython-36-pytest-6.2.5.pyc +0 -0
  167. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_aio_ext.cpython-39-pytest-6.2.2.pyc +0 -0
  168. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_aio_ext.cpython-39-pytest-6.2.5.pyc +0 -0
  169. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_curio.cpython-36-pytest-6.2.5.pyc +0 -0
  170. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_curio.cpython-39-pytest-6.2.2.pyc +0 -0
  171. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_curio.cpython-39-pytest-6.2.5.pyc +0 -0
  172. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_trio.cpython-36-pytest-6.2.5.pyc +0 -0
  173. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_trio.cpython-39-pytest-6.2.2.pyc +0 -0
  174. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_async_trio.cpython-39-pytest-6.2.5.pyc +0 -0
  175. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_sync.cpython-36-pytest-6.2.5.pyc +0 -0
  176. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_sync.cpython-39-pytest-6.2.2.pyc +0 -0
  177. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_core_socks_sync.cpython-39-pytest-6.2.5.pyc +0 -0
  178. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-310-pytest-7.0.1.pyc +0 -0
  179. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-311-pytest-7.0.1.pyc +0 -0
  180. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-312-pytest-8.0.2.pyc +0 -0
  181. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-36-pytest-6.2.5.pyc +0 -0
  182. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-36-pytest-7.0.1.pyc +0 -0
  183. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-37-pytest-7.0.1.pyc +0 -0
  184. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-38-pytest-8.0.2.pyc +0 -0
  185. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-39-pytest-6.2.2.pyc +0 -0
  186. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-39-pytest-6.2.5.pyc +0 -0
  187. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_misc.cpython-39-pytest-7.0.1.pyc +0 -0
  188. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio.cpython-310-pytest-7.0.1.pyc +0 -0
  189. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio.cpython-311-pytest-7.0.1.pyc +0 -0
  190. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio.cpython-312-pytest-8.0.2.pyc +0 -0
  191. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio.cpython-36-pytest-6.2.5.pyc +0 -0
  192. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio.cpython-36-pytest-7.0.1.pyc +0 -0
  193. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio.cpython-37-pytest-7.0.1.pyc +0 -0
  194. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio.cpython-39-pytest-6.2.5.pyc +0 -0
  195. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio.cpython-39-pytest-7.0.1.pyc +0 -0
  196. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_ext.cpython-39-pytest-6.2.5.pyc +0 -0
  197. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-310-pytest-7.0.1.pyc +0 -0
  198. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-311-pytest-7.0.1.pyc +0 -0
  199. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-312-pytest-8.0.2.pyc +0 -0
  200. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-36-pytest-6.2.5.pyc +0 -0
  201. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-36-pytest-7.0.1.pyc +0 -0
  202. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-37-pytest-7.0.1.pyc +0 -0
  203. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-38-pytest-8.0.2.pyc +0 -0
  204. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-39-pytest-6.2.5.pyc +0 -0
  205. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_aio_v2.cpython-39-pytest-7.0.1.pyc +0 -0
  206. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-310-pytest-7.0.1.pyc +0 -0
  207. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-311-pytest-7.0.1.pyc +0 -0
  208. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-312-pytest-8.0.2.pyc +0 -0
  209. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-36-pytest-6.2.5.pyc +0 -0
  210. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-36-pytest-7.0.1.pyc +0 -0
  211. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-37-pytest-7.0.1.pyc +0 -0
  212. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-38-pytest-8.0.2.pyc +0 -0
  213. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-39-pytest-6.2.5.pyc +0 -0
  214. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio.cpython-39-pytest-7.0.1.pyc +0 -0
  215. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-310-pytest-7.0.1.pyc +0 -0
  216. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-311-pytest-7.0.1.pyc +0 -0
  217. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-312-pytest-8.0.2.pyc +0 -0
  218. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-37-pytest-7.0.1.pyc +0 -0
  219. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-38-pytest-8.0.2.pyc +0 -0
  220. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-310-pytest-7.0.1.pyc +0 -0
  221. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-311-pytest-7.0.1.pyc +0 -0
  222. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-312-pytest-8.0.2.pyc +0 -0
  223. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-36-pytest-6.2.5.pyc +0 -0
  224. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-36-pytest-7.0.1.pyc +0 -0
  225. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-37-pytest-7.0.1.pyc +0 -0
  226. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-38-pytest-8.0.2.pyc +0 -0
  227. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-39-pytest-6.2.5.pyc +0 -0
  228. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_curio.cpython-39-pytest-7.0.1.pyc +0 -0
  229. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio.cpython-310-pytest-7.0.1.pyc +0 -0
  230. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio.cpython-311-pytest-7.0.1.pyc +0 -0
  231. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio.cpython-312-pytest-8.0.2.pyc +0 -0
  232. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio.cpython-36-pytest-6.2.5.pyc +0 -0
  233. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio.cpython-36-pytest-7.0.1.pyc +0 -0
  234. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio.cpython-37-pytest-7.0.1.pyc +0 -0
  235. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio.cpython-39-pytest-6.2.5.pyc +0 -0
  236. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio.cpython-39-pytest-7.0.1.pyc +0 -0
  237. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-310-pytest-7.0.1.pyc +0 -0
  238. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-311-pytest-7.0.1.pyc +0 -0
  239. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-312-pytest-8.0.2.pyc +0 -0
  240. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-36-pytest-6.2.5.pyc +0 -0
  241. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-36-pytest-7.0.1.pyc +0 -0
  242. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-37-pytest-7.0.1.pyc +0 -0
  243. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-38-pytest-8.0.2.pyc +0 -0
  244. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-39-pytest-6.2.5.pyc +0 -0
  245. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_async_trio_v2.cpython-39-pytest-7.0.1.pyc +0 -0
  246. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-310-pytest-7.0.1.pyc +0 -0
  247. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-311-pytest-7.0.1.pyc +0 -0
  248. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-312-pytest-8.0.2.pyc +0 -0
  249. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-36-pytest-6.2.5.pyc +0 -0
  250. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-36-pytest-7.0.1.pyc +0 -0
  251. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-37-pytest-7.0.1.pyc +0 -0
  252. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-38-pytest-8.0.2.pyc +0 -0
  253. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-39-pytest-6.2.5.pyc +0 -0
  254. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync.cpython-39-pytest-7.0.1.pyc +0 -0
  255. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-310-pytest-7.0.1.pyc +0 -0
  256. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-311-pytest-7.0.1.pyc +0 -0
  257. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-312-pytest-8.0.2.pyc +0 -0
  258. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-36-pytest-6.2.5.pyc +0 -0
  259. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-36-pytest-7.0.1.pyc +0 -0
  260. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-37-pytest-7.0.1.pyc +0 -0
  261. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-38-pytest-8.0.2.pyc +0 -0
  262. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-39-pytest-6.2.5.pyc +0 -0
  263. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_proxy_sync_v2.cpython-39-pytest-7.0.1.pyc +0 -0
  264. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-310-pytest-7.0.1.pyc +0 -0
  265. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-311-pytest-7.0.1.pyc +0 -0
  266. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-312-pytest-8.0.2.pyc +0 -0
  267. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-36-pytest-6.2.5.pyc +0 -0
  268. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-36-pytest-7.0.1.pyc +0 -0
  269. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-37-pytest-7.0.1.pyc +0 -0
  270. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-38-pytest-8.0.2.pyc +0 -0
  271. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-39-pytest-6.2.2.pyc +0 -0
  272. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-39-pytest-6.2.5.pyc +0 -0
  273. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/test_resolvers.cpython-39-pytest-7.0.1.pyc +0 -0
  274. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/utils.cpython-310.pyc +0 -0
  275. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/utils.cpython-311.pyc +0 -0
  276. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/utils.cpython-312.pyc +0 -0
  277. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/utils.cpython-36.pyc +0 -0
  278. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/utils.cpython-37.pyc +0 -0
  279. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/utils.cpython-38.pyc +0 -0
  280. {python_socks-2.5.2 → python_socks-2.6.0}/tests/__pycache__/utils.cpython-39.pyc +0 -0
  281. {python_socks-2.5.2 → python_socks-2.6.0}/tests/config.py +0 -0
  282. {python_socks-2.5.2 → python_socks-2.6.0}/tests/conftest.py +0 -0
  283. {python_socks-2.5.2 → python_socks-2.6.0}/tests/http_app.py +0 -0
  284. {python_socks-2.5.2 → python_socks-2.6.0}/tests/http_server.py +0 -0
  285. {python_socks-2.5.2 → python_socks-2.6.0}/tests/mocks.py +0 -0
  286. {python_socks-2.5.2 → python_socks-2.6.0}/tests/proxy_server.py +0 -0
  287. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_misc.py +0 -0
  288. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_async_aio_v2.py +0 -0
  289. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_async_anyio.py +0 -0
  290. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_async_anyio_v2.py +0 -0
  291. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_async_curio.py +0 -0
  292. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_async_trio_v2.py +0 -0
  293. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_sync.py +0 -0
  294. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_proxy_sync_v2.py +0 -0
  295. {python_socks-2.5.2 → python_socks-2.6.0}/tests/test_resolvers.py +0 -0
  296. {python_socks-2.5.2 → python_socks-2.6.0}/tests/utils.py +0 -0
@@ -1,18 +1,37 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-socks
3
- Version: 2.5.2
4
- Summary: Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python
5
- Home-page: https://github.com/romis2012/python-socks
6
- Author: Roman Snegirev
7
- Author-email: snegiryev@gmail.com
8
- License: Apache 2
9
- Keywords: socks socks5 socks4 http proxy asyncio trio curio anyio
3
+ Version: 2.6.0
4
+ Summary: Proxy (SOCKS4, SOCKS5, HTTP CONNECT) client for Python
5
+ Author-email: Roman Snegirev <snegiryev@gmail.com>
6
+ License: Apache-2.0
7
+ Project-URL: homepage, https://github.com/romis2012/python-socks
8
+ Project-URL: repository, https://github.com/romis2012/python-socks
9
+ Keywords: socks,socks5,socks4,http,proxy,asyncio,trio,curio,anyio
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Operating System :: MacOS
21
+ Classifier: Operating System :: Microsoft
22
+ Classifier: Operating System :: POSIX :: Linux
23
+ Classifier: Topic :: Internet :: WWW/HTTP
24
+ Classifier: Intended Audience :: Developers
25
+ Classifier: Framework :: AsyncIO
26
+ Classifier: Framework :: Trio
27
+ Classifier: License :: OSI Approved :: Apache Software License
28
+ Requires-Python: >=3.8.0
10
29
  Description-Content-Type: text/markdown
11
30
  License-File: LICENSE.txt
12
31
  Provides-Extra: asyncio
13
- Requires-Dist: async-timeout>=3.0.1; python_version < "3.11" and extra == "asyncio"
32
+ Requires-Dist: async-timeout>=4.0; python_version < "3.11" and extra == "asyncio"
14
33
  Provides-Extra: trio
15
- Requires-Dist: trio>=0.16.0; extra == "trio"
34
+ Requires-Dist: trio>=0.24; extra == "trio"
16
35
  Provides-Extra: curio
17
36
  Requires-Dist: curio>=1.4; extra == "curio"
18
37
  Provides-Extra: anyio
@@ -28,15 +47,15 @@ Requires-Dist: anyio<5.0.0,>=3.3.4; extra == "anyio"
28
47
  -->
29
48
 
30
49
  The `python-socks` package provides a core proxy client functionality for Python.
31
- Supports SOCKS4(a), SOCKS5(h), HTTP (tunneling) proxy and provides sync and async (asyncio, trio, curio, anyio) APIs.
50
+ Supports `SOCKS4(a)`, `SOCKS5(h)`, `HTTP CONNECT` proxy and provides sync and async (asyncio, trio, curio, anyio) APIs.
32
51
  You probably don't need to use `python-socks` directly.
33
52
  It is used internally by
34
53
  [aiohttp-socks](https://github.com/romis2012/aiohttp-socks) and [httpx-socks](https://github.com/romis2012/httpx-socks) packages.
35
54
 
36
55
  ## Requirements
37
- - Python >= 3.6
38
- - async-timeout >= 3.0.1 (optional)
39
- - trio >= 0.16.0 (optional)
56
+ - Python >= 3.8
57
+ - async-timeout >= 4.0 (optional)
58
+ - trio >= 0.24 (optional)
40
59
  - curio >= 1.4 (optional)
41
60
  - anyio >= 3.3.4 (optional)
42
61
 
@@ -8,15 +8,15 @@
8
8
  -->
9
9
 
10
10
  The `python-socks` package provides a core proxy client functionality for Python.
11
- Supports SOCKS4(a), SOCKS5(h), HTTP (tunneling) proxy and provides sync and async (asyncio, trio, curio, anyio) APIs.
11
+ Supports `SOCKS4(a)`, `SOCKS5(h)`, `HTTP CONNECT` proxy and provides sync and async (asyncio, trio, curio, anyio) APIs.
12
12
  You probably don't need to use `python-socks` directly.
13
13
  It is used internally by
14
14
  [aiohttp-socks](https://github.com/romis2012/aiohttp-socks) and [httpx-socks](https://github.com/romis2012/httpx-socks) packages.
15
15
 
16
16
  ## Requirements
17
- - Python >= 3.6
18
- - async-timeout >= 3.0.1 (optional)
19
- - trio >= 0.16.0 (optional)
17
+ - Python >= 3.8
18
+ - async-timeout >= 4.0 (optional)
19
+ - trio >= 0.24 (optional)
20
20
  - curio >= 1.4 (optional)
21
21
  - anyio >= 3.3.4 (optional)
22
22
 
@@ -0,0 +1,69 @@
1
+ [build-system]
2
+ requires = ['setuptools']
3
+ build-backend = 'setuptools.build_meta'
4
+
5
+ [project]
6
+ name = 'python-socks'
7
+ license = { text = 'Apache-2.0' }
8
+ description = 'Proxy (SOCKS4, SOCKS5, HTTP CONNECT) client for Python'
9
+ readme = 'README.md'
10
+ authors = [{ name = 'Roman Snegirev', email = 'snegiryev@gmail.com' }]
11
+ keywords = [
12
+ 'socks',
13
+ 'socks5',
14
+ 'socks4',
15
+ 'http',
16
+ 'proxy',
17
+ 'asyncio',
18
+ 'trio',
19
+ 'curio',
20
+ 'anyio',
21
+ ]
22
+ requires-python = ">=3.8.0"
23
+ dynamic = ['version']
24
+ classifiers = [
25
+ "Development Status :: 5 - Production/Stable",
26
+ "Programming Language :: Python",
27
+ "Programming Language :: Python :: 3",
28
+ "Programming Language :: Python :: 3 :: Only",
29
+ "Programming Language :: Python :: 3.8",
30
+ "Programming Language :: Python :: 3.9",
31
+ "Programming Language :: Python :: 3.10",
32
+ "Programming Language :: Python :: 3.11",
33
+ "Programming Language :: Python :: 3.12",
34
+ "Programming Language :: Python :: 3.13",
35
+ "Operating System :: MacOS",
36
+ "Operating System :: Microsoft",
37
+ "Operating System :: POSIX :: Linux",
38
+ "Topic :: Internet :: WWW/HTTP",
39
+ "Intended Audience :: Developers",
40
+ "Framework :: AsyncIO",
41
+ "Framework :: Trio",
42
+ "License :: OSI Approved :: Apache Software License",
43
+ ]
44
+
45
+ [project.optional-dependencies]
46
+ asyncio = ['async-timeout>=4.0; python_version < "3.11"']
47
+ trio = ['trio>=0.24']
48
+ curio = ['curio>=1.4']
49
+ anyio = ['anyio>=3.3.4,<5.0.0']
50
+
51
+ [project.urls]
52
+ homepage = 'https://github.com/romis2012/python-socks'
53
+ repository = 'https://github.com/romis2012/python-socks'
54
+
55
+ [tool.setuptools.dynamic]
56
+ version = { attr = 'python_socks.__version__' }
57
+
58
+ [tool.setuptools.packages.find]
59
+ include = ['python_socks*']
60
+
61
+ [tool.black]
62
+ line-length = 99
63
+ target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
64
+ skip-string-normalization = true
65
+ preview = true
66
+ verbose = true
67
+
68
+ [tool.pytest.ini_options]
69
+ asyncio_mode = 'strict'
@@ -1,27 +1,4 @@
1
- class SyncProxy:
2
- def connect(self, dest_host, dest_port, timeout=None, **kwargs):
3
- raise NotImplementedError()
4
-
5
- @property
6
- def proxy_host(self):
7
- raise NotImplementedError()
8
-
9
- @property
10
- def proxy_port(self):
11
- raise NotImplementedError()
12
-
13
-
14
- class AsyncProxy:
15
- async def connect(self, dest_host, dest_port, timeout=None, **kwargs):
16
- raise NotImplementedError()
17
-
18
- @property
19
- def proxy_host(self):
20
- raise NotImplementedError()
21
-
22
- @property
23
- def proxy_port(self):
24
- raise NotImplementedError()
1
+ from typing import Optional
25
2
 
26
3
 
27
4
  class SyncResolver:
@@ -39,7 +16,7 @@ class SyncSocketStream:
39
16
  def write_all(self, data: bytes):
40
17
  raise NotImplementedError()
41
18
 
42
- def read(self, max_bytes: int = None):
19
+ def read(self, max_bytes: Optional[int] = None):
43
20
  raise NotImplementedError()
44
21
 
45
22
  def read_exact(self, n: int):
@@ -53,7 +30,7 @@ class AsyncSocketStream:
53
30
  async def write_all(self, data: bytes):
54
31
  raise NotImplementedError()
55
32
 
56
- async def read(self, max_bytes: int = None):
33
+ async def read(self, max_bytes: Optional[int] = None):
57
34
  raise NotImplementedError()
58
35
 
59
36
  async def read_exact(self, n: int):
@@ -1,3 +1,4 @@
1
+ from typing import Optional
1
2
  from .._abc import AsyncResolver
2
3
  from .._types import ProxyType
3
4
 
@@ -9,9 +10,9 @@ from .http_async import HttpAsyncConnector
9
10
 
10
11
  def create_connector(
11
12
  proxy_type: ProxyType,
12
- username: str,
13
- password: str,
14
- rdns: bool,
13
+ username: Optional[str],
14
+ password: Optional[str],
15
+ rdns: Optional[bool],
15
16
  resolver: AsyncResolver,
16
17
  ) -> AsyncConnector:
17
18
  if proxy_type == ProxyType.SOCKS4:
@@ -1,3 +1,4 @@
1
+ from typing import Optional
1
2
  from .._abc import SyncResolver
2
3
  from .._types import ProxyType
3
4
 
@@ -9,9 +10,9 @@ from .http_sync import HttpSyncConnector
9
10
 
10
11
  def create_connector(
11
12
  proxy_type: ProxyType,
12
- username: str,
13
- password: str,
14
- rdns: bool,
13
+ username: Optional[str],
14
+ password: Optional[str],
15
+ rdns: Optional[bool],
15
16
  resolver: SyncResolver,
16
17
  ) -> SyncConnector:
17
18
  if proxy_type == ProxyType.SOCKS4:
@@ -1,3 +1,4 @@
1
+ from typing import Optional
1
2
  from .._abc import AsyncSocketStream, AsyncResolver
2
3
  from .abc import AsyncConnector
3
4
 
@@ -7,8 +8,8 @@ from .._protocols import http
7
8
  class HttpAsyncConnector(AsyncConnector):
8
9
  def __init__(
9
10
  self,
10
- username: str,
11
- password: str,
11
+ username: Optional[str],
12
+ password: Optional[str],
12
13
  resolver: AsyncResolver,
13
14
  ):
14
15
  self._username = username
@@ -1,3 +1,4 @@
1
+ from typing import Optional
1
2
  from .._abc import SyncSocketStream, SyncResolver
2
3
  from .abc import SyncConnector
3
4
 
@@ -7,8 +8,8 @@ from .._protocols import http
7
8
  class HttpSyncConnector(SyncConnector):
8
9
  def __init__(
9
10
  self,
10
- username: str,
11
- password: str,
11
+ username: Optional[str],
12
+ password: Optional[str],
12
13
  resolver: SyncResolver,
13
14
  ):
14
15
  self._username = username
@@ -1,4 +1,5 @@
1
1
  import socket
2
+ from typing import Optional
2
3
 
3
4
  from .._abc import AsyncSocketStream, AsyncResolver
4
5
  from .abc import AsyncConnector
@@ -10,8 +11,8 @@ from .._helpers import is_ip_address
10
11
  class Socks4AsyncConnector(AsyncConnector):
11
12
  def __init__(
12
13
  self,
13
- user_id: str,
14
- rdns: bool,
14
+ user_id: Optional[str],
15
+ rdns: Optional[bool],
15
16
  resolver: AsyncResolver,
16
17
  ):
17
18
  if rdns is None:
@@ -1,4 +1,5 @@
1
1
  import socket
2
+ from typing import Optional
2
3
 
3
4
  from .._abc import SyncSocketStream, SyncResolver
4
5
  from .abc import SyncConnector
@@ -10,8 +11,8 @@ from .._helpers import is_ip_address
10
11
  class Socks4SyncConnector(SyncConnector):
11
12
  def __init__(
12
13
  self,
13
- user_id: str,
14
- rdns: bool,
14
+ user_id: Optional[str],
15
+ rdns: Optional[bool],
15
16
  resolver: SyncResolver,
16
17
  ):
17
18
  if rdns is None:
@@ -1,4 +1,5 @@
1
1
  import socket
2
+ from typing import Optional
2
3
 
3
4
  from .._abc import AsyncSocketStream, AsyncResolver
4
5
  from .abc import AsyncConnector
@@ -10,9 +11,9 @@ from .._helpers import is_ip_address
10
11
  class Socks5AsyncConnector(AsyncConnector):
11
12
  def __init__(
12
13
  self,
13
- username: str,
14
- password: str,
15
- rdns: bool,
14
+ username: Optional[str],
15
+ password: Optional[str],
16
+ rdns: Optional[bool],
16
17
  resolver: AsyncResolver,
17
18
  ):
18
19
  if rdns is None:
@@ -86,7 +87,8 @@ class Socks5AsyncConnector(AsyncConnector):
86
87
  elif addr_type == socks5.AddressType.IPV6:
87
88
  data += await stream.read_exact(18)
88
89
  elif addr_type == socks5.AddressType.DOMAIN:
89
- host_len, *_ = await stream.read_exact(1)
90
+ data += await stream.read_exact(1)
91
+ host_len = data[-1]
90
92
  data += await stream.read_exact(host_len + 2)
91
93
 
92
94
  return data
@@ -1,4 +1,5 @@
1
1
  import socket
2
+ from typing import Optional
2
3
 
3
4
  from .._abc import SyncSocketStream, SyncResolver
4
5
  from .abc import SyncConnector
@@ -10,9 +11,9 @@ from .._helpers import is_ip_address
10
11
  class Socks5SyncConnector(SyncConnector):
11
12
  def __init__(
12
13
  self,
13
- username: str,
14
- password: str,
15
- rdns: bool,
14
+ username: Optional[str],
15
+ password: Optional[str],
16
+ rdns: Optional[bool],
16
17
  resolver: SyncResolver,
17
18
  ):
18
19
  if rdns is None:
@@ -77,7 +78,8 @@ class Socks5SyncConnector(SyncConnector):
77
78
  elif addr_type == socks5.AddressType.IPV6:
78
79
  data += stream.read_exact(18)
79
80
  elif addr_type == socks5.AddressType.DOMAIN:
80
- host_len, *_ = stream.read_exact(1)
81
+ data += stream.read_exact(1)
82
+ host_len = data[-1]
81
83
  data += stream.read_exact(host_len + 2)
82
84
 
83
85
  return data
@@ -1,12 +1,17 @@
1
1
  import functools
2
2
  import re
3
+ from typing import Optional, Tuple
3
4
  from urllib.parse import urlparse, unquote
4
5
 
5
6
  from ._types import ProxyType
6
7
 
7
- _ipv4_pattern = (r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}'
8
- r'(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$')
8
+ # pylint:disable-next=invalid-name
9
+ _ipv4_pattern = (
10
+ r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}'
11
+ r'(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
12
+ )
9
13
 
14
+ # pylint:disable-next=invalid-name
10
15
  _ipv6_pattern = (
11
16
  r'^(?:(?:(?:[A-F0-9]{1,4}:){6}|(?=(?:[A-F0-9]{0,4}:){0,6}'
12
17
  r'(?:[0-9]{1,3}\.){3}[0-9]{1,3}$)(([0-9A-F]{1,4}:){0,5}|:)'
@@ -15,7 +20,8 @@ _ipv6_pattern = (
15
20
  r'(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-F0-9]{1,4}:){7}'
16
21
  r'[A-F0-9]{1,4}|(?=(?:[A-F0-9]{0,4}:){0,7}[A-F0-9]{0,4}$)'
17
22
  r'(([0-9A-F]{1,4}:){1,7}|:)((:[0-9A-F]{1,4}){1,7}|:)|(?:[A-F0-9]{1,4}:){7}'
18
- r':|:(:[A-F0-9]{1,4}){7})$')
23
+ r':|:(:[A-F0-9]{1,4}){7})$'
24
+ )
19
25
 
20
26
  _ipv4_regex = re.compile(_ipv4_pattern)
21
27
  _ipv6_regex = re.compile(_ipv6_pattern, flags=re.IGNORECASE)
@@ -31,8 +37,9 @@ def _is_ip_address(regex, regexb, host):
31
37
  elif isinstance(host, (bytes, bytearray, memoryview)):
32
38
  return bool(regexb.match(host))
33
39
  else:
34
- raise TypeError('{} [{}] is not a str or bytes' # pragma: no cover
35
- .format(host, type(host)))
40
+ raise TypeError(
41
+ '{} [{}] is not a str or bytes'.format(host, type(host)) # pragma: no cover
42
+ )
36
43
 
37
44
 
38
45
  is_ipv4_address = functools.partial(_is_ip_address, _ipv4_regex, _ipv4_regexb)
@@ -43,7 +50,7 @@ def is_ip_address(host):
43
50
  return is_ipv4_address(host) or is_ipv6_address(host)
44
51
 
45
52
 
46
- def parse_proxy_url(url):
53
+ def parse_proxy_url(url: str) -> Tuple[ProxyType, str, int, Optional[str], Optional[str]]:
47
54
  parsed = urlparse(url)
48
55
 
49
56
  scheme = parsed.scheme
@@ -62,12 +69,12 @@ def parse_proxy_url(url):
62
69
 
63
70
  try:
64
71
  port = parsed.port
65
- except (ValueError, TypeError): # pragma: no cover
66
- raise ValueError('Invalid port component')
72
+ assert port is not None
73
+ except (ValueError, TypeError, AssertionError) as e: # pragma: no cover
74
+ raise ValueError('Invalid port component') from e
67
75
 
68
76
  try:
69
- username, password = (unquote(parsed.username),
70
- unquote(parsed.password))
77
+ username, password = (unquote(parsed.username), unquote(parsed.password))
71
78
  except (AttributeError, TypeError):
72
79
  username, password = '', ''
73
80
 
@@ -3,6 +3,7 @@ from dataclasses import dataclass
3
3
  import base64
4
4
  import binascii
5
5
  from collections import namedtuple
6
+ from typing import Optional
6
7
 
7
8
  from .._version import __title__, __version__
8
9
 
@@ -88,8 +89,8 @@ class _Buffer:
88
89
  class ConnectRequest:
89
90
  host: str
90
91
  port: int
91
- username: str
92
- password: str
92
+ username: Optional[str]
93
+ password: Optional[str]
93
94
 
94
95
  def dumps(self) -> bytes:
95
96
  buff = _Buffer()
@@ -2,6 +2,7 @@ import enum
2
2
  import ipaddress
3
3
  import socket
4
4
  from dataclasses import dataclass
5
+ from typing import Optional
5
6
 
6
7
  from .errors import ReplyError
7
8
  from .._helpers import is_ipv4_address
@@ -38,7 +39,7 @@ ReplyMessages = {
38
39
  class ConnectRequest:
39
40
  host: str # hostname or IPv4 address
40
41
  port: int
41
- user_id: str
42
+ user_id: Optional[str]
42
43
 
43
44
  def dumps(self):
44
45
  port_bytes = self.port.to_bytes(2, 'big')
@@ -1,7 +1,7 @@
1
1
  import enum
2
2
  import ipaddress
3
3
  import socket
4
- import typing
4
+ from typing import Optional, Union
5
5
  from dataclasses import dataclass, field
6
6
 
7
7
  from .errors import ReplyError
@@ -67,8 +67,8 @@ ReplyMessages = {
67
67
 
68
68
  @dataclass
69
69
  class AuthMethodsRequest:
70
- username: str
71
- password: str
70
+ username: Optional[str]
71
+ password: Optional[str]
72
72
  methods: bytearray = field(init=False)
73
73
 
74
74
  def __post_init__(self):
@@ -260,7 +260,7 @@ class StateServerWaitingForAuth:
260
260
 
261
261
  @dataclass
262
262
  class StateClientAuthenticated:
263
- data: typing.Optional[AuthReply] = None
263
+ data: Optional[AuthReply] = None
264
264
 
265
265
 
266
266
  @dataclass
@@ -278,19 +278,19 @@ class StateServerConnected:
278
278
  data: ConnectReply
279
279
 
280
280
 
281
- Request = typing.Union[
281
+ Request = Union[
282
282
  AuthMethodsRequest,
283
283
  AuthRequest,
284
284
  ConnectRequest,
285
285
  ]
286
286
 
287
- Reply = typing.Union[
287
+ Reply = Union[
288
288
  AuthMethodReply,
289
289
  AuthReply,
290
290
  ConnectReply,
291
291
  ]
292
292
 
293
- ConnectionState = typing.Union[
293
+ ConnectionState = Union[
294
294
  StateServerWaitingForAuthMethods,
295
295
  StateClientSentAuthMethods,
296
296
  StateServerWaitingForAuth,
@@ -1,2 +1,2 @@
1
1
  __title__ = 'python-socks'
2
- __version__ = '2.5.2'
2
+ __version__ = '2.6.0'
@@ -1,9 +1,8 @@
1
1
  from typing import Iterable
2
- from .. import _abc as abc
3
2
 
4
3
 
5
4
  class ProxyChain:
6
- def __init__(self, proxies: Iterable[abc.AsyncProxy]):
5
+ def __init__(self, proxies: Iterable):
7
6
  self._proxies = proxies
8
7
 
9
8
  async def connect(self, dest_host, dest_port, timeout=None):
@@ -1,5 +1,5 @@
1
1
  import ssl
2
- from typing import Optional
2
+ from typing import Any, Optional
3
3
 
4
4
  import anyio
5
5
 
@@ -25,10 +25,10 @@ class AnyioProxy:
25
25
  proxy_type: ProxyType,
26
26
  host: str,
27
27
  port: int,
28
- username: str = None,
29
- password: str = None,
30
- rdns: bool = None,
31
- proxy_ssl: ssl.SSLContext = None,
28
+ username: Optional[str] = None,
29
+ password: Optional[str] = None,
30
+ rdns: Optional[bool] = None,
31
+ proxy_ssl: Optional[ssl.SSLContext] = None,
32
32
  ):
33
33
  self._proxy_type = proxy_type
34
34
  self._proxy_host = host
@@ -44,13 +44,15 @@ class AnyioProxy:
44
44
  self,
45
45
  dest_host: str,
46
46
  dest_port: int,
47
- dest_ssl: ssl.SSLContext = None,
48
- timeout: float = None,
49
- _stream: AnyioSocketStream = None,
47
+ dest_ssl: Optional[ssl.SSLContext] = None,
48
+ timeout: Optional[float] = None,
49
+ **kwargs: Any,
50
50
  ) -> AnyioSocketStream:
51
51
  if timeout is None:
52
52
  timeout = DEFAULT_TIMEOUT
53
53
 
54
+ _stream = kwargs.get('_stream')
55
+
54
56
  try:
55
57
  with anyio.fail_after(timeout):
56
58
  if _stream is None:
@@ -117,7 +119,7 @@ class AnyioProxy:
117
119
  return self._proxy_port
118
120
 
119
121
  @classmethod
120
- def create(cls, *args, **kwargs):
122
+ def create(cls, *args, **kwargs): # for backward compatibility
121
123
  return cls(*args, **kwargs)
122
124
 
123
125
  @classmethod
@@ -1,4 +1,5 @@
1
1
  import ssl
2
+ from typing import Optional
2
3
 
3
4
  import anyio
4
5
 
@@ -22,11 +23,11 @@ class AnyioProxy:
22
23
  proxy_type: ProxyType,
23
24
  host: str,
24
25
  port: int,
25
- username: str = None,
26
- password: str = None,
27
- rdns: bool = None,
28
- proxy_ssl: ssl.SSLContext = None,
29
- forward: 'AnyioProxy' = None,
26
+ username: Optional[str] = None,
27
+ password: Optional[str] = None,
28
+ rdns: Optional[bool] = None,
29
+ proxy_ssl: Optional[ssl.SSLContext] = None,
30
+ forward: Optional['AnyioProxy'] = None,
30
31
  ):
31
32
  self._proxy_type = proxy_type
32
33
  self._proxy_host = host
@@ -44,8 +45,8 @@ class AnyioProxy:
44
45
  self,
45
46
  dest_host: str,
46
47
  dest_port: int,
47
- dest_ssl: ssl.SSLContext = None,
48
- timeout: float = None,
48
+ dest_ssl: Optional[ssl.SSLContext] = None,
49
+ timeout: Optional[float] = None,
49
50
  ) -> AnyioSocketStream:
50
51
  if timeout is None:
51
52
  timeout = DEFAULT_TIMEOUT
@@ -58,13 +59,15 @@ class AnyioProxy:
58
59
  dest_ssl=dest_ssl,
59
60
  )
60
61
  except TimeoutError as e:
61
- raise ProxyTimeoutError('Proxy connection timed out: {}'.format(timeout)) from e
62
+ raise ProxyTimeoutError(
63
+ 'Proxy connection timed out: {}'.format(timeout)
64
+ ) from e
62
65
 
63
66
  async def _connect(
64
67
  self,
65
68
  dest_host: str,
66
69
  dest_port: int,
67
- dest_ssl: ssl.SSLContext = None,
70
+ dest_ssl: Optional[ssl.SSLContext] = None,
68
71
  ) -> AnyioSocketStream:
69
72
  if self._forward is None:
70
73
  try:
@@ -120,7 +123,7 @@ class AnyioProxy:
120
123
  return stream
121
124
 
122
125
  @classmethod
123
- def create(cls, *args, **kwargs):
126
+ def create(cls, *args, **kwargs): # for backward compatibility
124
127
  return cls(*args, **kwargs)
125
128
 
126
129
  @classmethod