From: Oleg Broytman Date: Sun, 15 Dec 2024 11:00:17 +0000 (+0300) Subject: Version 3.1.1: Python 3.13 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=HEAD;p=m_lib.git Version 3.1.1: Python 3.13 --- diff --git a/m_lib/mcrypt.py b/m_lib/mcrypt.py index 1335737..e64a80b 100755 --- a/m_lib/mcrypt.py +++ b/m_lib/mcrypt.py @@ -6,7 +6,11 @@ from __future__ import print_function -import random, crypt +try: + import crypt +except ImportError: # Python 3.13+ + crypt = None +import random saltchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcedfghijklmnopqrstuvwxyz0123456789./" @@ -50,4 +54,5 @@ def test(): print("BAD password") if __name__ == "__main__": - test() + if crypt is not None: + test() diff --git a/m_lib/net/ftp/__init__.py b/m_lib/net/ftp/__init__.py index d4beff8..068144b 100644 --- a/m_lib/net/ftp/__init__.py +++ b/m_lib/net/ftp/__init__.py @@ -7,7 +7,10 @@ __all__ = [ from ftplib import FTP -from telnetlib import IAC +try: + from telnetlib import IAC +except ImportError: # Python 3.13+ + IAC = bytes([255]) # "Interpret As Command" class TelnetFTP(FTP): diff --git a/setup.py b/setup.py index d1279fd..8f210ad 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup setup( name = "m_lib", - version = "3.1.0.post2", + version = "3.1.1", description = "Broytman Library for Python", long_description = "Broytman Library for Python, Copyright (C) 1996-2023 PhiloSoft Design", long_description_content_type="text/plain", @@ -34,6 +34,7 @@ setup( 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Python Modules', ],