Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into fix-encoding-warnings
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/main.yml
#	src/poetry/utils/_compat.py
#	src/poetry/utils/setup_reader.py
#	tests/console/commands/test_init.py
#	tests/console/commands/test_new.py
#	tests/repositories/conftest.py
  • Loading branch information
danyeaw committed May 16, 2024
2 parents 05b71ec + 0936028 commit 7cde255
Show file tree
Hide file tree
Showing 473 changed files with 12,021 additions and 7,189 deletions.
96 changes: 70 additions & 26 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,79 @@
freebsd_instance:
image_family: freebsd-13-2
cpu: 2
memory: 4G

test_task:
name: "Tests / FreeBSD / "
only_if: $CIRRUS_TAG == ''
skip: "!changesInclude('.cirrus.yml', 'poetry.lock', 'pyproject.toml', '**.json','**.py')"
tests_task:
# We only use Cirrus CI for FreeBSD at present; the rest of the task will assume FreeBSD.
freebsd_instance:
image_family: freebsd-14-0
# Cirrus has a concurrency limit of 8 vCPUs for FreeBSD. Allow executing 4 tasks in parallel.
cpu: 2
memory: 2G

env:
# `SHELL` environment variable is not set by default, so we explicitly set it to
# avoid failures on tests that depend on it.
SHELL: sh
matrix:
- PYTHON: python3.8
PYTHON_VERSION: 3.8
PYTHON_PACKAGE: python38
SQLITE_PACKAGE: py38-sqlite3
- PYTHON: python3.9
PYTHON_VERSION: 3.9
PYTHON_PACKAGE: python39
SQLITE_PACKAGE: py39-sqlite3
- PYTHON: python3.10
PYTHON_VERSION: 3.10
PYTHON_PACKAGE: python310
SQLITE_PACKAGE: py310-sqlite3
- PYTHON: python3.11
install_prereqs_script:
- V=$(printf '%s' $PYTHON | tr -d '.[:alpha:]')
- pkg install -y python${V} py${V}-sqlite3
install_poetry_script:
- POETRY_HOME=/opt/poetry
PYTHON_VERSION: 3.11
PYTHON_PACKAGE: python311
SQLITE_PACKAGE: py311-sqlite3
# FIXME: Python 3.12 is not available in Ports.
# - PYTHON: python3.12
# PYTHON_VERSION: 3.12
# PYTHON_PACKAGE: python312
# SQLITE_PACKAGE: py312-sqlite3
# FIXME: use pipx for install. pipx is currently broken in Ports.
POETRY_HOME: /opt/poetry
# SHELL is not set by default, and we have tests that depend on it.
SHELL: sh

bootstrap_poetry_script:
- pkg install -y git $PYTHON_PACKAGE $SQLITE_PACKAGE
- $PYTHON -m venv $POETRY_HOME
- $POETRY_HOME/bin/pip install --upgrade pip setuptools wheel
- $POETRY_HOME/bin/pip install poetry
- echo "PATH=$POETRY_HOME/bin:$PATH" >> $CIRRUS_ENV
install_and_test_script:
- echo "PATH=${POETRY_HOME}/bin:${PATH}" >> $CIRRUS_ENV

setup_environment_script:
# TODO: caching
- poetry install
- poetry run pytest --junitxml=junit.xml -v
on_failure:
annotate_failure_artifacts:
path: junit.xml
format: junit
type: text/xml
- poetry env info
- poetry show

matrix:
- alias: pytest
name: "Tests / FreeBSD (Python ${PYTHON_VERSION}) / pytest"
skip: "!changesInclude('.cirrus.yml', 'poetry.lock', 'pyproject.toml', 'src/**.py', 'tests/**')"
pytest_script: poetry run pytest --integration -v --junitxml=junit.xml
on_failure:
annotate_failure_artifacts:
path: junit.xml
format: junit
type: text/xml

# TODO: caching
- alias: mypy
name: "Tests / FreeBSD (Python ${PYTHON_VERSION}) / mypy"
skip: "!changesInclude('.cirrus.yml', 'poetry.lock', 'pyproject.toml', 'src/**.py', 'tests/**')"
mypy_script: poetry run mypy

status_task:
name: "Tests / FreeBSD Status"

depends_on:
- pytest
- mypy

container:
image: alpine:latest
cpu: 0.5
memory: 512M

# No-op the clone.
clone_script: true
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Do not mess with line endings in metadata files or the hash will be wrong.
*.metadata binary
32 changes: 0 additions & 32 deletions .github/ISSUE_TEMPLATE/---bug-report.md

