From fd3c883cf0169d8bb4aae1b9b1cef3ccda68b620 Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Thu, 26 Sep 2024 12:44:02 -0400 Subject: [PATCH 1/2] fix: Remove obsolete, broken pyandoc usage Pyandoc is no longer supported, and the final version of it on PyPI is incompatible with how our setup.py was using it. This commit removes pyandoc entirely and lets Python's setuptools handle the README conversion from Markdown as needed. --- setup.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/setup.py b/setup.py index f092c80..a49ab1c 100644 --- a/setup.py +++ b/setup.py @@ -16,25 +16,11 @@ from setuptools import setup -LONG_DESCRIPTION = None README_MARKDOWN = None with open('README.md') as markdown_source: README_MARKDOWN = markdown_source.read() -try: - import pandoc - pandoc.core.PANDOC_PATH = 'pandoc' - # Converts the README.md file to ReST, since PyPI uses ReST for formatting, - # This allows to have one canonical README file, being the README.md - doc = pandoc.Document() - doc.markdown = README_MARKDOWN - LONG_DESCRIPTION = doc.rst -except ImportError: - # If pandoc isn't installed, e.g. when downloading from pip, - # just use the regular README. - LONG_DESCRIPTION = README_MARKDOWN - def load_requirements(*requirements_paths): """ Load all requirements from the specified requirements files. @@ -63,7 +49,8 @@ def is_requirement(line): version='0.2.1', description='Proxy around MongoDB connection that automatically handles AutoReconnect exceptions.', author='Gustav Arngarden', - long_description=LONG_DESCRIPTION, + long_description=README_MARKDOWN, + long_description_content_type='text/markdown', classifiers=[ 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', @@ -71,7 +58,6 @@ def is_requirement(line): 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.8', ], - setup_requires=['pyandoc'], install_requires=load_requirements('requirements/base.in'), url="https://github.com/arngarden/MongoDBProxy" ) From 02b199e0af877ecdd1071e6f877812d24b36c7eb Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Thu, 26 Sep 2024 15:36:18 -0400 Subject: [PATCH 2/2] fix: Bump version to 0.2.2. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a49ab1c..d8343b0 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def is_requirement(line): setup( name='openedx-mongodbproxy', py_modules=['mongodb_proxy'], - version='0.2.1', + version='0.2.2', description='Proxy around MongoDB connection that automatically handles AutoReconnect exceptions.', author='Gustav Arngarden', long_description=README_MARKDOWN,