Giter VIP home page Giter VIP logo

Comments (1)

Yetangitu avatar Yetangitu commented on August 16, 2024

Your Python version is 'too old', the 2-argument version of hashlib.md5 was introduced in 3.9:

(https://docs.python.org/3.9/library/hashlib.html):

Changed in version 3.9: All hashlib constructors take a keyword-only argument usedforsecurity with default value True. A false value allows the use of insecure and blocked hashing algorithms in restricted environments. False indicates that the hashing algorithm is not used in a security context, e.g. as a non-cryptographic one-way compression function.

Either update Python to something more current (3.10 is current, 3.9 would work as well) or remove the second parameter:

--- spodcast/spodcast/spodcast.py.org	2022-06-17 21:24:16.344970958 +0000
+++ spodcast/spodcast/spodcast.py	2022-06-17 21:24:34.076795874 +0000
@@ -58,7 +58,7 @@ class Spodcast:
         cred_directory = Config.get_config_dir()
         if os.path.isdir(cred_directory):
             (username,password) = line.split()
-            cred_filename = CREDENTIALS_PREFIX + "-" + hashlib.md5(username.encode('utf-8'),usedforsecurity=False).hexdigest() + ".json"
+            cred_filename = CREDENTIALS_PREFIX + "-" + hashlib.md5(username.encode('utf-8')).hexdigest() + ".json"
             cred_location = os.path.join(cred_directory, cred_filename)
             conf = Session.Configuration.Builder().set_stored_credential_file(cred_location).build()
             session = Session.Builder(conf).user_pass(username, password).create()

from spodcast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.