This file was deleted.

96 changes: 96 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: "\U0001F41E Bug Report"
labels: ["kind/bug", "status/triage"]
description: "Poetry not working the way it is documented?"

body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file a complete bug report.
Before submitting your issue, please review the [Before submitting a bug report](https://python-poetry.org/docs/contributing/#before-submitting-a-bug-report) section of our documentation.
- type: textarea
attributes:
label: Description
description: |
Please describe what happened, with as much pertinent information as you can. Feel free to use markdown syntax.
Also, ensure that the issue is not already fixed in the [latest](https://github.com/python-poetry/poetry/releases/latest) Poetry release.
validations:
required: true

- type: textarea
attributes:
label: Workarounds
description: |
Is there a mitigation or workaround that allows users to avoid the issue today?
validations:
required: true

- type: dropdown
attributes:
label: Poetry Installation Method
description: |
How did you install Poetry?
options:
- "pipx"
- "install.python-poetry.org"
- "system package manager (eg: dnf, apt etc.)"
- "pip"
- "other"
validations:
required: true

- type: input
attributes:
label: Operating System
description: |
What Operating System are you using?
placeholder: "Fedora 39"
validations:
required: true

- type: input
attributes:
label: Poetry Version
description: |
Please attach output from `poetry --version`
validations:
required: true

- type: textarea
attributes:
label: Poetry Configuration
description: |
Please attach output from `poetry config --list`
render: 'bash session'
validations:
required: true

- type: textarea
attributes:
label: Python Sysconfig
description: |
Please attach output from `python -m sysconfig`
render: 'bash session'
validations:
required: false

- type: textarea
attributes:
label: Example pyproject.toml
description: |
Please provide an example `pyproject.toml` demonstrating the issue.
render: 'TOML'
validations:
required: false

- type: textarea
attributes:
label: Poetry Runtime Logs
description: |
Please attach logs from the failing command using `poetry -vvv <command>`
render: 'bash session'
validations:
required: true
21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/---documentation.md

This file was deleted.

46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/---documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "\U0001F4DA Documentation Issue"
labels: ["area/docs", "status/triage"]
description: "Did you find errors, omissions, or anything unintelligible in the documentation?"

body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file a complete bug report.
Before submitting your issue, please review the [Suggesting enhancements](https://python-poetry.org/docs/contributing/#suggesting-enhancements) section of our documentation.
Please also confirm the following:
- You have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repository and believe that this is not a duplicate.
- You have searched the [FAQ](https://python-poetry.org/docs/faq/) and general [documentation](https://python-poetry.org/docs/) and believe that your question is not already covered.
- type: dropdown
attributes:
label: Issue Kind
description: |
What best describes the issue?
options:
- "Improving documentation"
- "Missing documentation"
- "Error in existing documentation"
- "Unclear documentation"
- "Other concerns with documentation"
validations:
required: true

- type: input
attributes:
label: Existing Link
description: |
If the documentation in question exists, please provide a link to it.
placeholder: "https://python-poetry.org/docs/dependency-specification/#version-constraints"
validations:
required: true

- type: textarea
attributes:
label: Description
description: |
Please describe the feature, with as much pertinent information as you can. Feel free to use markdown syntax.
validations:
required: true
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/---feature-request.md

This file was deleted.

51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/---feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "\U0001F381 Feature Request"
labels: ["kind/feature", "status/triage"]
description: "Did you find errors, omissions, or anything unintelligible in the documentation?"

body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file a complete bug report.
Before submitting your issue, please search [issues](https://github.com/python-poetry/poetry/issues) to ensure this is not a duplicate.
If the issue is trivial, why not submit a pull request instead?
- type: dropdown
attributes:
label: Issue Kind
description: |
What best describes this issue?
options:
- "Brand new capability"
- "Change in current behaviour"
- "Other"
validations:
required: true

- type: textarea
attributes:
label: Description
description: |
Please describe the issue, with as much pertinent information as you can. Feel free to use markdown syntax.
Also, ensure that the issue is not already fixed in the [development documentation](https://python-poetry.org/docs/main/).
validations:
required: true

- type: textarea
attributes:
label: Impact
description: |
Please describe the motivation for this issue. Describe, as best you can, how this improves or impacts the users of Poetry and why this is important.
validations:
required: true

- type: textarea
attributes:
label: Workarounds
description: |
Is there a mitigation, workaround, or addon that allows users to achieve the same functionality today?
validations:
required: true
Loading

0 comments on commit 7cde255

Please sign in to comment.