Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest to loosen the dependency on schema #57

Open
Agnes-U opened this issue Jul 6, 2022 · 1 comment
Open

Suggest to loosen the dependency on schema #57

Agnes-U opened this issue Jul 6, 2022 · 1 comment

Comments

@Agnes-U
Copy link

Agnes-U commented Jul 6, 2022

Hi, your project pyknow requires "schema==0.6.7" in its dependency. After analyzing the source code, we found that the following versions of schema can also be suitable without affecting your project, i.e., schema 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.8. Therefore, we suggest to loosen the dependency on schema from "schema==0.6.7" to "schema>=0.5.0,<=0.6.8" to avoid any possible conflict for importing more packages or for downstream projects that may use pyknow.

May I pull a request to further loosen the dependency on schema?

By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



We also give our detailed analysis as follows for your reference:

Your project pyknow directly uses 1 APIs from package schema.

schema.Schema.__init__

Beginning from the 1 APIs above, -1 functions are then indirectly called, including -1 schema's internal APIs and 0 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).

[/buguroo/pyknow]
+--schema.Schema.__init__

We scan schema's versions and observe that during its evolution between any version from [0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.8] and 0.6.7, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).

diff: 0.6.7(original) 0.5.0
['schema.schema.SchemaError.code', 'schema.schema.Const.validate', 'schema.test_schema.test_dict_key_error', 'schema.test_schema.test_strictly', 'schema.schema.Optional.__hash__', 'schema.schema.SchemaForbiddenKeyError', 'schema.schema.And.validate', 'schema.schema.SchemaUnexpectedTypeError', 'schema.schema.Regex.validate', 'schema.test_schema.test_inheritance', 'schema.test_schema.test_schema_repr', 'schema.test_schema.test_ignore_extra_keys_validation_and_return_keys', 'schema.test_schema.test_schema_error_handling', 'schema.schema.Const', 'schema.test_schema.test_dict', 'schema.test_schema.test_ignore_extra_keys', 'schema.schema.Optional', 'schema.schema.Use', 'schema.test_schema.test_issue_9_prioritized_key_comparison_in_dicts', 'schema.schema.Regex.__init__', 'schema.test_schema.test_and_error_handling', 'schema.schema.Regex.__repr__', 'schema.test_schema.test_or_error_handling', 'schema.test_schema.ve', 'schema.schema.And.__init__', 'schema.test_schema.test_issue_56_cant_rely_on_callables_to_have_name', 'schema.test_schema.test_regex', 'schema.schema.Or', 'schema.test_schema.test_optional_key_convert_failed_randomly_while_with_another_optional_object', 'schema.schema.And', 'schema.schema.Or.validate', 'schema.schema.Forbidden.__init__', 'schema.test_schema.test_issue_9_prioritized_key_comparison', 'schema.test_schema.test_missing_keys_exception_with_non_str_dict_keys', 'schema.test_schema.test_validate_list', 'schema.test_schema.test_dict_keys', 'schema.test_schema.test_copy', 'schema.schema.SchemaMissingKeyError', 'schema.test_schema.se', 'schema.test_schema.test_complex', 'schema.test_schema.test_validate_object', 'schema.test_schema.test_dict_forbidden_keys', 'schema.schema.SchemaError', 'schema.test_schema.test_dict_subtypes', 'schema.schema.Forbidden', 'schema.schema.SchemaWrongKeyError', 'schema.test_schema.test_or', 'schema.test_schema.test_use_error_handling', 'schema.test_schema.test_validate_file', 'schema.test_schema.test_error_reporting', 'schema.schema.Regex', 'schema.test_schema.test_schema', 'schema.schema.Use.validate', 'schema.test_schema.test_nice_errors', 'schema.schema.Schema._dict_key_priority', 'schema.test_schema.test_exception_handling_with_bad_validators', 'schema.test_schema.test_and', 'schema.test_schema.test_dict_optional_keys', 'schema.schema.Schema.validate', 'schema.schema.Schema', 'schema.test_schema.test_issue_83_iterable_validation_return_type', 'schema.test_schema.test_list_tuple_set_frozenset', 'schema.test_schema.test_test', 'schema.test_schema.test_dict_optional_defaults', 'schema.schema.Optional.__eq__', 'schema.schema.SchemaError.__init__', 'schema.test_schema.test_use_json']

