Skip to content

Commit

Permalink
Move away from commonmark and add python 3.10 support (#240)
Browse files Browse the repository at this point in the history
* Replace commonmark with markdown-it and remove django-markwhat dependency

Fix #227

* Add support to python 3.10

* Rename pre-release.sh to update-requirements-txt.sh
  • Loading branch information
bport authored Nov 20, 2022
1 parent ed72ff5 commit a67ae47
Show file tree
Hide file tree
Showing 11 changed files with 180 additions and 158 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
python-version: ["3.9", "3.10"]
services:
mariadb:
image: mariadb:latest
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v1.17.0 (xxxx-xx-xx)
- Replace commonmark with markdown-it and remove django-markwhat dependency
- Support python 3.10
- Update some depdencies

# v1.16.0 (2022-11-14)
- More refined factories
- New command: create_dev_dataset to generate a basic dev dataset
Expand Down
2 changes: 1 addition & 1 deletion interview/templates/interview/interview_minute.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends 'interview/base.html' %}
{% load admin_urls %}
{% load i18n %}
{% load markup %}
{% load commonmark %}
{% load bleach_tags %}

{% block content %}
Expand Down
2 changes: 1 addition & 1 deletion interview/templates/interview/process_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% load admin_urls %}
{% load i18n %}
{% load crispy_forms_tags %}
{% load markup %}
{% load commonmark %}
{% load bleach_tags %}

{% block more_css %}
Expand Down
Empty file.
12 changes: 12 additions & 0 deletions interview/templatetags/commonmark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django import template
from django.utils.safestring import mark_safe

from markdown_it import MarkdownIt

register = template.Library()
md = MarkdownIt()


