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

`poetry lock' breaks tests for poetry itself #3404

Closed
3 tasks done
hexchain opened this issue Nov 23, 2020 · 2 comments
Closed
3 tasks done

`poetry lock' breaks tests for poetry itself #3404

hexchain opened this issue Nov 23, 2020 · 2 comments
Labels
area/testing Related to the test suite

Comments

@hexchain
Copy link

Issue

In the poetry repository, if I run poetry lock before poetry install and poetry run pytest tests, some tests fail:

Results (39.02s):
     604 passed
      35 failed
         - tests/console/commands/test_publish.py:9 test_publish_returns_non_zero_code_for_upload_errors
         - tests/console/commands/test_publish.py:33 test_publish_returns_non_zero_code_for_connection_errors
         - tests/console/commands/test_search.py:23 test_search
         - tests/installation/test_authenticator.py:19 test_authenticator_uses_url_provided_credentials
         - tests/installation/test_authenticator.py:35 test_authenticator_uses_credentials_from_config_if_not_provided
         - tests/installation/test_authenticator.py:53 test_authenticator_uses_username_only_credentials
         - tests/installation/test_authenticator.py:69 test_authenticator_uses_password_only_credentials
         - tests/installation/test_authenticator.py:85 test_authenticator_uses_empty_strings_as_default_password
         - tests/installation/test_authenticator.py:103 test_authenticator_uses_empty_strings_as_default_username
         - tests/installation/test_authenticator.py:121 test_authenticator_request_retries_on_exception
         - tests/installation/test_authenticator.py:141 test_authenticator_request_raises_exception_when_attempts_exhausted
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[400-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[401-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[403-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[404-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[500-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[502-5]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[503-5]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[504-5]
         - tests/installation/test_authenticator.py:191 test_authenticator_uses_env_provided_credentials
         - tests/installation/test_chooser.py:84 test_chooser_chooses_universal_wheel_link_if_available[]
         - tests/installation/test_chooser.py:84 test_chooser_chooses_universal_wheel_link_if_available[legacy]
         - tests/installation/test_chooser.py:105 test_chooser_chooses_specific_python_universal_wheel_link_if_available[]
         - tests/installation/test_chooser.py:105 test_chooser_chooses_specific_python_universal_wheel_link_if_available[legacy]
         - tests/installation/test_chooser.py:126 test_chooser_chooses_system_specific_wheel_link_if_available[]
         - tests/installation/test_chooser.py:126 test_chooser_chooses_system_specific_wheel_link_if_available[legacy]
         - tests/installation/test_chooser.py:150 test_chooser_chooses_sdist_if_no_compatible_wheel_link_is_available[]
         - tests/installation/test_chooser.py:150 test_chooser_chooses_sdist_if_no_compatible_wheel_link_is_available[legacy]
         - tests/installation/test_chooser.py:171 test_chooser_chooses_distributions_that_match_the_package_hashes[]
         - tests/installation/test_chooser.py:171 test_chooser_chooses_distributions_that_match_the_package_hashes[legacy]
         - tests/installation/test_executor.py:66 test_execute_executes_a_batch_of_operations
         - tests/publishing/test_uploader.py:17 test_uploader_properly_handles_400_errors
         - tests/publishing/test_uploader.py:27 test_uploader_properly_handles_403_errors
         - tests/publishing/test_uploader.py:37 test_uploader_properly_handles_301_redirects
         - tests/publishing/test_uploader.py:49 test_uploader_registers_for_appropriate_400_errors
       4 skipped

Downgrading urllib3 to 1.25.10, or pinning requests to 2.24.*, fixes the issue. It seems that httpretty is not compatible with urllib3>=1.26.

@hexchain hexchain added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 23, 2020
abn added a commit to abn/poetry that referenced this issue Nov 23, 2020
abn added a commit to abn/poetry that referenced this issue Nov 23, 2020
@abn abn added area/testing Related to the test suite and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 23, 2020
@abn
Copy link
Member

abn commented Nov 23, 2020

Mitigation added via 361c871 add in #3405.

kasteph pushed a commit that referenced this issue Nov 24, 2020
* Remove python 2.7/3.5 compatibility code

This change removes code, dependencies and tests related to python 2.7
and 3.5 compatibility. The minimum supported runtime python version
for poetry is now 3.6.

* tests: mitigate httpretty urllib incompatibility

Relates-to: #3404
Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/testing Related to the test suite
Projects
None yet
Development

No branches or pull requests

3 participants