diff: 0.6.7(original) 0.6.0
['schema.schema.SchemaError.code', 'schema.schema.Const.validate', 'schema.test_schema.test_dict_key_error', 'schema.test_schema.test_strictly', 'schema.schema.Optional.__hash__', 'schema.schema.SchemaForbiddenKeyError', 'schema.schema.And.validate', 'schema.schema.SchemaUnexpectedTypeError', 'schema.schema.Regex.validate', 'schema.test_schema.test_inheritance', 'schema.test_schema.test_schema_repr', 'schema.test_schema.test_ignore_extra_keys_validation_and_return_keys', 'schema.test_schema.test_schema_error_handling', 'schema.schema.Const', 'schema.test_schema.test_dict', 'schema.test_schema.test_ignore_extra_keys', 'schema.schema.Optional', 'schema.schema.Use', 'schema.test_schema.test_issue_9_prioritized_key_comparison_in_dicts', 'schema.test_schema.test_and_error_handling', 'schema.test_schema.test_or_error_handling', 'schema.test_schema.ve', 'schema.schema.And.__init__', 'schema.test_schema.test_issue_56_cant_rely_on_callables_to_have_name', 'schema.test_schema.test_regex', 'schema.schema.Or', 'schema.test_schema.test_optional_key_convert_failed_randomly_while_with_another_optional_object', 'schema.schema.And', 'schema.schema.Or.validate', 'schema.schema.Forbidden.__init__', 'schema.test_schema.test_issue_9_prioritized_key_comparison', 'schema.test_schema.test_missing_keys_exception_with_non_str_dict_keys', 'schema.test_schema.test_validate_list', 'schema.test_schema.test_dict_keys', 'schema.test_schema.test_copy', 'schema.schema.SchemaMissingKeyError', 'schema.test_schema.se', 'schema.test_schema.test_complex', 'schema.test_schema.test_validate_object', 'schema.test_schema.test_dict_forbidden_keys', 'schema.schema.SchemaError', 'schema.test_schema.test_dict_subtypes', 'schema.schema.Forbidden', 'schema.schema.SchemaWrongKeyError', 'schema.test_schema.test_or', 'schema.test_schema.test_use_error_handling', 'schema.test_schema.test_validate_file', 'schema.test_schema.test_error_reporting', 'schema.schema.Regex', 'schema.test_schema.test_schema', 'schema.schema.Use.validate', 'schema.test_schema.test_nice_errors', 'schema.schema.Schema._dict_key_priority', 'schema.test_schema.test_exception_handling_with_bad_validators', 'schema.test_schema.test_and', 'schema.test_schema.test_dict_optional_keys', 'schema.schema.Schema.validate', 'schema.schema.Schema', 'schema.test_schema.test_issue_83_iterable_validation_return_type', 'schema.test_schema.test_list_tuple_set_frozenset', 'schema.test_schema.test_test', 'schema.test_schema.test_dict_optional_defaults', 'schema.schema.Optional.__eq__', 'schema.schema.SchemaError.__init__', 'schema.test_schema.test_use_json']

diff: 0.6.7(original) 0.6.1
['schema.schema.SchemaError.code', 'schema.schema.Const.validate', 'schema.test_schema.test_dict_key_error', 'schema.test_schema.test_strictly', 'schema.schema.Optional.__hash__', 'schema.schema.SchemaForbiddenKeyError', 'schema.schema.And.validate', 'schema.schema.SchemaUnexpectedTypeError', 'schema.schema.Regex.validate', 'schema.test_schema.test_inheritance', 'schema.test_schema.test_schema_repr', 'schema.test_schema.test_ignore_extra_keys_validation_and_return_keys', 'schema.test_schema.test_schema_error_handling', 'schema.schema.Const', 'schema.test_schema.test_dict', 'schema.test_schema.test_ignore_extra_keys', 'schema.schema.Optional', 'schema.schema.Use', 'schema.test_schema.test_issue_9_prioritized_key_comparison_in_dicts', 'schema.test_schema.test_and_error_handling', 'schema.test_schema.test_or_error_handling', 'schema.test_schema.ve', 'schema.schema.And.__init__', 'schema.test_schema.test_issue_56_cant_rely_on_callables_to_have_name', 'schema.test_schema.test_regex', 'schema.schema.Or', 'schema.test_schema.test_optional_key_convert_failed_randomly_while_with_another_optional_object', 'schema.schema.And', 'schema.schema.Or.validate', 'schema.schema.Forbidden.__init__', 'schema.test_schema.test_issue_9_prioritized_key_comparison', 'schema.test_schema.test_missing_keys_exception_with_non_str_dict_keys', 'schema.test_schema.test_validate_list', 'schema.test_schema.test_dict_keys', 'schema.test_schema.test_copy', 'schema.schema.SchemaMissingKeyError', 'schema.test_schema.se', 'schema.test_schema.test_complex', 'schema.test_schema.test_validate_object', 'schema.test_schema.test_dict_forbidden_keys', 'schema.schema.SchemaError', 'schema.test_schema.test_dict_subtypes', 'schema.schema.Forbidden', 'schema.schema.SchemaWrongKeyError', 'schema.test_schema.test_or', 'schema.test_schema.test_use_error_handling', 'schema.test_schema.test_validate_file', 'schema.test_schema.test_error_reporting', 'schema.schema.Regex', 'schema.test_schema.test_schema', 'schema.schema.Use.validate', 'schema.test_schema.test_nice_errors', 'schema.schema.Schema._dict_key_priority', 'schema.test_schema.test_exception_handling_with_bad_validators', 'schema.test_schema.test_and', 'schema.test_schema.test_dict_optional_keys', 'schema.schema.Schema.validate', 'schema.schema.Schema', 'schema.test_schema.test_issue_83_iterable_validation_return_type', 'schema.test_schema.test_list_tuple_set_frozenset', 'schema.test_schema.test_test', 'schema.test_schema.test_dict_optional_defaults', 'schema.schema.Optional.__eq__', 'schema.schema.SchemaError.__init__', 'schema.test_schema.test_use_json']

