Je suis curieux s'il y a des bibliothèques importantes qui ne supportent que Python 3, car il semble que de nombreuses bibliothèques qui soutiennent, il arrive également à soutenir Python 2. P>
3 Réponses :
Non, il n'y a pas de tel index, mais vous pouvez en créer un des données du classificateur sur PYPI. P>
Vous pouvez faire une liste de tous les forfaits qui a "Langage de programmation :: Python :: 3" ou programme de programmation :: Python :: 3.0 "ou" Langage de programmation :: Python 3.1 ", mais aucun des classificateurs de Python 2 . P>
http://pypi.python.org/pypi?:action=Browse&c=214 p>
éventuellement l'interface XML peut être utile: p>
Il apparaît Il n'y a pas , alors j'ai écrit ceci ( avec une aide d'aide ):
#!/usr/bin/env python3 import xmlrpc.client # PyPI classifiers for all Python 3 versions PY3 = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", ] # PyPI classifiers for all Python 2 versions PY2 = [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.3", ] def main(): client = xmlrpc.client.ServerProxy('http://pypi.python.org/pypi') # name[0] is package name # name[1] is package version py3names = [ name[0] for classifier in PY3 for name in client.browse([classifier]) ] py2names = [ name[0] for classifier in PY2 for name in client.browse([classifier]) ] py3only = [name for name in py3names if name not in py2names] template = "Python3-only packages: {} (of {})" print(template.format(len(py3only), len(set(py2names + py3names)))) if __name__ == "__main__": main()
Sortie actuelle: Packages Python3 uniquement: 2823 (sur 14595) Code>
Il y a un langage de programmation Vous pouvez utiliser ce classificateur pour filtrer les packages du site Web PYPI: https://pypi.org/search/?c=programming+Language+%3a%3a+pyThon+%3a%3a+3+%3A%3A+Only < / a> p> :: python :: 3 :: Seul code> classificateur de PYPI que Python 3 Seuls les packages doivent utiliser. Cependant, tous les packages Python 3 ne sont pas configurés avec elle. P>