WebKit Bugzilla
Attachment 357837 Details for
Bug 192909
: webkitpy: Autoinstall package URLs have changed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192909-20181220112844.patch (text/plain), 14.74 KB, created by
Jonathan Bedard
on 2018-12-20 11:28:45 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jonathan Bedard
Created:
2018-12-20 11:28:45 PST
Size:
14.74 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 239456) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,31 @@ >+2018-12-20 Jonathan Bedard <jbedard@apple.com> >+ >+ webkitpy: Autoinstall package URLs have changed >+ https://bugs.webkit.org/show_bug.cgi?id=192909 >+ <rdar://problem/46860359> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ PyPi urls have been moved around, we need to update our auto-installed packages. >+ >+ We should check for Selenium before asking PyPi for the latest version. >+ >+ * Scripts/webkitpy/thirdparty/__init__.py: >+ (AutoinstallImportHook._install_mechanize): Update with new pypi url. >+ (AutoinstallImportHook._install_keyring): Ditto. >+ (AutoinstallImportHook._install_pep8): Ditto. >+ (AutoinstallImportHook._install_mozlog): Ditto. >+ (AutoinstallImportHook._install_mozprocess): Ditto. >+ (AutoinstallImportHook._install_pytest_timeout): Ditto. >+ (AutoinstallImportHook._install_pytest): Ditto. >+ (AutoinstallImportHook._install_pylint): Ditto. >+ (AutoinstallImportHook._install_buildbot): Ditto. >+ (AutoinstallImportHook._install_coverage): Ditto. >+ (AutoinstallImportHook._install_twisted_15_5_0): Ditto. >+ (AutoinstallImportHook._install_selenium): Update with new pypi url, only check >+ for new Selenium if the installed version isn't sufficient. >+ (AutoinstallImportHook.get_latest_pypi_url): Update with new pypi url. >+ > 2018-12-20 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, rolling out r239417. >Index: Tools/Scripts/webkitpy/thirdparty/__init__.py >=================================================================== >--- Tools/Scripts/webkitpy/thirdparty/__init__.py (revision 239445) >+++ Tools/Scripts/webkitpy/thirdparty/__init__.py (working copy) >@@ -116,50 +116,48 @@ class AutoinstallImportHook(object): > self._install_pytest() > > def _install_mechanize(self): >- self._install("https://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz", >+ self._install("https://files.pythonhosted.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz", > "mechanize-0.2.5/mechanize") > > def _install_keyring(self): >- self._install("https://pypi.python.org/packages/7d/a9/8c6bf60710781ce13a9987c0debda8adab35eb79c6b5525f7fe5240b7a8a/keyring-7.3.1.tar.gz#md5=99dd793e1233964eb87cf56406ee66f6", >+ self._install("https://files.pythonhosted.org/packages/7d/a9/8c6bf60710781ce13a9987c0debda8adab35eb79c6b5525f7fe5240b7a8a/keyring-7.3.1.tar.gz", > "keyring-7.3.1/keyring") > > def _install_pep8(self): >- self._install("https://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b", >+ self._install("https://files.pythonhosted.org/packages/source/p/pep8/pep8-0.5.0.tar.gz", > "pep8-0.5.0/pep8.py") > > def _install_mozlog(self): > self._ensure_autoinstalled_dir_is_in_sys_path() >- self._install("https://pypi.python.org/packages/10/d5/d286b5dc3f40e32d2a9b3cab0b5b20a05d704958b44b4c5a9aed6472deab/mozlog-3.5.tar.gz#md5=3282c70e7037266f83d8c80119129b75", >+ self._install("https://files.pythonhosted.org/packages/10/d5/d286b5dc3f40e32d2a9b3cab0b5b20a05d704958b44b4c5a9aed6472deab/mozlog-3.5.tar.gz", > "mozlog-3.5/mozlog") > > def _install_mozprocess(self): > self._ensure_autoinstalled_dir_is_in_sys_path() >- self._install("https://pypi.python.org/packages/cb/26/144dbc28d1f40e392f8a0cbee771ba624a61017f016c77ad88424d84b230/mozprocess-0.25.tar.gz#md5=07a04e6ae1a705705e4b44969fe7a182", >+ self._install("https://files.pythonhosted.org/packages/cb/26/144dbc28d1f40e392f8a0cbee771ba624a61017f016c77ad88424d84b230/mozprocess-0.25.tar.gz", > "mozprocess-0.25/mozprocess") > > def _install_pytest_timeout(self): >- self._install("https://pypi.python.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz#md5=83607d91aa163562c7ee835da57d061d", >+ self._install("https://files.pythonhosted.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-1.2.0.tar.gz", > "pytest-timeout-1.2.0/pytest_timeout.py") > > def _install_pytest(self): >- self._install("https://pypi.python.org/packages/90/e3/e075127d39d35f09a500ebb4a90afd10f9ef0a1d28a6d09abeec0e444fdd/py-1.5.2.tar.gz#md5=279ca69c632069e1b71e11b14641ca28", >+ self._install("https://files.pythonhosted.org/packages/90/e3/e075127d39d35f09a500ebb4a90afd10f9ef0a1d28a6d09abeec0e444fdd/py-1.5.2.tar.gz", > "py-1.5.2/py") >- self._install("https://pypi.python.org/packages/11/bf/cbeb8cdfaffa9f2ea154a30ae31a9d04a1209312e2919138b4171a1f8199/pluggy-0.6.0.tar.gz", >+ self._install("https://files.pythonhosted.org/packages/11/bf/cbeb8cdfaffa9f2ea154a30ae31a9d04a1209312e2919138b4171a1f8199/pluggy-0.6.0.tar.gz", > "pluggy-0.6.0/pluggy") >- self._install("https://pypi.python.org/packages/c0/2f/6773347277d76c5ade4414a6c3f785ef27e7f5c4b0870ec7e888e66a8d83/more-itertools-4.2.0.tar.gz", >+ self._install("https://files.pythonhosted.org/packages/c0/2f/6773347277d76c5ade4414a6c3f785ef27e7f5c4b0870ec7e888e66a8d83/more-itertools-4.2.0.tar.gz", > "more-itertools-4.2.0/more_itertools") >- self._install("https://pypi.python.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz", >+ self._install("https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz", > "six-1.11.0/six.py") >- self._install("https://pypi.python.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-1.1.5.tar.gz", >+ self._install("https://files.pythonhosted.org/packages/a1/e1/2d9bc76838e6e6667fde5814aa25d7feb93d6fa471bf6816daac2596e8b2/atomicwrites-1.1.5.tar.gz", > "atomicwrites-1.1.5/atomicwrites") >- self._install("https://pypi.python.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz", >+ self._install("https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz", > "funcsigs-1.0.2/funcsigs") >- self._install("https://pypi.python.org/packages/e4/ac/a04671e118b57bee87dabca1e0f2d3bda816b7a551036012d0ca24190e71/attrs-18.1.0.tar.gz", >+ self._install("https://files.pythonhosted.org/packages/e4/ac/a04671e118b57bee87dabca1e0f2d3bda816b7a551036012d0ca24190e71/attrs-18.1.0.tar.gz", > "attrs-18.1.0/src/attr") >- self._install("https://pypi.python.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz", >+ self._install("https://files.pythonhosted.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz", > "pytest-3.6.2/src/_pytest") >- self._install("https://pypi.python.org/packages/a2/ec/415d0cccc1ed41cd7fdf69ad989da16a8d13057996371004cab4bafc48f3/pytest-3.6.2.tar.gz", >- "pytest-3.6.2/src/pytest.py") > > def _install_pylint(self): > self._ensure_autoinstalled_dir_is_in_sys_path() >@@ -170,9 +168,9 @@ class AutoinstallImportHook(object): > files_to_remove = [] > if sys.platform == 'win32': > files_to_remove = ['test/data/write_protected_file.txt'] >- installer.install("https://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz#md5=77298ab2d8bb8b4af9219791e7cee8ce", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove) >- installer.install("https://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz#md5=ddaf66e4d85714d9c47a46d4bed406de", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng") >- installer.install('https://pypi.python.org/packages/source/p/pylint/pylint-0.25.2.tar.gz#md5=d878d7688a4f5290dc5b53a836872400', url_subpath="pylint-0.25.2", target_name="pylint") >+ installer.install("https://files.pythonhosted.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove) >+ installer.install("https://files.pythonhosted.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng") >+ installer.install('https://files.pythonhosted.org/packages/source/p/pylint/pylint-0.25.2.tar.gz', url_subpath="pylint-0.25.2", target_name="pylint") > > # autoinstalled.buildbot is used by BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py > # and should ideally match the version of BuildBot used at build.webkit.org. >@@ -184,29 +182,29 @@ class AutoinstallImportHook(object): > # without including other modules as a side effect. > jinja_dir = self._fs.join(_AUTOINSTALLED_DIR, "jinja2") > installer = AutoInstaller(append_to_search_path=True, target_dir=jinja_dir) >- installer.install(url="https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz#md5=1c49a8825c993bfdcf55bb36897d28a2", >+ installer.install(url="https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz", > url_subpath="Jinja2-2.6/jinja2") > > SQLAlchemy_dir = self._fs.join(_AUTOINSTALLED_DIR, "sqlalchemy") > installer = AutoInstaller(append_to_search_path=True, target_dir=SQLAlchemy_dir) >- installer.install(url="https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.7.7.tar.gz#md5=ddf6df7e014cea318fa981364f3f93b9", >+ installer.install(url="https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.7.7.tar.gz", > url_subpath="SQLAlchemy-0.7.7/lib/sqlalchemy") > > twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted") > installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) >- installer.install(url="https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5", url_subpath="Twisted-12.1.0/twisted") >+ installer.install(url="https://files.pythonhosted.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2", url_subpath="Twisted-12.1.0/twisted") > >- self._install("https://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz#md5=b6727d2810c692062c657492bcbeac6a", "buildbot-0.8.6p1/buildbot") >+ self._install("https://files.pythonhosted.org/packages/source/b/buildbot/buildbot-0.8.6p1.tar.gz", "buildbot-0.8.6p1/buildbot") > > def _install_coverage(self): > self._ensure_autoinstalled_dir_is_in_sys_path() >- self._install(url="https://pypi.python.org/packages/source/c/coverage/coverage-3.5.1.tar.gz#md5=410d4c8155a4dab222f2bc51212d4a24", url_subpath="coverage-3.5.1/coverage") >+ self._install(url="https://files.pythonhosted.org/packages/source/c/coverage/coverage-3.5.1.tar.gz", url_subpath="coverage-3.5.1/coverage") > > def _install_twisted_15_5_0(self): > twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted_15_5_0") > installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir) >- installer.install(url="https://pypi.python.org/packages/source/T/Twisted/Twisted-15.5.0.tar.bz2#md5=0831d7c90d0020062de0f7287530a285", url_subpath="Twisted-15.5.0/twisted") >- installer.install(url="https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz#md5=9ae3d24c0c7415deb249dd1a132f0f79", url_subpath="zope.interface-4.1.3/src/zope") >+ installer.install(url="https://files.pythonhosted.org/packages/source/T/Twisted/Twisted-15.5.0.tar.bz2", url_subpath="Twisted-15.5.0/twisted") >+ installer.install(url="https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz", url_subpath="zope.interface-4.1.3/src/zope") > > @staticmethod > def greater_than_equal_to_version(minimum, version): >@@ -219,18 +217,17 @@ class AutoinstallImportHook(object): > > def _install_selenium(self): > self._ensure_autoinstalled_dir_is_in_sys_path() >+ minimum_version = '3.5.0' >+ if os.path.isfile(os.path.join(_AUTOINSTALLED_DIR, 'selenium', '__init__.py')): >+ import selenium.webdriver >+ if AutoinstallImportHook.greater_than_equal_to_version(minimum_version, selenium.webdriver.__version__): >+ return >+ > try: > url, url_subpath = self.get_latest_pypi_url('selenium') > except urllib2.URLError: >- minimum_version = '3.5.0' >- if os.path.isfile(os.path.join(_AUTOINSTALLED_DIR, 'selenium', '__init__.py')): >- import selenium.webdriver >- if AutoinstallImportHook.greater_than_equal_to_version(minimum_version, selenium.webdriver.__version__): >- sys.stderr.write('\nFailed to find latest selenium, falling back to existing {} version\n'.format(selenium.webdriver.__version__)) >- return >- > # URL for installing the minimum required version. >- url = 'https://pypi.python.org/packages/ac/d7/1928416439d066c60f26c87a8d1b78a8edd64c7d05a0aa917fa97a8ee02d/selenium-3.5.0.tar.gz#986702fdd0e2aec6a4eda134678b8b3f' >+ url = 'https://files.pythonhosted.org/packages/ac/d7/1928416439d066c60f26c87a8d1b78a8edd64c7d05a0aa917fa97a8ee02d/selenium-3.5.0.tar.gz' > url_subpath = 'selenium-{}/selenium'.format(minimum_version) > sys.stderr.write('\nFailed to find latest selenium, falling back to minimum {} version\n'.format(minimum_version)) > self._install(url=url, url_subpath=url_subpath) >@@ -256,8 +253,8 @@ class AutoinstallImportHook(object): > installer.install(url=url, url_subpath=url_subpath, target_name=target_name) > > def get_latest_pypi_url(self, package_name, url_subpath_format='{name}-{version}/{lname}'): >- json_url = "https://pypi.python.org/pypi/%s/json" % package_name >- response = urllib2.urlopen(json_url) >+ json_url = "https://pypi.org/pypi/%s/json" % package_name >+ response = urllib2.urlopen(json_url, timeout=30) > data = json.load(response) > url = data['urls'][1]['url'] > subpath = url_subpath_format.format(name=package_name, version=data['info']['version'], lname=package_name.lower())
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192909
:
357837
|
357843
|
357846