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

remove dependency on six #177

Merged
merged 1 commit into from
Feb 7, 2022
Merged

Conversation

zeromind
Copy link
Collaborator

Remove dependency on the six module, which was left over from the Python 2/3 compat.

resolves #176

@zeromind zeromind marked this pull request as draft January 11, 2022 16:37
@zeromind zeromind changed the title [WIP] remove dependency on six remove dependency on six Jan 12, 2022
@zeromind zeromind force-pushed the remove_six branch 2 times, most recently from f878ac0 to 58f45f3 Compare February 4, 2022 15:47
as Python2 is not supported anymore, remove the
compatiblility layer provided by the six module

this fixes `TXT::test_parse` and `test_validate_strings`
by creating the proper output bytes in `_unescapify_from()`
Copy link
Collaborator Author

@zeromind zeromind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest without e92e477: 10 failed, 184 passed, 331 warnings

=================================================================================================================================================================================================================================== short test summary info ===================================================================================================================================================================================================================================
FAILED tests/allocator_test.py::AllocatorTest::test_delegation_not_subnet - sqlalchemy.exc.IntegrityError: (MySQLdb._exceptions.IntegrityError) (1062, "Duplicate entry '83076749736557242056487941267521536-64-9' for key 'address'")
FAILED tests/commands_test.py::CommandsTest::test_pool_report - AssertionError: assert '444 IPs are still free' in 'Pool pool\ndays                     1                    7                   30\nusage                   24          ...             64\n444.0 IPs are still free\nBased on data from the last 30 days, the pool will be full in 208.1 days.\n'
FAILED tests/commands_test.py::CommandsTest::test_pool_reportv6 - AssertionError: assert '448 /64 blocks are still free' in 'Pool pool\ndays                     1                    7                   30\nusage                   20          ...      60\n448.0 /64 blocks are still free\nBased on data from the last 30 days, the pool will be full in 224.0 days.\n'
FAILED tests/dns_test.py::test_validate_strings - ValueError: Invalid escape sequence: \223
FAILED tests/dns_test.py::TXT::test_parse - dim.errors.InvalidParameterError: Invalid escape sequence: \100
FAILED tests/dns_test.py::RRReferencesTest::test_edit_comment_ttl - AssertionError: assert {'graph': {1:...}], 'root': 2} == {'graph': {1:...}], 'root': 2}
FAILED tests/dns_test.py::RRReferencesTest::test_get_references - AssertionError: assert {'graph': {1:...}], 'root': 2} == {'graph': {1:...}], 'root': 2}
FAILED tests/pool_test.py::PoolTest::test_list_ippools_pagination - TypeError: _ippool_query() missing 1 required positional argument: 'layer3domain'
FAILED tests/pool_test.py::PoolTest::test_priority - TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
FAILED tests/rights_test.py::RightsMatrixTest::test_ippool_list - AssertionError: assert [{'can_alloca...'vlan': None}] == [{'can_alloca...'vlan': None}]
================================================================================================================================================================================================================== 10 failed, 184 passed, 331 warnings in 112.21s (0:01:52) ===================================================================================================================================================================================================================

pytest with e92e477: 8 failed, 186 passed, 334 warnings

=================================================================================================================================================================================================================================== short test summary info ===================================================================================================================================================================================================================================
FAILED tests/allocator_test.py::AllocatorTest::test_delegation_not_subnet - sqlalchemy.exc.IntegrityError: (MySQLdb._exceptions.IntegrityError) (1062, "Duplicate entry '83076749736557242056487941267521536-64-9' for key 'address'")
FAILED tests/commands_test.py::CommandsTest::test_pool_report - AssertionError: assert '444 IPs are still free' in 'Pool pool\ndays                     1                    7                   30\nusage                   24          ...             64\n444.0 IPs are still free\nBased on data from the last 30 days, the pool will be full in 208.1 days.\n'
FAILED tests/commands_test.py::CommandsTest::test_pool_reportv6 - AssertionError: assert '448 /64 blocks are still free' in 'Pool pool\ndays                     1                    7                   30\nusage                   20          ...      60\n448.0 /64 blocks are still free\nBased on data from the last 30 days, the pool will be full in 224.0 days.\n'
FAILED tests/dns_test.py::RRReferencesTest::test_edit_comment_ttl - AssertionError: assert {'graph': {1:...}], 'root': 2} == {'graph': {1:...}], 'root': 2}
FAILED tests/dns_test.py::RRReferencesTest::test_get_references - AssertionError: assert {'graph': {1:...}], 'root': 2} == {'graph': {1:...}], 'root': 2}
FAILED tests/pool_test.py::PoolTest::test_list_ippools_pagination - TypeError: _ippool_query() missing 1 required positional argument: 'layer3domain'
FAILED tests/pool_test.py::PoolTest::test_priority - TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
FAILED tests/rights_test.py::RightsMatrixTest::test_ippool_list - AssertionError: assert [{'can_alloca...'vlan': None}] == [{'can_alloca...'vlan': None}]
=================================================================================================================================================================================================================== 8 failed, 186 passed, 334 warnings in 109.51s (0:01:49) ===================================================================================================================================================================================================================

@zeromind zeromind marked this pull request as ready for review February 4, 2022 16:12
@zeromind zeromind requested a review from Srudush February 4, 2022 16:12
@zeromind
Copy link
Collaborator Author

zeromind commented Feb 4, 2022

Takes care of 2 string validation tests from #198

@Srudush
Copy link
Contributor

Srudush commented Feb 7, 2022

As far as I can tell, this looks okay. Lets merge it

@Srudush Srudush merged commit b34c627 into ionos-cloud:master Feb 7, 2022
@zeromind zeromind deleted the remove_six branch February 7, 2022 11:47
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

Successfully merging this pull request may close these issues.

remove dependency on six
2 participants