@register.filter(is_safe=True)
def commonmark(value):
return mark_safe(md.render(value))
249 changes: 128 additions & 121 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pyoupyou/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"django_select2",
"ref.apps.RefConfig",
"interview.apps.InterviewConfig",
"django_markwhat",
"django_filters",
]

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ authors = [
readme = "README.md"

[tool.poetry.dependencies]
python = "~= 3.9"
python = ">= 3.9, <3.11"
django-bootstrap-static = ">=3.3.7,<3.4"
django-crispy-forms = "==1.9.1"
django-select2 = "==7.0.3"
django-extensions = "==2.1.6"
django-tables2 = "==2.3.4"
django-ical = "==1.4"
django-markwhat = "==1.6.1"
commonmark = "==0.9.1"
django-bleach = "==0.3.0"
django-split-settings = "==0.3.0"
requests = '==2.26.0 '
Expand All @@ -32,6 +30,7 @@ pytz = "==2021.1"
pandas = "==1.2.2"
django = "3.2.16"
urllib3 = "1.26.12"
markdown-it-py = "^2.1.0"

[tool.poetry.group.dev.dependencies]
black = "==22.8.0"
Expand Down
60 changes: 30 additions & 30 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
asgiref==3.5.2 ; python_version >= "3.9" and python_version < "4.0"
bleach==5.0.1 ; python_version >= "3.9" and python_version < "4.0"
certifi==2022.6.15 ; python_version >= "3.9" and python_version < "4.0"
charset-normalizer==2.0.12 ; python_version >= "3.9" and python_version < "4.0"
commonmark==0.9.1 ; python_version >= "3.9" and python_version < "4.0"
django-appconf==1.0.5 ; python_version >= "3.9" and python_version < "4.0"
django-bleach==0.3.0 ; python_version >= "3.9" and python_version < "4.0"
django-bootstrap-static==3.3.7.2 ; python_version >= "3.9" and python_version < "4.0"
django-crispy-forms==1.9.1 ; python_version >= "3.9" and python_version < "4.0"
django-extensions==2.1.6 ; python_version >= "3.9" and python_version < "4.0"
django-filter==2.4.0 ; python_version >= "3.9" and python_version < "4.0"
django-ical==1.4 ; python_version >= "3.9" and python_version < "4.0"
django-markwhat==1.6.1 ; python_version >= "3.9" and python_version < "4.0"
django-select2==7.0.3 ; python_version >= "3.9" and python_version < "4.0"
django-split-settings==0.3.0 ; python_version >= "3.9" and python_version < "4.0"
django-tables2==2.3.4 ; python_version >= "3.9" and python_version < "4.0"
django==3.2.16 ; python_version >= "3.9" and python_version < "4.0"
icalendar==4.1.0 ; python_version >= "3.9" and python_version < "4.0"
idna==3.3 ; python_version >= "3.9" and python_version < "4.0"
numpy==1.23.4 ; python_version >= "3.9" and python_version < "4.0"
pandas==1.2.2 ; python_version >= "3.9" and python_version < "4.0"
plotly==4.8.2 ; python_version >= "3.9" and python_version < "4.0"
python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "4.0"
pytz==2021.1 ; python_version >= "3.9" and python_version < "4.0"
requests==2.26.0 ; python_version >= "3.9" and python_version < "4.0"
retrying==1.3.3 ; python_version >= "3.9" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.9" and python_version < "4.0"
sqlparse==0.4.2 ; python_version >= "3.9" and python_version < "4.0"
urllib3==1.26.12 ; python_version >= "3.9" and python_version < "4"
webencodings==0.5.1 ; python_version >= "3.9" and python_version < "4.0"
asgiref==3.5.2 ; python_version >= "3.9" and python_version < "3.11"
bleach==5.0.1 ; python_version >= "3.9" and python_version < "3.11"
certifi==2022.9.24 ; python_version >= "3.9" and python_version < "3.11"
charset-normalizer==2.0.12 ; python_version >= "3.9" and python_version < "3.11"
django-appconf==1.0.5 ; python_version >= "3.9" and python_version < "3.11"
django-bleach==0.3.0 ; python_version >= "3.9" and python_version < "3.11"
django-bootstrap-static==3.3.7.2 ; python_version >= "3.9" and python_version < "3.11"
django-crispy-forms==1.9.1 ; python_version >= "3.9" and python_version < "3.11"
django-extensions==2.1.6 ; python_version >= "3.9" and python_version < "3.11"
django-filter==2.4.0 ; python_version >= "3.9" and python_version < "3.11"
django-ical==1.4 ; python_version >= "3.9" and python_version < "3.11"
django-select2==7.0.3 ; python_version >= "3.9" and python_version < "3.11"
django-split-settings==0.3.0 ; python_version >= "3.9" and python_version < "3.11"
django-tables2==2.3.4 ; python_version >= "3.9" and python_version < "3.11"
django==3.2.16 ; python_version >= "3.9" and python_version < "3.11"
icalendar==5.0.2 ; python_version >= "3.9" and python_version < "3.11"
idna==3.4 ; python_version >= "3.9" and python_version < "3.11"
markdown-it-py==2.1.0 ; python_version >= "3.9" and python_version < "3.11"
mdurl==0.1.2 ; python_version >= "3.9" and python_version < "3.11"
numpy==1.23.4 ; python_version >= "3.9" and python_version < "3.11"
pandas==1.2.2 ; python_version >= "3.9" and python_version < "3.11"
plotly==4.8.2 ; python_version >= "3.9" and python_version < "3.11"
python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "3.11"
pytz==2021.1 ; python_version >= "3.9" and python_version < "3.11"
requests==2.26.0 ; python_version >= "3.9" and python_version < "3.11"
retrying==1.3.3 ; python_version >= "3.9" and python_version < "3.11"
six==1.16.0 ; python_version >= "3.9" and python_version < "3.11"
sqlparse==0.4.3 ; python_version >= "3.9" and python_version < "3.11"
urllib3==1.26.12 ; python_version >= "3.9" and python_version < "3.11"
webencodings==0.5.1 ; python_version >= "3.9" and python_version < "3.11"
File renamed without changes.

0 comments on commit a67ae47

Please sign in to comment.