Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
0f747917
Commit
0f747917
authored
May 17, 2022
by
Branch Vincent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: address deprecation warnings
parent
f9936e3a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
src/poetry/locations.py
+1
-1
src/poetry/utils/env.py
+3
-0
tests/plugins/test_plugin_manager.py
+4
-4
tests/test_factory.py
+3
-3
No files found.
src/poetry/locations.py
View file @
0f747917
...
...
@@ -29,7 +29,7 @@ if sys.platform == "darwin":
auth_toml
=
_LEGACY_CONFIG_DIR
/
"auth.toml"
if
any
(
file
.
exists
()
for
file
in
(
auth_toml
,
config_toml
)):
logger
.
warn
(
logger
.
warn
ing
(
"Configuration file exists at
%
s, reusing this directory.
\n\n
Consider"
" moving configuration to
%
s, as support for the legacy directory will be"
" removed in an upcoming release."
,
...
...
src/poetry/utils/env.py
View file @
0f747917
...
...
@@ -10,6 +10,7 @@ import re
import
subprocess
import
sys
import
sysconfig
import
warnings
from
contextlib
import
contextmanager
from
copy
import
deepcopy
...
...
@@ -1538,6 +1539,8 @@ class SystemEnv(Env):
d
=
Distribution
()
d
.
parse_config_files
()
with
warnings
.
catch_warnings
():
warnings
.
filterwarnings
(
"ignore"
,
"setup.py install is deprecated"
)
obj
=
d
.
get_command_obj
(
"install"
,
create
=
True
)
obj
.
finalize_options
()
...
...
tests/plugins/test_plugin_manager.py
View file @
0f747917
...
...
@@ -32,8 +32,8 @@ class ManagerFactory(Protocol):
class
MyPlugin
(
Plugin
):
def
activate
(
self
,
poetry
:
Poetry
,
io
:
BufferedIO
)
->
None
:
io
.
write_line
(
"Setting readme"
)
poetry
.
package
.
readme
=
"README.md"
io
.
write_line
(
"Setting readme
s
"
)
poetry
.
package
.
readme
s
=
(
"README.md"
,)
class
MyCommandPlugin
(
ApplicationPlugin
):
...
...
@@ -95,8 +95,8 @@ def test_load_plugins_and_activate(
manager
.
load_plugins
()
manager
.
activate
(
poetry
,
io
)
assert
poetry
.
package
.
readme
==
"README.md"
assert
io
.
fetch_output
()
==
"Setting readme
\n
"
assert
poetry
.
package
.
readme
s
==
(
"README.md"
,)
assert
io
.
fetch_output
()
==
"Setting readme
s
\n
"
def
test_load_plugins_with_invalid_plugin
(
...
...
tests/test_factory.py
View file @
0f747917
...
...
@@ -28,8 +28,8 @@ fixtures_dir = Path(__file__).parent / "fixtures"
class
MyPlugin
(
Plugin
):
def
activate
(
self
,
poetry
:
Poetry
,
io
:
IO
)
->
None
:
io
.
write_line
(
"Setting readme"
)
poetry
.
package
.
readme
=
"README.md"
io
.
write_line
(
"Setting readme
s
"
)
poetry
.
package
.
readme
s
=
(
"README.md"
,)
def
test_create_poetry
():
...
...
@@ -343,4 +343,4 @@ def test_create_poetry_with_plugins(mocker: MockerFixture):
poetry
=
Factory
()
.
create_poetry
(
fixtures_dir
/
"sample_project"
)
assert
poetry
.
package
.
readme
==
"README.md"
assert
poetry
.
package
.
readme
s
==
(
"README.md"
,)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment