Marcel Telka
2023-12-21 e8cd43274a8dea6b54bfcdb6afd591e1591993ff
Add socksio Python project

8 files added
300 ■■■■■ changed files
components/python/socksio/Makefile 50 ●●●●● patch | view | raw | blame | history
components/python/socksio/manifests/sample-manifest.p5m 42 ●●●●● patch | view | raw | blame | history
components/python/socksio/patches/01-unpin-flit_core.patch 11 ●●●●● patch | view | raw | blame | history
components/python/socksio/patches/02-test-reqs.patch 13 ●●●●● patch | view | raw | blame | history
components/python/socksio/pkg5 11 ●●●●● patch | view | raw | blame | history
components/python/socksio/python-integrate-project.conf 22 ●●●●● patch | view | raw | blame | history
components/python/socksio/socksio-PYVER.p5m 42 ●●●●● patch | view | raw | blame | history
components/python/socksio/test/results-all.master 109 ●●●●● patch | view | raw | blame | history
components/python/socksio/Makefile
New file
@@ -0,0 +1,50 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# This file was automatically generated using the following command:
#   $WS_TOOLS/python-integrate-project socksio
#
BUILD_STYLE = pyproject
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME =        socksio
HUMAN_VERSION =            1.0.0
COMPONENT_SUMMARY =        socksio - Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5.
COMPONENT_PROJECT_URL =        https://github.com/sethmlarson/socksio
COMPONENT_ARCHIVE_URL =        \
    https://files.pythonhosted.org/packages/f8/5c/48a7d9495be3d1c651198fd99dbb6ce190e2274d0f28b9051307bdec6b85/socksio-1.0.0.tar.gz
COMPONENT_ARCHIVE_HASH =    \
    sha256:f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac
COMPONENT_LICENSE =        MIT
COMPONENT_LICENSE_FILE =    LICENSE
TEST_STYLE = pytest
include $(WS_MAKE_RULES)/common.mk
# This project does not support tox so we need to provide test requirements
# manually.
TEST_REQUIREMENTS += test-requirements.txt
# Auto-generated dependencies
PYTHON_REQUIRED_PACKAGES += library/python/flit-core
PYTHON_REQUIRED_PACKAGES += runtime/python
TEST_REQUIRED_PACKAGES.python += library/python/black
TEST_REQUIRED_PACKAGES.python += library/python/flake8
TEST_REQUIRED_PACKAGES.python += library/python/flake8-bugbear
TEST_REQUIRED_PACKAGES.python += library/python/isort
TEST_REQUIRED_PACKAGES.python += library/python/mypy
TEST_REQUIRED_PACKAGES.python += library/python/nox
TEST_REQUIRED_PACKAGES.python += library/python/pytest
TEST_REQUIRED_PACKAGES.python += library/python/pytest-cov
components/python/socksio/manifests/sample-manifest.p5m
New file
@@ -0,0 +1,42 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2023 <contributor>
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
file path=usr/lib/python$(PYVER)/vendor-packages/socksio-$(HUMAN_VERSION).dist-info/LICENSE
file path=usr/lib/python$(PYVER)/vendor-packages/socksio-$(HUMAN_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/socksio-$(HUMAN_VERSION).dist-info/WHEEL
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/_types.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/compat.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/exceptions.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/py.typed
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/socks4.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/socks5.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/utils.py
# python modules are unusable without python runtime binary
depend type=require fmri=__TBD pkg.debug.depend.file=python$(PYVER) \
    pkg.debug.depend.path=usr/bin
# Automatically generated dependencies based on distribution metadata
components/python/socksio/patches/01-unpin-flit_core.patch
New file
@@ -0,0 +1,11 @@
https://github.com/sethmlarson/socksio/pull/61
--- socksio-1.0.0/pyproject.toml.orig
+++ socksio-1.0.0/pyproject.toml
@@ -1,5 +1,5 @@
 [build-system]
-requires = ["flit_core >=2,<3"]
+requires = ["flit_core >=2"]
 build-backend = "flit_core.buildapi"
 [tool.flit.metadata]
components/python/socksio/patches/02-test-reqs.patch
New file
@@ -0,0 +1,13 @@
We do not have packaged these optional test dependencies.
--- socksio-1.0.0/test-requirements.txt.orig
+++ socksio-1.0.0/test-requirements.txt
@@ -1,8 +1,6 @@
 black
 flake8
 flake8-bugbear
-flake8-comprehensions
-flit
 isort
 mypy
 nox
components/python/socksio/pkg5
New file
@@ -0,0 +1,11 @@
{
    "dependencies": [
        "library/python/flit-core-39",
        "runtime/python-39"
    ],
    "fmris": [
        "library/python/socksio-39",
        "library/python/socksio"
    ],
    "name": "socksio"
}
components/python/socksio/python-integrate-project.conf
New file
@@ -0,0 +1,22 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2023 Marcel Telka
#
%patch% 01-unpin-flit_core.patch
%patch% 02-test-reqs.patch
%include-3%
# This project does not support tox so we need to provide test requirements
# manually.
TEST_REQUIREMENTS += test-requirements.txt
components/python/socksio/socksio-PYVER.p5m
New file
@@ -0,0 +1,42 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# This file was automatically generated using python-integrate-project
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
file path=usr/lib/python$(PYVER)/vendor-packages/socksio-$(HUMAN_VERSION).dist-info/LICENSE
file path=usr/lib/python$(PYVER)/vendor-packages/socksio-$(HUMAN_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/socksio-$(HUMAN_VERSION).dist-info/WHEEL
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/_types.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/compat.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/exceptions.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/py.typed
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/socks4.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/socks5.py
file path=usr/lib/python$(PYVER)/vendor-packages/socksio/utils.py
# python modules are unusable without python runtime binary
depend type=require fmri=__TBD pkg.debug.depend.file=python$(PYVER) \
    pkg.debug.depend.path=usr/bin
# Automatically generated dependencies based on distribution metadata
components/python/socksio/test/results-all.master
New file
@@ -0,0 +1,109 @@
============================= test session starts ==============================
platform sunos5 -- Python $(PYTHON_VERSION).X -- $(PYTHON)
cachedir: .pytest_cache
rootdir: $(@D)
configfile: pytest.ini
collecting ... collected 99 items
tests/test_compat.py::test_singledispatchmethod PASSED
tests/test_compat.py::test_singledispatchmethod_error PASSED
tests/test_socks4.py::test_SOCKS4A_connection_request[\x01] PASSED
tests/test_socks4.py::test_SOCKS4A_connection_request[\x02] PASSED
tests/test_socks4.py::test_socks4_connection_request[\x01] PASSED
tests/test_socks4.py::test_socks4_connection_request[\x02] PASSED
tests/test_socks4.py::test_socks4_receive_data[Z] PASSED
tests/test_socks4.py::test_socks4_receive_data[[] PASSED
tests/test_socks4.py::test_socks4_receive_data[\] PASSED
tests/test_socks4.py::test_socks4_receive_data[]] PASSED
tests/test_socks4.py::test_socks4_receive_malformed_data[\x00Z\x1f\x90\x7f\x00\x00] PASSED
tests/test_socks4.py::test_socks4_receive_malformed_data[\x00\xff\x1f\x90\x7f\x00\x00\x01] PASSED
tests/test_socks4.py::test_socks4_receive_malformed_data[\x0fZ\x1f\x90\x7f\x00\x00\x01] PASSED
tests/test_socks4.py::test_socks4arequest_from_address[127.0.0.1:8080-\x7f\x00\x00\x01-80800] PASSED
tests/test_socks4.py::test_socks4arequest_from_address[127.0.0.1:8080-\x7f\x00\x00\x01-80801] PASSED
tests/test_socks4.py::test_socks4arequest_from_address[address0-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks4.py::test_socks4arequest_from_address[address1-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks4.py::test_socks4arequest_from_address[address3-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks4.py::test_socks4arequest_from_address[address4-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks4.py::test_socks4arequest_from_address_dump_raises_if_no_user_id PASSED
tests/test_socks4.py::test_socks4request_from_address[127.0.0.1:8080-\x7f\x00\x00\x01-80800] PASSED
tests/test_socks4.py::test_socks4request_from_address[127.0.0.1:8080-\x7f\x00\x00\x01-80801] PASSED
tests/test_socks4.py::test_socks4request_from_address[address0-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks4.py::test_socks4request_from_address[address1-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks4.py::test_socks4request_from_address[address3-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks4.py::test_socks4request_from_address[address4-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks4.py::test_socks4request_from_address_dump_raises_if_no_user_id PASSED
tests/test_socks4.py::test_socks4request_from_address_errors[address0-socksio] PASSED
tests/test_socks4.py::test_socks4request_from_address_errors[localhost:3080-socksio] PASSED
tests/test_socks5.py::test_socks5_auth_reply_accepted[\x00] PASSED
tests/test_socks5.py::test_socks5_auth_reply_accepted[\x01] PASSED
tests/test_socks5.py::test_socks5_auth_reply_accepted[\x02] PASSED
tests/test_socks5.py::test_socks5_auth_reply_malformed[\x05\x10] PASSED
tests/test_socks5.py::test_socks5_auth_reply_malformed[\x05] PASSED
tests/test_socks5.py::test_socks5_auth_reply_no_acceptable_auth_method PASSED
tests/test_socks5.py::test_socks5_auth_request PASSED
tests/test_socks5.py::test_socks5_auth_username_password_fail PASSED
tests/test_socks5.py::test_socks5_auth_username_password_requires_connect_waiting PASSED
tests/test_socks5.py::test_socks5_auth_username_password_success PASSED
tests/test_socks5.py::test_socks5_no_auth_required_reply_sets_client_authenticated_state PASSED
tests/test_socks5.py::test_socks5_receive_malformed_data[\x00\x00\x00\x01\x7f\x00\x00\x01\x048] PASSED
tests/test_socks5.py::test_socks5_receive_malformed_data[\x05\x00\x00\x01\x7f\x00\x00\x01\x04] PASSED
tests/test_socks5.py::test_socks5_receive_malformed_data[\x05\x00\x00\x01\x7f\x00\x00\x048] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1-\x01] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1-\x02] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1-\x03] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1-\x04] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1-\x05] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1-\x06] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1-\x07] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1-\x08] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x03-localhost-\x03-localhost-\x01] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x03-localhost-\x03-localhost-\x02] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x03-localhost-\x03-localhost-\x03] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x03-localhost-\x03-localhost-\x04] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x03-localhost-\x03-localhost-\x05] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x03-localhost-\x03-localhost-\x06] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x03-localhost-\x03-localhost-\x07] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x03-localhost-\x03-localhost-\x08] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1-\x01] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1-\x02] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1-\x03] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1-\x04] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1-\x05] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1-\x06] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1-\x07] PASSED
tests/test_socks5.py::test_socks5_reply_error[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1-\x08] PASSED
tests/test_socks5.py::test_socks5_reply_success[\x01-\x7f\x00\x00\x01-\x01-127.0.0.1] PASSED
tests/test_socks5.py::test_socks5_reply_success[\x03-localhost-\x03-localhost] PASSED
tests/test_socks5.py::test_socks5_reply_success[\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-\x04-::1] PASSED
tests/test_socks5.py::test_socks5_request_domain_name[\x01] PASSED
tests/test_socks5.py::test_socks5_request_domain_name[\x02] PASSED
tests/test_socks5.py::test_socks5_request_ipv4[\x01] PASSED
tests/test_socks5.py::test_socks5_request_ipv4[\x02] PASSED
tests/test_socks5.py::test_socks5_request_ipv6[\x01] PASSED
tests/test_socks5.py::test_socks5_request_ipv6[\x02] PASSED
tests/test_socks5.py::test_socks5_request_require_authentication PASSED
tests/test_socks5.py::test_socks5atype_from_address_type[AddressType.DN-\x03] PASSED
tests/test_socks5.py::test_socks5atype_from_address_type[AddressType.IPV4-\x01] PASSED
tests/test_socks5.py::test_socks5atype_from_address_type[AddressType.IPV6-\x04] PASSED
tests/test_socks5.py::test_socks5atype_unknown_address_type_raises PASSED
tests/test_socks5.py::test_socks5commandrequest_from_address[127.0.0.1:8080-\x01-\x7f\x00\x00\x01-80800] PASSED
tests/test_socks5.py::test_socks5commandrequest_from_address[127.0.0.1:8080-\x01-\x7f\x00\x00\x01-80801] PASSED
tests/test_socks5.py::test_socks5commandrequest_from_address[[0:0:0:0:0:0:0:1]:3080-\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-30800] PASSED
tests/test_socks5.py::test_socks5commandrequest_from_address[[0:0:0:0:0:0:0:1]:3080-\x04-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01-30801] PASSED
tests/test_socks5.py::test_socks5commandrequest_from_address[address0-\x01-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks5.py::test_socks5commandrequest_from_address[address1-\x01-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks5.py::test_socks5commandrequest_from_address[address4-\x01-\x7f\x00\x00\x01-3080] PASSED
tests/test_socks5.py::test_socks5commandrequest_from_address[address5-\x01-\x7f\x00\x00\x01-3080] PASSED
tests/test_utils.py::test_address_type_from_socks5atype[\x01-AddressType.IPV4] PASSED
tests/test_utils.py::test_address_type_from_socks5atype[\x03-AddressType.DN] PASSED
tests/test_utils.py::test_address_type_from_socks5atype[\x04-AddressType.IPV6] PASSED
tests/test_utils.py::test_socks5atype_unknown_address_type_raises PASSED
tests/test_utils.py::test_split_address_port_from_string[127.0.0.1:8080-127.0.0.1-8080] PASSED
tests/test_utils.py::test_split_address_port_from_string[[0:0:0:0:0:0:0:1]:3080-0:0:0:0:0:0:0:1-3080] PASSED
tests/test_utils.py::test_split_address_port_from_string_errors[127.0.0.1:] PASSED
tests/test_utils.py::test_split_address_port_from_string_errors[127.0.0.1] PASSED
tests/test_utils.py::test_split_address_port_from_string_errors[::1] PASSED
tests/test_utils.py::test_split_address_port_from_string_errors[[::1]:foobar] PASSED
======== 99 passed ========