Deprecate Python Functions with @deprecated

Поділитися
Вставка
  • Опубліковано 7 тра 2024
  • Today we learn how to properly deprecate Python functions using the deprecated package.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    💼 Services 💼
    💻 Freelancing & Tutoring: www.neuralnine.com/services
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
  • Наука та технологія

КОМЕНТАРІ • 11

  • @PoeLemic
    @PoeLemic Місяць тому

    Thanks for explaining this. Not useful for me now, but I'm glad to understand it where I can be a better Team Coder when I see it in the future.

  • @darrenlow4733
    @darrenlow4733 Місяць тому +1

    I learn alot here

  • @tora3492
    @tora3492 Місяць тому +1

    How to check for changes before updating the package ?

  • @orcus_irl
    @orcus_irl Місяць тому

    and why not use terminal to code and debug with nvim and it has some great plugins that can be used

  • @rons96
    @rons96 Місяць тому +4

    It's useful. But is secure? Since implement a decorator like that is so easy, why not implement your own? If need to install a very simple thing like this, could let the project in risk. They can remove versions from pypi and also change their code anytime. It can happen to any package, but, this one is a one more risk for no reason, at least for me. My final opinion is: you should be teaching how to do this module instead installing it, can fit in a short video.

    • @skiavariants1975
      @skiavariants1975 Місяць тому +1

      Agree, we don't want random backdoor in our code

    • @LiquidMasti
      @LiquidMasti Місяць тому +1

      Agreed 👍 you don't need to install a package for this small use case just get logger and warn users

    • @the_huge_knight
      @the_huge_knight Місяць тому +1

      Everyone can write their own deprecation decorator with logging for example.
      Even 'deprecated' decorator can be deprecated.

    • @BlackTeenMonkey
      @BlackTeenMonkey Місяць тому

      Yes and no. These are use cases a Junior developer doesn’t think about, so it helps to build perspective and insight. And also, be it new version changes, you can always not update a package if you know that it’s breaking the code base.
      However I don’t disagree with implementing your own and of course that would be a far better skill to have.

  • @orcus_irl
    @orcus_irl Місяць тому

    HI bro, love your videos
    can you do a nvim video with lua?

  • @the_huge_knight
    @the_huge_knight Місяць тому

    What if i run tests on functions with @deprecated mark?