]> git.phdru.name Git - m_lib.git/commitdiff
Version 3.1.1: Python 3.13 master
authorOleg Broytman <phd@phdru.name>
Sun, 15 Dec 2024 11:00:17 +0000 (14:00 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 15 Dec 2024 11:00:17 +0000 (14:00 +0300)
m_lib/mcrypt.py
m_lib/net/ftp/__init__.py
setup.py

index 13357371147af122e0f08d1880ff6295a95318b0..e64a80bc207a0cd12c698a1e80e6c0068f650570 100755 (executable)
@@ -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()
index d4beff8fb0cc360a55a03ae2cefa9b980872a40e..068144b9569cf0150de78d09df2adce11ff754ee 100644 (file)
@@ -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):
index d1279fd9a1d0b73d00ee1fddff71f26c3e8bd708..8f210ad7bbfdca061d49e0c6b6dab3526b8c9f8a 100755 (executable)
--- 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',
     ],