Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip to pip3 #29916

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

pip to pip3 #29916

wants to merge 1 commit into from

Conversation

freeacetone
Copy link

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.

@dirkf
Copy link
Contributor

dirkf commented Sep 7, 2021

  1. You've ignored the template.
  2. Why would this be a good example for a user who doesn't have Python3?

@zulc22
Copy link

zulc22 commented Sep 21, 2021

yeah, youtube-dl has support for python 2.

@mara004
Copy link

mara004 commented Oct 3, 2021

+1 as there is no point at recommending the use of ancient Python 2 stuff.
I think on the long term it would make sense to drop support for Python 2 at some point so youtube-dl can make use of modern Python 3 features and libraries, such as f-strings, type hints, yield from, pathlib, and so on. Python 2 really is deprecated.

@rautamiekka
Copy link
Contributor

Note (source: official Python docs):

  • F-strings require >=3.6.0 (but 3.8.0 would be optimal cuz >=3.7.0 allows using await expressions and comprehensions together with async for, and >=3.8.0 supports = to easily create debug prints showing the name+contents of a var). F-strings are very lovely and fast, but their realtime processing means they can only be used for strings which need to be created right now, while all templates need to use the somewhat slower str.format() way.
  • type hints are truly useful >=3.9.0 due to many new features added since its introduction in 3.5.0, 1 being the standard types (list, tuple, ...) support being used directly as type hints instead of importing them from typing. Not the biggest problem if you use PyCharm or some other editor to warn you of lack of imported type hints being used, though. 3.9.1 introduced some new type hints, but I doubt those are gonna be used in yt-dl[p] anyway.
  • yield from needs >=3.4.0 (which won't be a problem since 3.6.x has been the minimum for many projects, such as gallery-dl and yt-dlp).
  • Same as above for pathlib (which according to/judging by https://treyhunner.com/2018/12/why-you-should-be-using-pathlib/ is a very nice alternative, even if it was only used for writing less code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants