Skip to content

Commit 7b1fd0c

Browse files
sdispaterbrandonautfinswimmerk4naredwardgeorge
authored
Merge master into develop (#2070)
* Fix Github actions cache issues (#1908) * Fix case of `-f` flag * Make it clearer what options to pass to `--format` * fix (masonry.api): `get_requires_for_build_wheel` must return additional list of requirements for building a package, not listed in `pyproject.toml` and not dependencies for the package itself (#1875) fix (tests): adopted tests * Lazy Keyring intialization for PasswordManager (#1892) * Fix Github Actions cache issues (#1928) * Avoid nested quantifiers with overlapping character space on git url parsing (#1902 (#1913) * fix (git): match for `\w` instead of `.` for getting user * change (vcs.git): hold pattern of the regex parts in a dictionary to be consistent over all regexs * new (vcs.git): test for `parse_url` and some fixes for the regex pattern * new (vcs.git): test for `parse_url` with string that should fail * fix (test.vcs.git): make flake8 happy * fix: correct parsing of wheel version with regex. (#1932) The previous regexp was only taking the first integer of the version number, this presented problems when the major version number reached double digits. Poetry would determine that the version of the dependency is '1', rather than, ie: '14'. This caused failures to solve versions. * Fix errors when using the --help option (#1910) * Fix how repository credentials are retrieved from env vars (#1909) # Conflicts: # poetry/utils/password_manager.py * Fix downloading packages from Simplepypi (#1851) * fix downloading packages from simplepypi * unused code removed * remove unused imports * Upgrade dependencies for the 1.0.3 release (#1965) * Bump version to 1.0.3 (#1966) * Fix non-compliant Git URL matching RFC 3986 § 2.3 permits more characters in a URL than were matched. This corrects that, though there may be other deficiencies. This was a regression from v1.0.2, where at least “.” was matched without error. * Update README.md "Updating Poetry" Currently the note in "Updating Poetry" is different from the one below in "Enable tab completion for Bash, Fish, or Zsh". This MR is to make them more consistent. * init: change dev dependency prompt * Fix CI issues (#2069) Co-authored-by: brandonaut <brandon@hubermx.com> Co-authored-by: finswimmer <finswimmer77@gmail.com> Co-authored-by: Yannick PÉROUX <yannick.peroux@gmail.com> Co-authored-by: Edward George <edwardgeorge@gmail.com> Co-authored-by: Jan Škoda <skoda@jskoda.cz> Co-authored-by: Andrew Marshall <andrew@johnandrewmarshall.com> Co-authored-by: Andrew Selzer <andrewfselzer@gmail.com> Co-authored-by: Andrii Maletskyi <andrii.maletskyi@gmail.com>
1 parent 4d05c15 commit 7b1fd0c

File tree

22 files changed

+477
-172
lines changed

22 files changed

+477
-172
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Get full python version
3434
id: full-python-version
3535
run: |
36-
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
36+
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
3737
- name: Install and set up Poetry
3838
run: |
3939
python get-poetry.py --preview -y
@@ -69,7 +69,7 @@ jobs:
6969
- name: Get full python version
7070
id: full-python-version
7171
run: |
72-
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
72+
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
7373
- name: Install and set up Poetry
7474
run: |
7575
python get-poetry.py --preview -y
@@ -87,7 +87,7 @@ jobs:
8787
- name: Test
8888
run: |
8989
source $HOME/.poetry/env
90-
poetry run pytest -q tests
90+
.venv/bin/pytest -q tests
9191
9292
Windows:
9393
needs: Linting
@@ -106,7 +106,7 @@ jobs:
106106
id: full-python-version
107107
shell: bash
108108
run: |
109-
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
109+
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
110110
- name: Install and setup Poetry
111111
run: |
112112
python get-poetry.py --preview -y

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Change Log
22

3+
## [1.0.3] - 2020-01-31
4+
5+
### Fixed
6+
7+
- Fixed an error which caused the configuration environment variables (like `POETRY_HTTP_BASIC_XXX_PASSWORD`) to not be used ([#1909](https://github.com/python-poetry/poetry/pull/1909)).
8+
- Fixed an error where the `--help` option was not working ([#1910](https://github.com/python-poetry/poetry/pull/1910)).
9+
- Fixed an error where packages from private indices were not decompressed properly ([#1851](https://github.com/python-poetry/poetry/pull/1851)).
10+
- Fixed an error where the version of some PEP-508-formatted wheel dependencies was not properly retrieved ([#1932](https://github.com/python-poetry/poetry/pull/1932)).
11+
- Fixed internal regexps to avoid potential catastrophic backtracking errors ([#1913](https://github.com/python-poetry/poetry/pull/1913)).
12+
- Fixed performance issues when custom indices were defined in the `pyproject.toml` file ([#1892](https://github.com/python-poetry/poetry/pull/1892)).
13+
- Fixed the `get_requires_for_build_wheel()` function of `masonry.api` which wasn't returning the proper result ([#1875](https://github.com/python-poetry/poetry/pull/1875)).
14+
15+
316
## [1.0.2] - 2020-01-10
417

518
### Fixed
@@ -783,7 +796,8 @@ Initial release
783796

784797

785798

786-
[Unreleased]: https://github.com/python-poetry/poetry/compare/1.0.2...master
799+
[Unreleased]: https://github.com/python-poetry/poetry/compare/1.0.3...master
800+
[1.0.3]: https://github.com/python-poetry/poetry/releases/tag/1.0.3
787801
[1.0.2]: https://github.com/python-poetry/poetry/releases/tag/1.0.2
788802
[1.0.1]: https://github.com/python-poetry/poetry/releases/tag/1.0.1
789803
[1.0.0]: https://github.com/python-poetry/poetry/releases/tag/1.0.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ to `self update`.
6565
poetry self update 1.0.0
6666
```
6767

68-
!!!note
68+
*Note:*
6969

7070
If you are still on poetry version < 1.0 use `poetry self:update` instead.
7171

docs/docs/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ Note that, at the moment, only pure python wheels are supported.
305305

306306
### Options
307307

308-
* `--format (-F)`: Limit the format to either wheel or sdist.
308+
* `--format (-f)`: Limit the format to either `wheel` or `sdist`.
309309

310310
## publish
311311

poetry.lock

Lines changed: 105 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poetry/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.2"
1+
__version__ = "1.0.3"

poetry/console/commands/init.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ def handle(self):
165165
dev_requirements = {}
166166

167167
question = (
168-
"Would you like to define your dev dependencies"
169-
" (require-dev) interactively"
168+
"Would you like to define your development dependencies interactively?"
170169
)
171170
if self.confirm(question, True):
172171
if not help_displayed:

poetry/console/config/application_config.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from clikit.api.event import PreHandleEvent
1010
from clikit.api.event import PreResolveEvent
1111
from clikit.api.event.event_dispatcher import EventDispatcher
12+
from clikit.api.exceptions import CliKitException
1213
from clikit.api.formatter import Style
1314
from clikit.api.io import Input
1415
from clikit.api.io import InputStream
@@ -101,7 +102,16 @@ def resolve_help_command(
101102
if args.has_option_token("-h") or args.has_option_token("--help"):
102103
from clikit.api.resolver import ResolvedCommand
103104

104-
resolved_command = self.command_resolver.resolve(args, application)
105+
try:
106+
resolved_command = self.command_resolver.resolve(args, application)
107+
except CliKitException:
108+
# We weren't able to resolve the command,
109+
# due to a parse error most likely,
110+
# so we fall back on the default behavior
111+
return super(ApplicationConfig, self).resolve_help_command(
112+
event, event_name, dispatcher
113+
)
114+
105115
# If the current command is the run one, skip option
106116
# check and interpret them as part of the executed command
107117
if resolved_command.command.name == "run":

poetry/masonry/api.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020

2121
def get_requires_for_build_wheel(config_settings=None):
2222
"""
23-
Returns a list of requirements for building, as strings
24-
"""
25-
poetry = Factory().create_poetry(Path("."))
23+
Returns an additional list of requirements for building, as PEP508 strings,
24+
above and beyond those specified in the pyproject.toml file.
2625
27-
main, _ = SdistBuilder.convert_dependencies(poetry.package, poetry.package.requires)
26+
This implementation is optional. At the moment it only returns an empty list, which would be the same as if
27+
not define. So this is just for completeness for future implementation.
28+
"""
2829

29-
return main
30+
return []
3031

3132

3233
# For now, we require all dependencies to build either a wheel or an sdist.

poetry/packages/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import re
33

44
from poetry.semver import Version
5+
from poetry.utils.patterns import wheel_file_re
56
from poetry.version.requirements import Requirement
67

78
from .dependency import Dependency
@@ -70,7 +71,7 @@ def dependency_from_pep_508(name):
7071
link = Link(path_to_url(os.path.normpath(os.path.abspath(link.path))))
7172
# wheel file
7273
if link.is_wheel:
73-
m = re.match(r"^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))", link.filename)
74+
m = wheel_file_re.match(link.filename)
7475
if not m:
7576
raise ValueError("Invalid wheel name: {}".format(link.filename))
7677

0 commit comments

Comments
 (0)