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

Strip local version labels from Packages from PackageInfo #4219

Closed
wants to merge 232 commits into from
Closed

Strip local version labels from Packages from PackageInfo #4219

wants to merge 232 commits into from

Conversation

vedosis
Copy link

@vedosis vedosis commented Jun 26, 2021

Pull Request Check List

Resolves: #2613

  • Added tests for changed code.
  • Updated documentation for changed code.

RE: Documentation... I can't see anywhere the documentation would need to be updated. If it does, point me at it and I'll work it over.

$ poetry run pre-commit run --all-files
black....................................................................Passed
flake8...................................................................Passed
isort....................................................................Passed
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Debug Statements (Python)................................................Passed

$ poetry run pytest tests/
Test session starts (platform: linux, Python 3.8.5, pytest 5.4.3, pytest-sugar 0.9.4)
rootdir: /mnt/d/Source/poetry
plugins: cov-2.12.1, mock-1.13.0, sugar-0.9.4
collecting ...
 tests/test_factory.py ✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                             2% ▎
 tests/config/test_config.py ✓✓✓✓✓✓✓                                                                                                                                                                                                           3% ▍
 tests/console/commands/test_about.py ✓                                                                                                                                                                                                        3% ▍
 tests/console/commands/test_add.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                              7% ▊
                                    ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                             12% █▎
 tests/console/commands/test_cache.py ✓✓                                                                                                                                                                                                      12% █▎
 tests/console/commands/test_check.py ✓✓                                                                                                                                                                                                      12% █▎
 tests/console/commands/test_config.py ✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                             14% █▌
 tests/console/commands/test_export.py ✓✓✓✓✓✓                                                                                                                                                                                                 15% █▌
 tests/console/commands/test_init.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                       18% █▊
 tests/console/commands/test_lock.py ✓                                                                                                                                                                                                        18% █▊
 tests/console/commands/test_publish.py ✓✓s✓✓✓                                                                                                                                                                                                19% █▉
 tests/console/commands/test_run.py ✓                                                                                                                                                                                                         19% █▉
 tests/console/commands/test_search.py ✓                                                                                                                                                                                                      19% █▉
 tests/console/commands/test_show.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                       22% ██▎
 tests/console/commands/test_version.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                               25% ██▌
 tests/console/commands/debug/test_resolve.py ✓✓✓                                                                                                                                                                                             26% ██▋
 tests/console/commands/env/test_info.py ✓✓                                                                                                                                                                                                   26% ██▋
 tests/console/commands/env/test_list.py ✓✓✓                                                                                                                                                                                                  26% ██▋
 tests/console/commands/env/test_remove.py ✓✓                                                                                                                                                                                                 27% ██▊
 tests/console/commands/env/test_use.py ✓✓✓                                                                                                                                                                                                   27% ██▊
 tests/console/commands/self/test_update.py ✓✓                                                                                                                                                                                                28% ██▊
 tests/inspection/test_info.py ✓✓✓✓✓✓✓✓✓s✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                         31% ███▏
 tests/installation/test_authenticator.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                   34% ███▍
 tests/installation/test_chef.py ✓✓✓                                                                                                                                                                                                          34% ███▌
 tests/installation/test_chooser.py ✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                36% ███▋
 tests/installation/test_executor.py ✓✓✓✓✓✓                                                                                                                                                                                                   36% ███▋
 tests/installation/test_installer.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓s✓✓✓✓✓✓✓✓✓                                                                                                                                                              43% ████▍
 tests/installation/test_installer_old.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓s✓✓✓✓✓✓✓✓                                                                                                                                                            49% ████▉
 tests/installation/test_pip_installer.py ✓✓✓✓✓✓✓✓                                                                                                                                                                                            50% █████
 tests/masonry/builders/test_editable_builder.py ✓✓✓✓                                                                                                                                                                                         51% █████▏
 tests/mixology/solutions/providers/test_python_requirement_solution_provider.py ✓✓                                                                                                                                                           51% █████▎
 tests/mixology/solutions/solutions/test_python_requirement_solution.py ✓                                                                                                                                                                     51% █████▎
 tests/mixology/version_solver/test_backtracking.py ✓✓✓✓✓✓✓✓                                                                                                                                                                                  53% █████▍
 tests/mixology/version_solver/test_basic_graph.py ✓✓✓✓                                                                                                                                                                                       53% █████▍
 tests/mixology/version_solver/test_python_constraint.py ✓                                                                                                                                                                                    53% █████▍
 tests/mixology/version_solver/test_unsolvable.py ✓✓✓✓✓                                                                                                                                                                                       54% █████▌
 tests/mixology/version_solver/test_with_lock.py ✓✓✓✓✓                                                                                                                                                                                        55% █████▌
 tests/packages/test_locker.py ✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                  57% █████▊
 tests/publishing/test_publisher.py ✓✓✓✓✓✓✓✓                                                                                                                                                                                                  58% █████▊
 tests/publishing/test_uploader.py ✓✓✓                                                                                                                                                                                                        58% █████▉
 tests/puzzle/test_provider.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                          62% ██████▎
 tests/puzzle/test_solver.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                  76% ███████▋
 tests/repositories/test_installed_repository.py ✓✓✓✓✓✓✓✓✓                                                                                                                                                                                    78% ███████▊
 tests/repositories/test_legacy_repository.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                          81% ████████▏
 tests/repositories/test_pool.py ✓✓✓✓✓✓✓                                                                                                                                                                                                      82% ████████▎
 tests/repositories/test_pypi_repository.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                   84% ████████▌
 tests/utils/test_env.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                   90% ████████▉
 tests/utils/test_env_site.py ✓✓                                                                                                                                                                                                              90% █████████
 tests/utils/test_exporter.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                  94% █████████▌
 tests/utils/test_extras.py ✓✓✓✓✓✓✓                                                                                                                                                                                                           96% █████████▋
 tests/utils/test_helpers.py ✓✓✓                                                                                                                                                                                                              96% █████████▋
 tests/utils/test_password_manager.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                                                                         98% █████████▉
 tests/utils/test_patterns.py ✓✓                                                                                                                                                                                                              99% █████████▉
 tests/utils/test_setup_reader.py ✓✓✓✓✓✓✓✓✓                                                                                                                                                                                                  100% ██████████
===================================================================================================================== warnings summary =====================================================================================================================
tests/helpers.py:139
  /mnt/d/Source/poetry/tests/helpers.py:139: PytestCollectionWarning: cannot collect test class 'TestApplication' because it has a __init__ constructor (from: tests/console/commands/test_init.py)
    class TestApplication(Application):

-- Docs: https://docs.pytest.org/en/latest/warnings.html

Results (160.01s):
     649 passed
       4 skipped

Nicklas Tegner and others added 30 commits October 1, 2020 21:35
* fix #1969

* Added newline
Fixes #3026

If the context wrapped by the temporary_directory() context manager
raised ImportError (for example because distutils.util cannot be
imported, #721 #1837), it would previously keep going, causing a
RuntimeError from contextlib:

    RuntimeError: generator didn't stop after throw()
This change ensures that we create closer to reality scenarios when
testing init command.

Relates-to: #3073
This change ensures that we resolve dependencies to correctly propagate
markers when using `lock --no-update`.

Resolves: #3048
This change ensures that package inspection will handle rich core
metadata available for poetry managed projects. This will allow, nested
local path dependencies to use "develop" mode packages.

Resolves: #3098
This change, moves common functionality from exporter into the locker
to allow for sharing of logic that can generate `DependencyPackage`
instances given a a list of requirements using the lock data.

(cherry picked from commit c2adb32)
abn and others added 12 commits June 1, 2021 16:41
When installing poetry < 1.2.0a1 add a warning indicating the breakage
of `self update` command usage.

Relates-to: #4040
replace f-string in get-poetry by `.format()` for python2 compatibility
Fix documentation relative reference
Fix locked information for path, url and VCS dependencies
* handle poetry init non-interactive dependencies

1. in non-interactive mode, suppress "This command will guide you through..."
2. in interactive mode, respect command line --dependency if the user chooses NO for "Would you like to define your main dependencies interactively?"
@vedosis
Copy link
Author

vedosis commented Jun 26, 2021

Oh dang. I didn't see we still need to support Python 2.7 in integration tests. Can you nice folks let me know if you want me to update this (it's easy, just a type hint) or if we should drop the Python2.7 tests?

@abn
Copy link
Member

abn commented Jun 27, 2021

@vedosis if the fix is for the next minor; you won't have to suport 2.7. Just rebase your chages against master.

finswimmer and others added 9 commits June 27, 2021 11:23
@vedosis
Copy link
Author

vedosis commented Jun 27, 2021

Rebased to master, closing this PR in favor of the next.

@vedosis vedosis closed this Jun 27, 2021
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
3.2% 3.2% Duplication

Copy link

This pull request 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 Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.