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
7279a073
Unverified
Commit
7279a073
authored
Jan 19, 2023
by
johnthagen
Committed by
GitHub
Jan 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support `Private ::` trove classifiers (#7271)
parent
2d54ec97
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
src/poetry/console/commands/check.py
+4
-0
tests/console/commands/test_check.py
+18
-0
tests/fixtures/private_pyproject/pyproject.toml
+17
-0
No files found.
src/poetry/console/commands/check.py
View file @
7279a073
...
...
@@ -31,6 +31,10 @@ class CheckCommand(Command):
unrecognized
=
sorted
(
project_classifiers
-
set
(
classifiers
)
-
set
(
deprecated_classifiers
)
)
# Allow "Private ::" classifiers as recommended on PyPI and the packaging guide
# to allow users to avoid accidentally publishing private packages to PyPI.
# https://pypi.org/classifiers/
unrecognized
=
[
u
for
u
in
unrecognized
if
not
u
.
startswith
(
"Private ::"
)]
if
unrecognized
:
errors
.
append
(
f
"Unrecognized classifiers: {unrecognized!r}."
)
...
...
tests/console/commands/test_check.py
View file @
7279a073
...
...
@@ -59,3 +59,21 @@ Warning: Deprecated classifier\
"""
assert
tester
.
io
.
fetch_error
()
==
expected
def
test_check_private
(
mocker
:
MockerFixture
,
tester
:
CommandTester
):
mocker
.
patch
(
"poetry.factory.Factory.locate"
,
return_value
=
Path
(
__file__
)
.
parent
.
parent
.
parent
/
"fixtures"
/
"private_pyproject"
/
"pyproject.toml"
,
)
tester
.
execute
()
expected
=
"""
\
All set!
"""
assert
tester
.
io
.
fetch_output
()
==
expected
tests/fixtures/private_pyproject/pyproject.toml
0 → 100644
View file @
7279a073
[tool.poetry]
name
=
"private"
version
=
"0.1.0"
description
=
""
authors
=
[
"Your Name <you@example.com>"
]
readme
=
"README.md"
classifiers
=
[
"Private :: Do Not Upload"
,
]
[tool.poetry.dependencies]
python
=
"^3.7"
[build-system]
requires
=
["poetry-core"]
build-backend
=
"poetry.core.masonry.api"
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