From d815cc5521ce524f1bc024cedb064bf9be57b8c5 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 11 Mar 2023 10:59:22 -0500 Subject: [PATCH] Fix Overconstraint --- cppython/builder.py | 15 ++------------- cppython/plugins/git.py | 7 +++++-- pdm.lock | 32 ++++++++++++++++---------------- 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index 000c5cb..f670b20 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -210,17 +210,12 @@ def create_generator( cppython_data=cppython_plugin_data, ) - plugin = plugin_info.plugin_type() - plugin.configure(generator_data, core_plugin_data) - if not generator_configuration: self.logger.error( "The pyproject.toml table 'tool.cppython.generator' does not exist. Sending generator empty data", ) - plugin.activate(generator_configuration) - - return plugin + return plugin_info.plugin_type(generator_data, core_plugin_data, generator_configuration) def create_provider(self, core_data: CoreData, provider_configuration: dict[str, Any]) -> Provider: """Creates Providers from input data @@ -287,15 +282,9 @@ def create_provider(self, core_data: CoreData, provider_configuration: dict[str, cppython_data=cppython_plugin_data, ) - plugin = supported_plugin_type() - - plugin.configure(provider_data, core_plugin_data) - if not provider_configuration: self.logger.error( "The pyproject.toml table 'tool.cppython.provider' does not exist. Sending provider empty data", ) - plugin.activate(provider_configuration) - - return plugin + return supported_plugin_type(provider_data, core_plugin_data, provider_configuration) diff --git a/cppython/plugins/git.py b/cppython/plugins/git.py index d0fbaa7..846bd20 100644 --- a/cppython/plugins/git.py +++ b/cppython/plugins/git.py @@ -38,13 +38,16 @@ def information() -> Information: """ return Information() - def version(self, path: Path) -> str | None: + def version(self, path: Path) -> str: """Extracts the system's version metadata Args: path: The repository path + + Returns: + The git version """ - return None + return "" def description(self) -> str | None: """Requests extraction of the project description""" diff --git a/pdm.lock b/pdm.lock index 01d02b4..3eff2c7 100644 --- a/pdm.lock +++ b/pdm.lock @@ -63,7 +63,7 @@ dependencies = [ [[package]] name = "cppython-core" -version = "0.6.1.dev43" +version = "0.6.1.dev49" requires_python = ">=3.11" summary = "Data definitions for CPPython" dependencies = [ @@ -139,7 +139,7 @@ summary = "Utility library for gitignore style pattern matching of file paths." [[package]] name = "platformdirs" -version = "3.1.0" +version = "3.1.1" requires_python = ">=3.7" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." @@ -198,7 +198,7 @@ dependencies = [ [[package]] name = "pytest-cppython" -version = "0.3.1.dev29" +version = "0.3.1.dev31" requires_python = ">=3.11" summary = "A pytest plugin that imports CPPython testing types" dependencies = [ @@ -229,7 +229,7 @@ summary = "Backported and Experimental Type Hints for Python 3.7+" [[package]] name = "urllib3" -version = "1.26.14" +version = "1.26.15" requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" summary = "HTTP library with thread-safe connection pooling, file post, and more." @@ -340,9 +340,9 @@ content_hash = "sha256:6c4208d24350a6d735fc4f9ef0ddec2c92294b8f164526f2f2727573e {url = "https://files.pythonhosted.org/packages/f9/06/5f6555205d13f8811558b73fa37596519272fb077ad7f9faa4e4162a23a4/coverage-7.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d2ef6cae70168815ed91388948b5f4fcc69681480a0061114db737f957719f03"}, {url = "https://files.pythonhosted.org/packages/fe/0c/9c463e24ac89408c13084ddaefdb7c2d55ed2da7c556214159b261df4737/coverage-7.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:bd5a12239c0006252244f94863f1c518ac256160cd316ea5c47fb1a11b25889a"}, ] -"cppython-core 0.6.1.dev43" = [ - {url = "https://files.pythonhosted.org/packages/6c/d0/25e6c0ea7234135c8f5629ff2557bf073cc2628da6f35e7b6bbb1fb19d77/cppython-core-0.6.1.dev43.tar.gz", hash = "sha256:53d20174796866152327d7d2470fe1d17bc8d84a6890715ada327b5d940ffc1e"}, - {url = "https://files.pythonhosted.org/packages/c7/a6/765e52ca198c2181716365676032e6002bddcb7651088f20f5215c6fecd7/cppython_core-0.6.1.dev43-py3-none-any.whl", hash = "sha256:994313e7d98a1aaef01a23d2a2ef5c3710c2dbf07369a2bff45909f8353e1c08"}, +"cppython-core 0.6.1.dev49" = [ + {url = "https://files.pythonhosted.org/packages/12/86/05add459425cef70290b8799249b2953ecd82d5265ef7d381b421ca989f9/cppython-core-0.6.1.dev49.tar.gz", hash = "sha256:e29646315307d78b19e769152489041895a4b608165698a6a8a569ebaa59a351"}, + {url = "https://files.pythonhosted.org/packages/d3/ee/6241e4351930f3df79703ca5c3421f3e75d84e9b629999b4994560b3399a/cppython_core-0.6.1.dev49-py3-none-any.whl", hash = "sha256:f79e11eddc60333fe9d701dedb60439a8cbb59f32c087f88458b3698b2dfea01"}, ] "dill 0.3.6" = [ {url = "https://files.pythonhosted.org/packages/7c/e7/364a09134e1062d4d5ff69b853a56cf61c223e0afcc6906b6832bcd51ea8/dill-0.3.6.tar.gz", hash = "sha256:e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373"}, @@ -496,9 +496,9 @@ content_hash = "sha256:6c4208d24350a6d735fc4f9ef0ddec2c92294b8f164526f2f2727573e {url = "https://files.pythonhosted.org/packages/e6/be/1a973593d7ce7ac9d1a793b81eb265c152a62f34825169fbd7c4e4548e34/pathspec-0.11.0-py3-none-any.whl", hash = "sha256:3a66eb970cbac598f9e5ccb5b2cf58930cd8e3ed86d393d541eaf2d8b1705229"}, {url = "https://files.pythonhosted.org/packages/f4/8e/f91cffb32740b251cff04cad1e7cdd2c710582c735a01f56307316c148f2/pathspec-0.11.0.tar.gz", hash = "sha256:64d338d4e0914e91c1792321e6907b5a593f1ab1851de7fc269557a21b30ebbc"}, ] -"platformdirs 3.1.0" = [ - {url = "https://files.pythonhosted.org/packages/8f/5f/01180534cebac14f3a792bf2f74fc99d34531c950c308fdebd9721e85550/platformdirs-3.1.0.tar.gz", hash = "sha256:accc3665857288317f32c7bebb5a8e482ba717b474f3fc1d18ca7f9214be0cef"}, - {url = "https://files.pythonhosted.org/packages/ca/de/a33823fe54d52ea72fdae011115d737a2642d441c93b68ed17455a328e4c/platformdirs-3.1.0-py3-none-any.whl", hash = "sha256:13b08a53ed71021350c9e300d4ea8668438fb0046ab3937ac9a29913a1a1350a"}, +"platformdirs 3.1.1" = [ + {url = "https://files.pythonhosted.org/packages/79/c4/f98a05535344f79699bbd494e56ac9efc986b7a253fe9f4dba7414a7f505/platformdirs-3.1.1.tar.gz", hash = "sha256:024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa"}, + {url = "https://files.pythonhosted.org/packages/7b/e1/593f693096c50411a2bf9571f66bc3be9d0f79a4a50e95aab581458b0e3c/platformdirs-3.1.1-py3-none-any.whl", hash = "sha256:e5986afb596e4bb5bde29a79ac9061aa955b94fca2399b7aaac4090860920dd8"}, ] "pluggy 1.0.0" = [ {url = "https://files.pythonhosted.org/packages/9e/01/f38e2ff29715251cf25532b9082a1589ab7e4f571ced434f98d0139336dc/pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, @@ -554,9 +554,9 @@ content_hash = "sha256:6c4208d24350a6d735fc4f9ef0ddec2c92294b8f164526f2f2727573e {url = "https://files.pythonhosted.org/packages/ea/70/da97fd5f6270c7d2ce07559a19e5bf36a76f0af21500256f005a69d9beba/pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"}, {url = "https://files.pythonhosted.org/packages/fe/1f/9ec0ddd33bd2b37d6ec50bb39155bca4fe7085fa78b3b434c05459a860e3/pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"}, ] -"pytest-cppython 0.3.1.dev29" = [ - {url = "https://files.pythonhosted.org/packages/2e/fc/cd11a1068b527c8f008573924633a8aed3b4e2325f909938d949f9025b39/pytest_cppython-0.3.1.dev29-py3-none-any.whl", hash = "sha256:a558adc238946c6c8943de8b29f5a1f3bc1f8758670f31b8e489f55de51a91b9"}, - {url = "https://files.pythonhosted.org/packages/45/76/3dfc707e2dd8674fcb2ed1b905d31f3b5e664d21c289add100a582d072c9/pytest-cppython-0.3.1.dev29.tar.gz", hash = "sha256:025fa540028c22b171435807d5412764c035612007edee0af4360e5a05324a42"}, +"pytest-cppython 0.3.1.dev31" = [ + {url = "https://files.pythonhosted.org/packages/18/3e/a145f260bc0f0c72c7bc179776b86013351dbb954238c91a7c05fd2b0c62/pytest_cppython-0.3.1.dev31-py3-none-any.whl", hash = "sha256:ec40032acf94247ed885280e8015700fdea42538b5d07680f0d98c91a78a1be8"}, + {url = "https://files.pythonhosted.org/packages/9a/60/5ec0d2bb4552e9debd38c4657572f954b78193902de98606f6c8b5017e38/pytest-cppython-0.3.1.dev31.tar.gz", hash = "sha256:23e54f4473fa6d4a817f1c59e56ce518e76ecdf1f1ae3234a6cf5f133c2b8678"}, ] "pytest-mock 3.10.0" = [ {url = "https://files.pythonhosted.org/packages/91/84/c951790e199cd54ddbf1021965b62a5415b81193ebdb4f4af2659fd06a73/pytest_mock-3.10.0-py3-none-any.whl", hash = "sha256:f4c973eeae0282963eb293eb173ce91b091a79c1334455acfac9ddee8a1c784b"}, @@ -570,9 +570,9 @@ content_hash = "sha256:6c4208d24350a6d735fc4f9ef0ddec2c92294b8f164526f2f2727573e {url = "https://files.pythonhosted.org/packages/31/25/5abcd82372d3d4a3932e1fa8c3dbf9efac10cc7c0d16e78467460571b404/typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, {url = "https://files.pythonhosted.org/packages/d3/20/06270dac7316220643c32ae61694e451c98f8caf4c8eab3aa80a2bedf0df/typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, ] -"urllib3 1.26.14" = [ - {url = "https://files.pythonhosted.org/packages/c5/52/fe421fb7364aa738b3506a2d99e4f3a56e079c0a798e9f4fa5e14c60922f/urllib3-1.26.14.tar.gz", hash = "sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72"}, - {url = "https://files.pythonhosted.org/packages/fe/ca/466766e20b767ddb9b951202542310cba37ea5f2d792dae7589f1741af58/urllib3-1.26.14-py2.py3-none-any.whl", hash = "sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"}, +"urllib3 1.26.15" = [ + {url = "https://files.pythonhosted.org/packages/21/79/6372d8c0d0641b4072889f3ff84f279b738cd8595b64c8e0496d4e848122/urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"}, + {url = "https://files.pythonhosted.org/packages/7b/f5/890a0baca17a61c1f92f72b81d3c31523c99bec609e60c292ea55b387ae8/urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"}, ] "wrapt 1.15.0" = [ {url = "https://files.pythonhosted.org/packages/0c/6e/f80c23efc625c10460240e31dcb18dd2b34b8df417bc98521fbfd5bc2e9a/wrapt-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:21f6d9a0d5b3a207cdf7acf8e58d7d13d463e639f0c7e01d82cdb671e6cb7923"},