Deprecate Python Functions with @deprecated

Поделиться
HTML-код
  • Опубликовано: 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 21 день назад

    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

  • @orcus_irl
    @orcus_irl Месяц назад

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

  • @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.

  • @the_huge_knight
    @the_huge_knight Месяц назад

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