From 69ce628eac06c457e8093ed830f12fc510cd864e Mon Sep 17 00:00:00 2001 From: DevArKaDiA Date: Fri, 28 Apr 2023 00:23:32 -0500 Subject: [PATCH 1/3] Support for python 3.10 --- setup.py | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/setup.py b/setup.py index 325fe95..21008f5 100644 --- a/setup.py +++ b/setup.py @@ -6,30 +6,28 @@ INSTALL_REQUIRES = [ - "click<7.2.0,>=7.1.1", + "click==8.1.3", "docx2txt==0.8", - "gensim==4.0.1", - "googletrans==2.4.0", - "jellyfish==0.8.2", + "gensim==4.3.1", + "googletrans==3.0.0", + "jellyfish==0.9.0", "langid==1.1.6", - "matplotlib>=3.3.4", - "networkx==2.5.1", - "nltk==3.6.2", - "pandas>=0.25.3", - "pdf2image==1.16.0", - "PyPDF2==1.26.0", - "pyspellchecker==0.6.2", - "pytesseract==0.3.7; python_version<'3.8.4'", - "pytesseract>=0.3.7; python_version>='3.8.5'", - "python-docx>=0.8.11", - 'pywin32>=227; platform_system=="Windows"', - "opencv-python>=4.5.2.54", - "reportlab==3.5.68", - "scikit-learn>=0.24.2", + "matplotlib==3.7.1", + "networkx==3.0", + "nltk==3.8.1", + "pandas==1.5.3", + "pdf2image==1.16.3", + "PyPDF2==3.0.1", + "pyspellchecker==0.7.1", + "pytesseract==0.3.10", + "python-docx==0.8.11", + "opencv-python==4.7.0.72", + "reportlab==3.6.12", + "scikit-learn==1.2.2", "slate3k==0.5.3", - "spacy>=3.0.6", - "stanza>=1.2.1", - "wordcloud>=1.8.1", + "spacy==3.5.1", + "stanza==1.5.0", + "wordcloud==1.8.2.2", ] PACKAGE_NAME = "ConTexto" @@ -41,9 +39,7 @@ author_email="ucd@dnp.gov.co", maintainer="Unidad de Científicos de Datos - UCD", maintainer_email="ucd@dnp.gov.co", - description=( - "Librería para el procesamiento y análisis de texto con Python" - ), + description=("Librería para el procesamiento y análisis de texto con Python"), long_description=long_description, long_description_content_type="text/markdown", license="MIT", @@ -73,6 +69,7 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], python_requires=">=3.6.2", ) From 5e6c34603501804a2f6e331087d9e67b82a756f1 Mon Sep 17 00:00:00 2001 From: DevArKaDiA Date: Fri, 28 Apr 2023 00:33:46 -0500 Subject: [PATCH 2/3] move iterable from collections to abc --- contexto/utils/tokenizacion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contexto/utils/tokenizacion.py b/contexto/utils/tokenizacion.py index 1c8e869..624e0b0 100644 --- a/contexto/utils/tokenizacion.py +++ b/contexto/utils/tokenizacion.py @@ -1,4 +1,4 @@ -from collections import Iterable +from collections.abc import Iterable from nltk.tokenize.treebank import TreebankWordDetokenizer from nltk.tokenize.toktok import ToktokTokenizer From 5c228c9e36f418a5defed497d4f19a0b4e8ff3f9 Mon Sep 17 00:00:00 2001 From: DevArKaDiA Date: Fri, 28 Apr 2023 00:56:53 -0500 Subject: [PATCH 3/3] add support for olders python versions --- contexto/utils/tokenizacion.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contexto/utils/tokenizacion.py b/contexto/utils/tokenizacion.py index 624e0b0..8d9bb91 100644 --- a/contexto/utils/tokenizacion.py +++ b/contexto/utils/tokenizacion.py @@ -1,4 +1,9 @@ -from collections.abc import Iterable +try: + # Python <= 3.9 + from collections import Iterable +except ImportError: + # Python > 3.9 + from collections.abc import Iterable from nltk.tokenize.treebank import TreebankWordDetokenizer from nltk.tokenize.toktok import ToktokTokenizer