<86>Sep 7 07:17:40 userdel[1893902]: delete user 'rooter' <86>Sep 7 07:17:40 userdel[1893902]: removed group 'rooter' owned by 'rooter' <86>Sep 7 07:17:40 userdel[1893902]: removed shadow group 'rooter' owned by 'rooter' <86>Sep 7 07:17:40 groupadd[1893918]: group added to /etc/group: name=rooter, GID=555 <86>Sep 7 07:17:40 groupadd[1893918]: group added to /etc/gshadow: name=rooter <86>Sep 7 07:17:40 groupadd[1893918]: new group: name=rooter, GID=555 <86>Sep 7 07:17:40 useradd[1893933]: new user: name=rooter, UID=555, GID=555, home=/root, shell=/bin/bash <86>Sep 7 07:17:40 userdel[1893945]: delete user 'builder' <86>Sep 7 07:17:40 userdel[1893945]: removed group 'builder' owned by 'builder' <86>Sep 7 07:17:40 userdel[1893945]: removed shadow group 'builder' owned by 'builder' <86>Sep 7 07:17:40 groupadd[1893953]: group added to /etc/group: name=builder, GID=556 <86>Sep 7 07:17:40 groupadd[1893953]: group added to /etc/gshadow: name=builder <86>Sep 7 07:17:40 groupadd[1893953]: new group: name=builder, GID=556 <86>Sep 7 07:17:40 useradd[1893957]: new user: name=builder, UID=556, GID=556, home=/usr/src, shell=/bin/bash <13>Sep 7 07:17:43 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Sep 7 07:17:43 rpmi: libexpat-2.2.9-alt1 sisyphus+252464.200.2.1 1590958865 installed <13>Sep 7 07:17:43 rpmi: libp11-kit-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Sep 7 07:17:43 rpmi: libtasn1-4.16.0-alt1 sisyphus+245480.100.1.1 1580825062 installed <13>Sep 7 07:17:43 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Sep 7 07:17:43 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Sep 7 07:17:43 rpmi: ca-certificates-2020.06.29-alt1 sisyphus+254237.300.1.1 1593450881 installed <13>Sep 7 07:17:43 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Sep 7 07:17:43 rpmi: p11-kit-trust-0.23.15-alt2 sisyphus+252784.100.2.2 1591274901 installed <13>Sep 7 07:17:43 rpmi: libcrypto1.1-1.1.1g-alt1 sisyphus+249982.60.8.1 1587743711 installed <13>Sep 7 07:17:43 rpmi: libssl1.1-1.1.1g-alt1 sisyphus+249982.60.8.1 1587743711 installed <13>Sep 7 07:17:43 rpmi: python3-3.8.5-alt1 sisyphus+244405.100.3.1 1595544514 installed <13>Sep 7 07:17:44 rpmi: python3-base-3.8.5-alt1 sisyphus+244405.100.3.1 1595544514 installed <13>Sep 7 07:17:44 rpmi: libpython3-3.8.5-alt1 sisyphus+244405.100.3.1 1595544514 installed <13>Sep 7 07:17:44 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Sep 7 07:17:44 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Sep 7 07:17:47 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994919 installed <13>Sep 7 07:17:47 rpmi: liblmdb-0.9.23-alt1 sisyphus+225277.100.2.1 1553001679 installed <13>Sep 7 07:17:47 rpmi: libkeyutils-1.6.1-alt1 sisyphus+256015.100.1.1 1596820124 installed <13>Sep 7 07:17:47 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091678 installed <86>Sep 7 07:17:47 groupadd[1910188]: group added to /etc/group: name=_keytab, GID=499 <86>Sep 7 07:17:47 groupadd[1910188]: group added to /etc/gshadow: name=_keytab <86>Sep 7 07:17:47 groupadd[1910188]: new group: name=_keytab, GID=499 <13>Sep 7 07:17:47 rpmi: libkrb5-1.18.2-alt2 sisyphus+254565.100.4.1 1594375666 installed <13>Sep 7 07:17:47 rpmi: libtirpc-1.2.6-alt1 sisyphus+250076.100.1.1 1587038270 installed <13>Sep 7 07:17:47 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Sep 7 07:17:47 rpmi: python-modules-encodings-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-modules-compiler-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-modules-email-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-modules-unittest-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-modules-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-modules-nis-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-modules-ctypes-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-modules-multiprocessing-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-modules-logging-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed <13>Sep 7 07:17:47 rpmi: python-tools-2to3-2.7.18-alt1 sisyphus+255741.100.1.1 1596450480 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python3-module-portal-0.3.1-alt2.nosrc.rpm <13>Sep 7 07:17:49 rpmi: python3-module-pkg_resources-1:46.1.3-alt1 sisyphus+250566.200.3.1 1587973342 installed <13>Sep 7 07:17:49 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Sep 7 07:17:50 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Sep 7 07:17:50 rpmi: python3-dev-3.8.5-alt1 sisyphus+244405.100.3.1 1595544514 installed <13>Sep 7 07:17:50 rpmi: python3-module-setuptools-1:46.1.3-alt1 sisyphus+250566.200.3.1 1587973342 installed Installing python3-module-portal-0.3.1-alt2.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.16668 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python3-module-portal-0.3.1 + echo 'Source #0 (python3-module-portal-0.3.1.tar):' Source #0 (python3-module-portal-0.3.1.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-portal-0.3.1.tar + cd python3-module-portal-0.3.1 + /bin/chmod -c -Rf u+rwX,go-w . + find -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./portal/cli.py --- ./portal/cli.py (original) +++ ./portal/cli.py (refactored) @@ -10,7 +10,7 @@ api = portal.API() def error(msg): - print >>sys.stderr, msg + print(msg, file=sys.stderr) sys.exit(1) def usage(): @@ -112,9 +112,9 @@ [api.CERT_TYPE_IOS_DEVELOPMENT, api.CERT_TYPE_IOS_DISTRIBUTION]) for certificate in certs: if 'r' in opts: - print certificate - else: - print '\t'.join(certificate[k] for k in keys) + print(certificate) + else: + print('\t'.join(certificate[k] for k in keys)) def cmd_list_apps(): keys = ('appIdId f1 f2 f3 f4 f5 f6 identifier name' if 'v' in opts else @@ -122,26 +122,26 @@ fkeys = 'inAppPurchase iCloud gameCenter push passbook dataProtection'.split() for app in api.all_app_ids(): if 'r' in opts: - print app + print(app) else: if 'v' in opts: features = app['features'] app.update({'f%d' % i: 'X' for i, k in enumerate(fkeys) if features[k]}) - print '\t'.join(app.get(k, '') for k in keys) + print('\t'.join(app.get(k, '') for k in keys)) def cmd_list_devices(*args): rc = 0 keys = ('deviceId status deviceNumber name' if 'v' in opts else 'deviceNumber name').split() for device in _filter_devices(args, include_all=True): - if isinstance(device, basestring): - print >>sys.stderr, "Device '%s' not found" % device + if isinstance(device, str): + print("Device '%s' not found" % device, file=sys.stderr) rc = 1 continue if 'r' in opts: - print device - else: - print '\t'.join(device[k] for k in keys) + print(device) + else: + print('\t'.join(device[k] for k in keys)) return rc def cmd_add_device(udid): @@ -152,11 +152,11 @@ for device in _filter_devices(args): if isinstance(device, dict): if 'q' not in opts: - print >>sys.stderr, "Deleting device '%s'" % device['deviceNumber'] + print("Deleting device '%s'" % device['deviceNumber'], file=sys.stderr) if 'n' not in opts: api.delete_device(device) else: - print >>sys.stderr, "Device '%s' not found" % device + print("Device '%s' not found" % device, file=sys.stderr) rc = 1 return rc @@ -165,11 +165,11 @@ for device in _filter_devices(args): if isinstance(device, dict): if 'q' not in opts: - print >>sys.stderr, "Enabling device '%s'" % device['deviceNumber'] + print("Enabling device '%s'" % device['deviceNumber'], file=sys.stderr) if 'n' not in opts: api.enable_device(device) else: - print >>sys.stderr, "Device '%s' not found" % device + print("Device '%s' not found" % device, file=sys.stderr) rc = 1 return rc @@ -191,14 +191,14 @@ def cmd_list_profiles(*args): rc = 0 for profile in _filter_profiles(args, include_all=True): - if isinstance(profile, basestring): - print >>sys.stderr, "Profile '%s' not found" % profile + if isinstance(profile, str): + print("Profile '%s' not found" % profile, file=sys.stderr) rc = 1 continue if 'r' in opts: - print profile + print(profile) elif 'v' in opts: - print '\t'.join(str(v) for v in ( + print('\t'.join(str(v) for v in ( profile['provisioningProfileId'], profile['status'], profile['certificateCount'], @@ -206,13 +206,13 @@ profile['dateExpire'], api.profile_type_name(profile), profile['appId']['identifier'], - profile['name'])) - else: - print '\t'.join(( + profile['name']))) + else: + RefactoringTool: Refactored ./portal/api.py print('\t'.join(( profile['provisioningProfileId'], api.profile_type_name(profile), profile['appId']['identifier'], - profile['name'])) + profile['name']))) return rc def cmd_get_profile(): @@ -231,11 +231,11 @@ filename = os.path.join(path, identifier, filename) api.download_profile(profile, filename) if 'q' not in opts: - print >>sys.stderr, '\rDownloading %d/%d profiles (%d%%)' % ( - ix + 1, len(profiles), (ix + 1) * 100 / len(profiles)), + print('\rDownloading %d/%d profiles (%d%%)' % ( + ix + 1, len(profiles), (ix + 1) * 100 / len(profiles)), end=' ', file=sys.stderr) lf_pending = True if lf_pending: - print >>sys.stderr + print(file=sys.stderr) elif 'i' in opts: api.download_profile(opts['i'], opts.get('o', sys.stdout)) else: @@ -258,33 +258,33 @@ if (not api.is_profile_expired(profile) and profile['deviceCount'] == len(devs)): if 'v' in opts: - print >>sys.stderr, '\rSkipping %s (%s)' % ( - profile_id, profile['name']) + print('\rSkipping %s (%s)' % ( + profile_id, profile['name']), file=sys.stderr) continue certs = dev_certs if profile_type == 'development' else dist_certs if 'v' not in opts and 'q' not in opts: - print >>sys.stderr, '\rRegenerating %d/%d profiles (%d%%)' % ( - ix + 1, len(profiles), (ix + 1 ) * 100 / len(profiles)), + print('\rRegenerating %d/%d profiles (%d%%)' % ( + ix + 1, len(profiles), (ix + 1 ) * 100 / len(profiles)), end=' ', file=sys.stderr) lf_pending = True if 'v' in opts: - print >>sys.stderr, 'Regenerating %s (%s)' % ( - profile_id, profile['name']) + print('Regenerating %s (%s)' % ( + profile_id, profile['name']), file=sys.stderr) if 'n' not in opts: api.update_provisioning_profile(profile, device_ids=devs, certificate_ids=certs) if lf_pending: - print >>sys.stderr + print(file=sys.stderr) def cmd_delete_profile(*args): rc = 0 for profile in _filter_profiles(args): if isinstance(profile, dict): if 'q' not in opts: - print >>sys.stderr, "Deleting profile '%s'" % profile['provisioningProfileId'] + print("Deleting profile '%s'" % profile['provisioningProfileId'], file=sys.stderr) if 'n' not in opts: api.delete_provisioning_profile(profile) else: - print >>sys.stderr, "Profile '%s' not found" % profile + print("Profile '%s' not found" % profile, file=sys.stderr) rc = 1 return rc @@ -309,4 +309,4 @@ return profiles def cmd_whoami(*args): - print '%s (%s)' % (api.user, api.team_id) + print('%s (%s)' % (api.user, api.team_id)) --- ./portal/api.py (original) +++ ./portal/api.py (refactored) @@ -1,15 +1,15 @@ #!/usr/bin/env python from functools import wraps -import cookielib -import HTMLParser +import http.cookiejar +import html.parser import json import os import sys import re -import urllib -import urllib2 -import urlparse +import urllib.request, urllib.parse, urllib.error +import urllib.request, urllib.error, urllib.parse +import urllib.parse import uuid def cached(wrapped): @@ -58,7 +58,7 @@ GET_TEAM_ID_URL = 'https://developer.apple.com/account/ios/certificate/certificateList.action' - class _LoginHTMLParser(HTMLParser.HTMLParser): + class _LoginHTMLParser(html.parser.HTMLParser): def handle_starttag(self, tag, attrs): if tag == "form": attrs = { k: v for k, v in attrs } @@ -67,14 +67,14 @@ def feed(self, data): try: - HTMLParser.HTMLParser.feed(self, data) - except HTMLParser.HTMLParseError: + html.parser.HTMLParser.feed(self, data) + except html.parser.HTMLParseError: pass def __init__(self, debug=False): - cookie_jar = cookielib.CookieJar() - processor = urllib2.HTTPCookieProcessor(cookie_jar) - self._opener = urllib2.build_opener(processor) + cookie_jar = http.cookiejar.CookieJar() + processor = urllib.request.HTTPCookieProcessor(cookie_jar) + self._opener = urllib.request.build_opener(processor) self._debug = debug def login(self, user=None, password=None): @@ -87,35 +87,35 @@ parser.feed(page) if not parser.url: if self._debug: - print >>sys.stderr, "Page contents:\n%s" % page + print("Page contents:\n%s" % page, file=sys.stderr) raise APIException("Login failed: unable to locate login URL (HTML scraping failure)") - scheme, netloc, _, _, _, _ = urlparse.urlparse(r.geturl()) + scheme, netloc, _, _, _, _ = urllib.parse.urlparse(r.geturl()) url = '%s://%s%s' % (scheme, netloc, parser.url) params = dict(theAccountName=user, theAccountPW=password, theAuxValue='') - r = self._opener.open(url, urllib.urlencode(params)) + r = self._opener.open(url, urllib.parse.urlencode(params)) r = self._opener.open(self.GET_TEAM_ID_URL) page = r.read() matcher = re.search(r'teamId=([A-Z0-9]*)', page) if not matcher: if self._debug: - print >>sys.stderr, "Login failed, page contents:\n%s" % page + print("Login failed, page contents:\n%s" % page, file=sys.stderr) raise APIException("Login failed, please check credentials (using %s)" % user) self.team_id = matcher.group(1) self.user = user - except urllib2.URLError as e: + except urllib.error.URLError as e: raise e def _api(self, cmd, form={}, **kwargs): try: if isinstance(form, (dict, list)): - form = urllib.urlencode(form) + form = urllib.parse.urlencode(form) kwargs['content-type'] = 'text/x-url-arguments' kwargs['accept'] = 'application/json' kwargs['requestId'] = str(uuid.uuid4()) kwargs['userLocale'] = 'en_US' kwargs['teamId'] = self.team_id - query = urllib.urlencode(kwargs) + query = urllib.parse.urlencode(kwargs) url = "%s/%s?%s" % (self.DEVELOPER_SERVICES_URL, cmd, query) response = self._opener.open(url, form) assert response.getcode() == 200, "Error %" % response.getcode() @@ -124,7 +124,7 @@ if rc not in [ 0, 8500 ]: raise APIServiceException(data) return data - except urllib2.URLError as e: + except urllib.error.URLError as e: raise e def _find_credentials(self): @@ -149,13 +149,13 @@ break path = os.path.dirname(path) - import ConfigParser + import configparser group = os.environ.get('PORTAL_ENVIRONMENT', 'Default') try: - cfg = ConfigParser.RawConfigParser() + cfg = configparser.RawConfigParser() cfg.read(search_path()) return cfg.get(group, 'user'), cfg.get(group, 'password') - except ConfigParser.Error: + except configparser.Error: raise APIException('Missing credentials ' '(.portalrc section [%s] / PORTAL_CREDENTIALS)' % group) @@ -202,7 +202,7 @@ return [ self.get_app_id(a) for a in app_id ] if isinstance(app_id, dict): return app_id - if not isinstance(app_id, basestring): + if not isinstance(app_id, str): raRefactoringTool: No changes to ./portal/_version.py RefactoringTool: Refactored ./portal/__init__.py RefactoringTool: Refactored ./portal.py ise APIException('invalid app_id %s' % app_id) try: if '.' in app_id: @@ -225,7 +225,7 @@ for d in device ] if isinstance(device, dict): return device - if not isinstance(device, basestring): + if not isinstance(device, str): raise APIException('invalid device %s' % device) try: if re.match('[0-9a-f]{40}', device, re.I): @@ -251,14 +251,14 @@ return data['device'] def delete_device(self, device): - if not isinstance(device, (basestring, dict)): + if not isinstance(device, (str, dict)): raise APIException('invalid device %s' % device) device = self.get_device(device) self._api('device/deleteDevice', deviceId=device['deviceId']) def enable_device(self, device): - if not isinstance(device, (basestring, dict)): + if not isinstance(device, (str, dict)): raise APIException('invalid device %s' % device) device = self.get_device(device) data = self._api('device/enableDevice', @@ -277,7 +277,7 @@ for p in profile ] if isinstance(profile, dict): return profile - if not isinstance(profile, basestring): + if not isinstance(profile, str): raise APIException('invalid profile id %s' % profile) try: return next(p for p in self.all_provisioning_profiles() @@ -292,7 +292,7 @@ if not 0 <= profile_type < 3: raise APIException('profile_type must be one of ' + ', '.join(t for t in dir(API) if t.startswith('PROFILE_TYPE_'))) - if not isinstance(app_id, (dict, basestring)): + if not isinstance(app_id, (dict, str)): raise APIException('invalid app_id %s' % app_id) distribution_type = 'limited adhoc store'.split()[profile_type] if profile_type == self.PROFILE_TYPE_DEVELOPMENT: @@ -347,7 +347,7 @@ return obj if isinstance(obj, (list, tuple)): return [ self._unwrap(o, key) for o in obj ] - if isinstance(obj, basestring): + if isinstance(obj, str): return obj return obj[key] @@ -372,7 +372,7 @@ return self._api('profile/regenProvisioningProfile', form=form) def _make_dev_url(self, path, **kwargs): - query = urllib.urlencode(kwargs) + query = urllib.parse.urlencode(kwargs) return "%s/%s.action?%s" % (self.DEVELOPER_URL, path, query) def download_profile(self, profile, file_or_filename): @@ -384,13 +384,13 @@ r = self._opener.open(url) assert r.getcode() == 200, 'Unable to download profile [%s]' % profile profile = r.read() - if isinstance(file_or_filename, basestring): + if isinstance(file_or_filename, str): _ensure_parents_exist(file_or_filename) with open(file_or_filename, 'wb') as f: f.write(profile) else: file_or_filename.write(profile) - except urllib2.HTTPError as e: + except urllib.error.HTTPError as e: if e.getcode() == 404: raise APIException("Profile '%s' not found" % profile) raise e @@ -400,7 +400,7 @@ if not 0 <= profile < len(API._PROFILE_TYPE_LABELS): raise APIException('Invalid profile type %s' % profile) return profile - if isinstance(profile, basestring): + if isinstance(profile, str): try: return self.profile_type(int(profile)) except ValueError: --- ./portal/__init__.py (original) +++ ./portal/__init__.py (refactored) @@ -1,4 +1,4 @@ -from __future__ import absolute_import + from .api import API, APIException from ._version import __version__ --- ./portal.py (original) +++ ./portal.py (refactored) @@ -1,15 +1,15 @@ #!/usr/bin/env python from functools import wraps -import cookielib -import HTMLParser +import http.cookiejar +import html.parser import json import os import re import sys -import urllib -import urllib2 -import urlparse +import urllib.request, urllib.parse, urllib.error +import urllib.request, urllib.error, urllib.parse +import urllib.parse def cached(wrapped): @wraps(wrapped) @@ -46,7 +46,7 @@ GET_TEAM_ID_URL = 'https://developer.apple.com/account/ios/certificate/certificateList.action' - class LoginHTMLParser(HTMLParser.HTMLParser): + class LoginHTMLParser(html.parser.HTMLParser): def handle_starttag(self, tag, attrs): if tag == "form": attrs = { k: v for k, v in attrs } @@ -55,14 +55,14 @@ def feed(self, data): try: - HTMLParser.HTMLParser.feed(self, data) - except HTMLParser.HTMLParseError: + html.parser.HTMLParser.feed(self, data) + except html.parser.HTMLParseError: pass def __init__(self): - cookie_jar = cookielib.CookieJar() - processor = urllib2.HTTPCookieProcessor(cookie_jar) - self.opener = urllib2.build_opener(processor) + cookie_jar = http.cookiejar.CookieJar() + processor = urllib.request.HTTPCookieProcessor(cookie_jar) + self.opener = urllib.request.build_opener(processor) def login(self, user=None, password=None): try: @@ -71,29 +71,29 @@ parser = self.LoginHTMLParser() parser.feed(r.read()) assert parser.url, 'Unable to locate login post URL' - scheme, netloc, _, _, _, _ = urlparse.urlparse(r.geturl()) + scheme, netloc, _, _, _, _ = urllib.parse.urlparse(r.geturl()) url = '%s://%s%s' % (scheme, netloc, parser.url) params = dict(theAccountName=user, theAccountPW=password, theAuxValue='') - r = self.opener.open(url, urllib.urlencode(params)) + r = self.opener.open(url, urllib.parse.urlencode(params)) assert r.getcode() == 200, "Unable to login" r = self.opener.open(self.GET_TEAM_ID_URL) assert r.getcode() == 200, "Unable to retrieve Team ID" matcher = re.search(r'teamId=([A-Z0-9]*)', r.read()) assert matcher, "Unable to locate Team ID" self.team_id = matcher.group(1) - except urllib2.URLError as e: + except urllib.error.URLError as e: raise e def _api(self, cmd, form={}, **kwargs): if isinstance(form, (dict, list)): - form = urllib.urlencode(form) + form = urllib.parse.urlencode(form) kwargs['content-type'] = 'text/x-url-arguments' kwargs['accept'] = 'application/json' kwargs['requestId'] = uuid() kwargs['userLocale'] = 'en_US' kwargs['teamId'] = self.team_id - query = urllib.urlencode(kwargs) + query = urllib.parse.urlencode(kwargs) url = "%s/%s?%s" % (self.DEVELOPER_SERVICES_URL, cmd, query) response = self.opener.open(url, form) assert response.getcode() == 200, "Error %" % response.getcode() @@ -170,7 +170,7 @@ return self._api('profile/regenProvisioningProfile', form=form) def _make_dev_url(self, path, **kwargs): - query = urllib.urlencode(kwargs) + query = urllib.parse.urlencode(kwargs) return "%s/%s.action?%s" % (self.DEVELOPER_URL, path, query) def download_profile(self, profile, filename): @@ -214,7 +214,7 @@ if 'DISTRO' in profile['name']: is_appstore = True is_dev = is_adhoc = False - print >>sys.stderr, identifier + print(identifier, file=sys.stderr) devs = devices if profile['deviceCount'] and 'DISTRO' not in profile['name'] and 'AppStore' not in profile['name'] else [] certs = dev_certs if profile['type'] == 'Development' else dist_certs api.update_provisioning_profile(profile, @@ -240,4 +240,4 @@ api.download_profile(profile, fileRefactoringTool: Files that were modified: RefactoringTool: ./setup.py RefactoringTool: ./portal/cli.py RefactoringTool: ./portal/api.py RefactoringTool: ./portal/_version.py RefactoringTool: ./portal/__init__.py RefactoringTool: ./portal.py name) else: profiles = api.all_provisioning_profiles() - print json.dumps([ p for p in profiles if p['name'].startswith('Test') ], indent=4) + print(json.dumps([ p for p in profiles if p['name'].startswith('Test') ], indent=4)) + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.44680 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-portal-0.3.1 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py build --debug running build running build_py creating build creating build/lib creating build/lib/portal copying portal/cli.py -> build/lib/portal copying portal/api.py -> build/lib/portal copying portal/_version.py -> build/lib/portal copying portal/__init__.py -> build/lib/portal running egg_info creating portal.egg-info writing portal.egg-info/PKG-INFO writing dependency_links to portal.egg-info/dependency_links.txt writing entry points to portal.egg-info/entry_points.txt writing top-level names to portal.egg-info/top_level.txt writing manifest file 'portal.egg-info/SOURCES.txt' reading manifest file 'portal.egg-info/SOURCES.txt' writing manifest file 'portal.egg-info/SOURCES.txt' + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.21454 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-portal-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python3-module-portal-buildroot + cd python3-module-portal-0.3.1 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python3 setup.py install --skip-build --root=/usr/src/tmp/python3-module-portal-buildroot --force running install running install_lib creating /usr/src/tmp/python3-module-portal-buildroot creating /usr/src/tmp/python3-module-portal-buildroot/usr creating /usr/src/tmp/python3-module-portal-buildroot/usr/lib creating /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3 creating /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal copying build/lib/portal/__init__.py -> /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal copying build/lib/portal/_version.py -> /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal copying build/lib/portal/api.py -> /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal copying build/lib/portal/cli.py -> /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal byte-compiling /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__init__.py to __init__.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/_version.py to _version.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/api.py to api.cpython-38.pyc byte-compiling /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/cli.py to cli.cpython-38.pyc running install_egg_info running egg_info writing portal.egg-info/PKG-INFO writing dependency_links to portal.egg-info/dependency_links.txt writing entry points to portal.egg-info/entry_points.txt writing top-level names to portal.egg-info/top_level.txt reading manifest file 'portal.egg-info/SOURCES.txt' writing manifest file 'portal.egg-info/SOURCES.txt' Copying portal.egg-info to /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal-0.3.1-py3.8.egg-info running install_scripts Installing portal script to /usr/src/tmp/python3-module-portal-buildroot/usr/bin + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python3-module-portal-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python3-module-portal-buildroot (binconfig,pkgconfig,libtool,desktop) Checking contents of files in /usr/src/tmp/python3-module-portal-buildroot/ (default) Compressing files in /usr/src/tmp/python3-module-portal-buildroot (auto) Adjusting library links in /usr/src/tmp/python3-module-portal-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python3-module-portal-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python modules in /usr/src/tmp/python3-module-portal-buildroot using /usr/bin/python2.7 Bytecompiling python modules with optimization in /usr/src/tmp/python3-module-portal-buildroot using /usr/bin/python2.7 -O Bytecompiling python3 modules in /usr/src/tmp/python3-module-portal-buildroot using /usr/bin/python3 unlink /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-38.pyc unlink /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-38.pyc unlink /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__pycache__/api.cpython-38.pyc unlink /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-38.pyc compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__init__.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/_version.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/api.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/cli.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-portal-buildroot using /usr/bin/python3 -O compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__init__.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/_version.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/api.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/cli.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-portal-buildroot using /usr/bin/python3 -OO compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__init__.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/_version.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/api.py compile /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/cli.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-38.pyc' './usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-38.pyc' './usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-38.opt-1.pyc' './usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-38.opt-1.pyc' => './usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-38.pyc' './usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-38.opt-2.pyc' => './usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-38.opt-1.pyc' Hardlinking identical .pyc and .pyo files Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.22745 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-portal-0.3.1 + /usr/bin/python3 setup.py test running test WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox. running egg_info writing portal.egg-info/PKG-INFO writing dependency_links to portal.egg-info/dependency_links.txt writing entry points to portal.egg-info/entry_points.txt writing top-level names to portal.egg-info/top_level.txt reading manifest file 'portal.egg-info/SOURCES.txt' writing manifest file 'portal.egg-info/SOURCES.txt' running build_ext ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK + exit 0 Processing files: python3-module-portal-0.3.1-alt2 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.39792 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python3-module-portal-0.3.1 + DOCDIR=/usr/src/tmp/python3-module-portal-buildroot/usr/share/doc/python3-module-portal-0.3.1 + export DOCDIR + rm -rf /usr/src/tmp/python3-module-portal-buildroot/usr/share/doc/python3-module-portal-0.3.1 + /bin/mkdir -p /usr/src/tmp/python3-module-portal-buildroot/usr/share/doc/python3-module-portal-0.3.1 + cp -prL AUTHORS CHANGES README.rst /usr/src/tmp/python3-module-portal-buildroot/usr/share/doc/python3-module-portal-0.3.1 + chmod -R go-w /usr/src/tmp/python3-module-portal-buildroot/usr/share/doc/python3-module-portal-0.3.1 + chmod -R a+rX /usr/src/tmp/python3-module-portal-buildroot/usr/share/doc/python3-module-portal-0.3.1 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.NVDapV find-provides: running scripts (alternatives,debuginfo,lib,pam,perl,pkgconfig,python,python3,shell) Finding Requires (using /usr/lib/rpm/find-requires) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.vDIOOW find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services) python3.req: /usr/src/tmp/python3-module-portal-buildroot/usr/bin/portal: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__init__.py: line=3 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/__init__.py: line=4 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/api.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/api.py: line=152 IGNORE (for REQ=slight and deep=11) module=configparser python3.req: /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/cli.py: skipping sys shebang.req.files: executable script /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/api.py is not executable shebang.req.files: executable script /usr/src/tmp/python3-module-portal-buildroot/usr/lib/python3/site-packages/portal/cli.py is not executable Provides: python3(portal), python3(portal._version), python3(portal.api), python3(portal.cli) Requires: /usr/bin/python3, /usr/lib/python3/site-packages, python3(functools) < 0, python3(getopt) < 0, python3(html.parser) < 0, python3(http.cookiejar) < 0, python3(json) < 0, python3(os) < 0, python3(pkg_resources) < 0, python3(re) < 0, python3(urllib.error) < 0, python3(urllib.parse) < 0, python3(urllib.request) < 0, python3(uuid) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python3-module-portal-0.3.1-alt2.noarch.rpm 7.14user 0.61system 0:09.23elapsed 84%CPU (0avgtext+0avgdata 20740maxresident)k 0inputs+0outputs (0major+151351minor)pagefaults 0swaps 16.19user 4.91system 0:22.85elapsed 92%CPU (0avgtext+0avgdata 110392maxresident)k 0inputs+0outputs (0major+590653minor)pagefaults 0swaps --- python3-module-portal-0.3.1-alt2.noarch.rpm.repo 2020-01-09 15:28:31.000000000 +0000 +++ python3-module-portal-0.3.1-alt2.noarch.rpm.hasher 2020-09-07 07:18:00.796995797 +0000 @@ -2,22 +2,22 @@ /usr/lib/python3/site-packages/portal 40755 -/usr/lib/python3/site-packages/portal-0.3.1-py3.7.egg-info 40755 -/usr/lib/python3/site-packages/portal-0.3.1-py3.7.egg-info/PKG-INFO 100644 -/usr/lib/python3/site-packages/portal-0.3.1-py3.7.egg-info/SOURCES.txt 100644 -/usr/lib/python3/site-packages/portal-0.3.1-py3.7.egg-info/dependency_links.txt 100644 -/usr/lib/python3/site-packages/portal-0.3.1-py3.7.egg-info/entry_points.txt 100644 -/usr/lib/python3/site-packages/portal-0.3.1-py3.7.egg-info/top_level.txt 100644 +/usr/lib/python3/site-packages/portal-0.3.1-py3.8.egg-info 40755 +/usr/lib/python3/site-packages/portal-0.3.1-py3.8.egg-info/PKG-INFO 100644 +/usr/lib/python3/site-packages/portal-0.3.1-py3.8.egg-info/SOURCES.txt 100644 +/usr/lib/python3/site-packages/portal-0.3.1-py3.8.egg-info/dependency_links.txt 100644 +/usr/lib/python3/site-packages/portal-0.3.1-py3.8.egg-info/entry_points.txt 100644 +/usr/lib/python3/site-packages/portal-0.3.1-py3.8.egg-info/top_level.txt 100644 /usr/lib/python3/site-packages/portal/__init__.py 100644 /usr/lib/python3/site-packages/portal/__pycache__ 40755 -/usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/api.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/api.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/api.cpython-37.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-37.opt-1.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-37.opt-2.pyc 100644 -/usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-37.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/__init__.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/_version.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/api.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/api.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/api.cpython-38.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-38.opt-1.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-38.opt-2.pyc 100644 +/usr/lib/python3/site-packages/portal/__pycache__/cli.cpython-38.pyc 100644 /usr/lib/python3/site-packages/portal/_version.py 100644