mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update docutils and remove docutils workaround
This commit is contained in:
parent
49bc6ed47f
commit
3cc430b418
4 changed files with 8 additions and 20 deletions
|
|
@ -201,18 +201,6 @@ class RstReader(BaseReader):
|
||||||
writer_class = PelicanHTMLWriter
|
writer_class = PelicanHTMLWriter
|
||||||
field_body_translator_class = _FieldBodyTranslator
|
field_body_translator_class = _FieldBodyTranslator
|
||||||
|
|
||||||
class FileInput(docutils.io.FileInput):
|
|
||||||
"""Patch docutils.io.FileInput to remove "U" mode in py3.
|
|
||||||
|
|
||||||
Universal newlines is enabled by default and "U" mode is deprecated
|
|
||||||
in py3.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
kwargs['mode'] = kwargs.get('mode', 'r').replace('U', '')
|
|
||||||
docutils.io.FileInput.__init__(self, *args, **kwargs)
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(RstReader, self).__init__(*args, **kwargs)
|
super(RstReader, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
@ -273,7 +261,6 @@ class RstReader(BaseReader):
|
||||||
|
|
||||||
pub = docutils.core.Publisher(
|
pub = docutils.core.Publisher(
|
||||||
writer=self.writer_class(),
|
writer=self.writer_class(),
|
||||||
source_class=self.FileInput,
|
|
||||||
destination_class=docutils.io.StringOutput)
|
destination_class=docutils.io.StringOutput)
|
||||||
pub.set_components('standalone', 'restructuredtext', 'html')
|
pub.set_components('standalone', 'restructuredtext', 'html')
|
||||||
pub.process_programmatic_settings(None, extra_params, None)
|
pub.process_programmatic_settings(None, extra_params, None)
|
||||||
|
|
|
||||||
8
poetry.lock
generated
8
poetry.lock
generated
|
|
@ -50,8 +50,8 @@ category = "main"
|
||||||
description = "Docutils -- Python Documentation Utilities"
|
description = "Docutils -- Python Documentation Utilities"
|
||||||
name = "docutils"
|
name = "docutils"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
|
||||||
version = "0.14"
|
version = "0.15.2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
category = "dev"
|
category = "dev"
|
||||||
|
|
@ -392,7 +392,7 @@ version = "0.5.1"
|
||||||
markdown = ["markdown"]
|
markdown = ["markdown"]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
content-hash = "0163177d87dca0955d111319de9481cf2ed0ef014e63a3740ffaf32a1cf07212"
|
content-hash = "b8fa239ebaf9bf4bcd5c2e02cf94d065a1add4e19d8354cedf19db6378d6b848"
|
||||||
python-versions = "^3.5"
|
python-versions = "^3.5"
|
||||||
|
|
||||||
[metadata.hashes]
|
[metadata.hashes]
|
||||||
|
|
@ -401,7 +401,7 @@ babel = ["af92e6106cb7c55286b25b38ad7695f8b4efb36a90ba483d7f7a6628c46158ab", "e8
|
||||||
beautifulsoup4 = ["034740f6cb549b4e932ae1ab975581e6103ac8f942200a0e9759065984391858", "945065979fb8529dd2f37dbb58f00b661bdbcbebf954f93b32fdf5263ef35348", "ba6d5c59906a85ac23dadfe5c88deaf3e179ef565f4898671253e50a78680718"]
|
beautifulsoup4 = ["034740f6cb549b4e932ae1ab975581e6103ac8f942200a0e9759065984391858", "945065979fb8529dd2f37dbb58f00b661bdbcbebf954f93b32fdf5263ef35348", "ba6d5c59906a85ac23dadfe5c88deaf3e179ef565f4898671253e50a78680718"]
|
||||||
blinker = ["471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6"]
|
blinker = ["471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6"]
|
||||||
colorama = ["05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d", "f8ac84de7840f5b9c4e3347b3c1eaa50f7e49c2b07596221daec5edaabbd7c48"]
|
colorama = ["05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d", "f8ac84de7840f5b9c4e3347b3c1eaa50f7e49c2b07596221daec5edaabbd7c48"]
|
||||||
docutils = ["02aec4bd92ab067f6ff27a38a38a41173bf01bed8f89157768c1573f53e474a6", "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274", "7a4bd47eaf6596e1295ecb11361139febe29b084a87bf005bf899f9a42edc3c6"]
|
docutils = ["6c4f696463b79f1fb8ba0c594b63840ebd41f059e92b31957c46b74a4599b6d0", "9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827", "a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99"]
|
||||||
entrypoints = ["589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19", "c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"]
|
entrypoints = ["589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19", "c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"]
|
||||||
feedgenerator = ["5ae05daa9cfa47fa406ee4744d0b7fa1c8a05a7a47ee0ad328ddf55327cfb106"]
|
feedgenerator = ["5ae05daa9cfa47fa406ee4744d0b7fa1c8a05a7a47ee0ad328ddf55327cfb106"]
|
||||||
filelock = ["18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59", "929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"]
|
filelock = ["18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59", "929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"]
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ pytz = "^2019.1"
|
||||||
blinker = "^1.4"
|
blinker = "^1.4"
|
||||||
unidecode = "^1.1"
|
unidecode = "^1.1"
|
||||||
python-dateutil = "^2.8"
|
python-dateutil = "^2.8"
|
||||||
docutils = "^0.14"
|
docutils = "^0.15"
|
||||||
markdown = {version = "~3.1.1", optional = true}
|
markdown = {version = "~3.1.1", optional = true}
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
|
||||||
5
setup.py
5
setup.py
|
|
@ -9,8 +9,9 @@ from setuptools import setup
|
||||||
|
|
||||||
version = "4.2.0"
|
version = "4.2.0"
|
||||||
|
|
||||||
requires = ['feedgenerator >= 1.9', 'jinja2 >= 2.7', 'pygments', 'docutils',
|
requires = ['feedgenerator >= 1.9', 'jinja2 >= 2.7', 'pygments',
|
||||||
'pytz >= 0a', 'blinker', 'unidecode', 'python-dateutil']
|
'docutils>=0.15', 'pytz >= 0a', 'blinker', 'unidecode',
|
||||||
|
'python-dateutil']
|
||||||
|
|
||||||
entry_points = {
|
entry_points = {
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue