Skip to content

build(python): Sunset Python 3.6 and support Python 3.11 #633

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

Merged
merged 5 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
-
# Maintain dependencies for GitHub Actions
package-ecosystem: github-actions
directory: /
schedule:
interval: daily
labels:
- dependencies
commit-message:
prefix: "ci(actions)"
include: "scope"
-
# Maintain python dependencies
package-ecosystem: pip
directory: /
schedule:
interval: daily
labels:
- dependencies
commit-message:
prefix: "build(poetry)"
include: "scope"
6 changes: 3 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
python-check:
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
platform: [ubuntu-20.04, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,3 @@ venv.bak/
.idea
.vscode/
*.bak

# build
poetry.lock
8 changes: 5 additions & 3 deletions commitizen/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import sys
from functools import partial
from types import TracebackType
from typing import List

import argcomplete
Expand Down Expand Up @@ -324,21 +325,22 @@


def commitizen_excepthook(
type, value, tracekback, debug=False, no_raise: List[int] = None
type, value, traceback, debug=False, no_raise: List[int] = None
):
traceback = traceback if isinstance(traceback, TracebackType) else None
if not no_raise:
no_raise = []
if isinstance(value, CommitizenException):
if value.message:
value.output_method(value.message)
if debug:
original_excepthook(type, value, tracekback)
original_excepthook(type, value, traceback)
exit_code = value.exit_code
if exit_code in no_raise:
exit_code = 0
sys.exit(exit_code)
else:
original_excepthook(type, value, tracekback)
original_excepthook(type, value, traceback)


commitizen_debug_excepthook = partial(commitizen_excepthook, debug=True)
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ the version or a changelog.

## Requirements

Python 3.6+
Python 3.7+

[Git][gitscm] `1.8.5.2`+

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/gitlab_ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test:

auto-bump:
stage: auto-bump
image: python:3.6
image: python:3.7
before_script:
- "which ssh-agent || ( apt-get update -qy && apt-get install openssh-client -qqy )"
- eval `ssh-agent -s`
Expand Down
Loading