diff: 0.6.7(original) 0.6.2
['schema.schema.SchemaError.code', 'schema.schema.Const.validate', 'schema.test_schema.test_dict_key_error', 'schema.test_schema.test_strictly', 'schema.schema.Optional.__hash__', 'schema.schema.SchemaForbiddenKeyError', 'schema.schema.And.validate', 'schema.schema.SchemaUnexpectedTypeError', 'schema.schema.Regex.validate', 'schema.test_schema.test_inheritance', 'schema.test_schema.test_schema_repr', 'schema.test_schema.test_ignore_extra_keys_validation_and_return_keys', 'schema.test_schema.test_schema_error_handling', 'schema.schema.Const', 'schema.test_schema.test_dict', 'schema.test_schema.test_ignore_extra_keys', 'schema.schema.Optional', 'schema.schema.Use', 'schema.test_schema.test_issue_9_prioritized_key_comparison_in_dicts', 'schema.test_schema.test_and_error_handling', 'schema.test_schema.test_or_error_handling', 'schema.test_schema.ve', 'schema.schema.And.__init__', 'schema.test_schema.test_issue_56_cant_rely_on_callables_to_have_name', 'schema.test_schema.test_regex', 'schema.schema.Or', 'schema.test_schema.test_optional_key_convert_failed_randomly_while_with_another_optional_object', 'schema.schema.And', 'schema.schema.Or.validate', 'schema.schema.Forbidden.__init__', 'schema.test_schema.test_issue_9_prioritized_key_comparison', 'schema.test_schema.test_missing_keys_exception_with_non_str_dict_keys', 'schema.test_schema.test_validate_list', 'schema.test_schema.test_dict_keys', 'schema.test_schema.test_copy', 'schema.schema.SchemaMissingKeyError', 'schema.test_schema.se', 'schema.test_schema.test_complex', 'schema.test_schema.test_validate_object', 'schema.test_schema.test_dict_forbidden_keys', 'schema.schema.SchemaError', 'schema.test_schema.test_dict_subtypes', 'schema.schema.Forbidden', 'schema.schema.SchemaWrongKeyError', 'schema.test_schema.test_or', 'schema.test_schema.test_use_error_handling', 'schema.test_schema.test_validate_file', 'schema.test_schema.test_error_reporting', 'schema.schema.Regex', 'schema.test_schema.test_schema', 'schema.schema.Use.validate', 'schema.test_schema.test_nice_errors', 'schema.schema.Schema._dict_key_priority', 'schema.test_schema.test_exception_handling_with_bad_validators', 'schema.test_schema.test_and', 'schema.test_schema.test_dict_optional_keys', 'schema.schema.Schema.validate', 'schema.schema.Schema', 'schema.test_schema.test_issue_83_iterable_validation_return_type', 'schema.test_schema.test_list_tuple_set_frozenset', 'schema.test_schema.test_test', 'schema.test_schema.test_dict_optional_defaults', 'schema.schema.Optional.__eq__', 'schema.schema.SchemaError.__init__', 'schema.test_schema.test_use_json']

diff: 0.6.7(original) 0.6.3
['schema.schema.Const.validate', 'schema.test_schema.test_dict_key_error', 'schema.schema.Optional.__hash__', 'schema.schema.SchemaForbiddenKeyError', 'schema.schema.And.validate', 'schema.test_schema.test_inheritance', 'schema.test_schema.test_ignore_extra_keys_validation_and_return_keys', 'schema.schema.Const', 'schema.test_schema.test_ignore_extra_keys', 'schema.schema.Optional', 'schema.schema.And.__init__', 'schema.schema.Or', 'schema.schema.And', 'schema.schema.Or.validate', 'schema.schema.Forbidden.__init__', 'schema.test_schema.test_copy', 'schema.test_schema.test_dict_forbidden_keys', 'schema.schema.SchemaError', 'schema.schema.Forbidden', 'schema.schema.Schema._dict_key_priority', 'schema.test_schema.test_dict_optional_keys', 'schema.schema.Schema.validate', 'schema.schema.Schema', 'schema.test_schema.test_test', 'schema.schema.Optional.__eq__', 'schema.schema.SchemaError.__init__']

diff: 0.6.7(original) 0.6.4
['schema.schema.Const.validate', 'schema.test_schema.test_dict_key_error', 'schema.schema.Optional.__hash__', 'schema.schema.SchemaForbiddenKeyError', 'schema.schema.And.validate', 'schema.test_schema.test_inheritance', 'schema.test_schema.test_ignore_extra_keys_validation_and_return_keys', 'schema.schema.Const', 'schema.test_schema.test_ignore_extra_keys', 'schema.schema.Optional', 'schema.schema.And.__init__', 'schema.schema.Or', 'schema.schema.And', 'schema.schema.Or.validate', 'schema.schema.Forbidden.__init__', 'schema.test_schema.test_copy', 'schema.test_schema.test_dict_forbidden_keys', 'schema.schema.SchemaError', 'schema.schema.Forbidden', 'schema.schema.Schema._dict_key_priority', 'schema.test_schema.test_dict_optional_keys', 'schema.schema.Schema.validate', 'schema.schema.Schema', 'schema.test_schema.test_test', 'schema.schema.Optional.__eq__', 'schema.schema.SchemaError.__init__']

diff: 0.6.7(original) 0.6.5
['schema.schema.Const.validate', 'schema.test_schema.test_dict_key_error', 'schema.schema.Optional.__hash__', 'schema.schema.SchemaForbiddenKeyError', 'schema.schema.And.validate', 'schema.test_schema.test_inheritance', 'schema.test_schema.test_ignore_extra_keys_validation_and_return_keys', 'schema.schema.Const', 'schema.test_schema.test_ignore_extra_keys', 'schema.schema.Optional', 'schema.schema.And.__init__', 'schema.schema.Or', 'schema.schema.And', 'schema.schema.Or.validate', 'schema.schema.Forbidden.__init__', 'schema.test_schema.test_dict_forbidden_keys', 'schema.schema.Forbidden', 'schema.schema.Schema._dict_key_priority', 'schema.test_schema.test_dict_optional_keys', 'schema.schema.Schema.validate', 'schema.schema.Schema', 'schema.test_schema.test_test', 'schema.schema.Optional.__eq__']

diff: 0.6.7(original) 0.6.6
['schema.schema.Schema._dict_key_priority', 'schema.schema.Optional', 'schema.schema.Const.validate', 'schema.test_schema.test_dict_optional_keys', 'schema.schema.SchemaMissingKeyError', 'schema.schema.Optional.__hash__', 'schema.schema.Schema.validate', 'schema.schema.SchemaForbiddenKeyError', 'schema.schema.Schema', 'schema.test_schema.test_dict_forbidden_keys', 'schema.test_schema.test_test', 'schema.schema.Forbidden.__init__', 'schema.schema.Forbidden', 'schema.schema.Const', 'schema.schema.Optional.__eq__']

diff: 0.6.7(original) 0.6.8
['schema.schema.SchemaMissingKeyError', 'schema.schema.Or', 'schema.schema.Schema', 'schema.schema.Or.validate', 'schema.schema.Schema.is_valid']

Therefore, we believe that it is quite safe to loose your dependency on schema from "schema==0.6.7" to "schema>=0.5.0,<=0.6.8". This will improve the applicability of pyknow and reduce the possibility of any further dependency conflict with other projects.

@XayOn
Copy link
Contributor

XayOn commented Nov 21, 2022

Hi @Agnes-U, not sure if buguroo is still mantaining this repo. I'd recommend you to checkout experta, pyknow's main author's fork: https://github.com/nilp0inter/experta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants