[yt-svn] commit/yt: 8 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Mar 16 18:40:53 PDT 2016
8 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/81fb459b2ea9/
Changeset: 81fb459b2ea9
Branch: yt
User: migueldvb
Date: 2016-03-14 16:14:06+00:00
Summary: Use parentheses in call to print
Affected #: 2 files
diff -r 02dd7d47781782a1e30561f1c4337111a02f7183 -r 81fb459b2ea91f08c545c8194b636b3ebcd9de70 scripts/iyt
--- a/scripts/iyt
+++ b/scripts/iyt
@@ -17,7 +17,7 @@
try:
import IPython
except:
- print 'ipython is not available. using default python interpreter.'
+ print('ipython is not available. using default python interpreter.')
import code
import sys
code.interact(doc, None, namespace)
diff -r 02dd7d47781782a1e30561f1c4337111a02f7183 -r 81fb459b2ea91f08c545c8194b636b3ebcd9de70 scripts/pr_backport.py
--- a/scripts/pr_backport.py
+++ b/scripts/pr_backport.py
@@ -280,17 +280,17 @@
if commit_already_on_stable(repo_path, commits[0]) is True:
continue
message = "hg graft %s\n" % commits[0]
- print "PR #%s\nTitle: %s\nCreated on: %s\nLink: %s\n%s" % pr_desc
- print "To backport, issue the following command(s):\n"
- print message
+ print("PR #%s\nTitle: %s\nCreated on: %s\nLink: %s\n%s" % pr_desc)
+ print("To backport, issue the following command(s):\n")
+ print(message)
raw_input('Press any key to continue')
if __name__ == "__main__":
- print ""
- print "Gathering PR information, this may take a minute."
- print "Don't worry, yt loves you."
- print ""
+ print("")
+ print("Gathering PR information, this may take a minute.")
+ print("Don't worry, yt loves you.")
+ print("")
repo_path = clone_new_repo()
try:
last_major_release = get_first_commit_after_last_major_release(repo_path)
@@ -308,8 +308,8 @@
del inv_map[None]
inv_map = screen_already_backported(repo_path, inv_map)
- print "In another terminal window, navigate to the following path:"
- print "%s" % repo_path
+ print("In another terminal window, navigate to the following path:")
+ print("%s" % repo_path)
raw_input("Press any key to continue")
backport_pr_commits(repo_path, inv_map, last_stable, prs)
raw_input(
https://bitbucket.org/yt_analysis/yt/commits/9dc9ace63ef5/
Changeset: 9dc9ace63ef5
Branch: yt
User: migueldvb
Date: 2016-03-16 18:09:14+00:00
Summary: Added future statement and fixed trailing whitespace
Affected #: 2 files
diff -r 81fb459b2ea91f08c545c8194b636b3ebcd9de70 -r 9dc9ace63ef5d520ede5613aed9466f5c1ac389c scripts/iyt
--- a/scripts/iyt
+++ b/scripts/iyt
@@ -1,4 +1,5 @@
#!python
+from __future__ import print_function
import os, re
from distutils.version import LooseVersion
from yt.mods import *
@@ -70,7 +71,7 @@
Feel free to edit this file to customize your ipython experience.
Note that as such this file does nothing, for backwards compatibility.
-Consult e.g. file 'ipy_profile_sh.py' for an example of the things
+Consult e.g. file 'ipy_profile_sh.py' for an example of the things
you can do here.
See http://ipython.scipy.org/moin/IpythonExtensionApi for detailed
@@ -110,7 +111,7 @@
if not m:
raise try_next
-
+
expr, attr = m.group(1, 3)
#print "COMPLETING ON ", expr, attr
#print type(self.Completer), dir(self.Completer)
@@ -122,8 +123,8 @@
try:
obj = eval(expr, self.Completer.global_namespace)
except:
- raise IPython.ipapi.TryNext
-
+ raise IPython.ipapi.TryNext
+
if isinstance(obj, (YTDataContainer, ) ):
#print "COMPLETING ON THIS THING"
all_fields = [f for f in sorted(
diff -r 81fb459b2ea91f08c545c8194b636b3ebcd9de70 -r 9dc9ace63ef5d520ede5613aed9466f5c1ac389c scripts/pr_backport.py
--- a/scripts/pr_backport.py
+++ b/scripts/pr_backport.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import hglib
import requests
import shutil
https://bitbucket.org/yt_analysis/yt/commits/2aaa60f5c41c/
Changeset: 2aaa60f5c41c
Branch: yt
User: migueldvb
Date: 2016-03-16 18:12:20+00:00
Summary: re moduel is already imported
Affected #: 1 file
diff -r 9dc9ace63ef5d520ede5613aed9466f5c1ac389c -r 2aaa60f5c41cf45c742b55e0e257dd0ad3439725 scripts/iyt
--- a/scripts/iyt
+++ b/scripts/iyt
@@ -97,7 +97,6 @@
# http://pymel.googlecode.com/svn/trunk/tools/ipymel.py
# We'll start with some fields.
-import re
def yt_fieldname_completer(self, event):
"""Match dictionary completions"""
#print "python_matches", event.symbol
https://bitbucket.org/yt_analysis/yt/commits/b25a1797bd28/
Changeset: b25a1797bd28
Branch: yt
User: migueldvb
Date: 2016-03-16 18:35:55+00:00
Summary: import input builtin function from six.moves
Affected #: 1 file
diff -r 2aaa60f5c41cf45c742b55e0e257dd0ad3439725 -r b25a1797bd28261d003bd93f0824771991a09ec5 scripts/pr_backport.py
--- a/scripts/pr_backport.py
+++ b/scripts/pr_backport.py
@@ -7,6 +7,7 @@
from datetime import datetime
from distutils.version import LooseVersion
from time import strptime, mktime
+from yt.extern.six.moves import input
MERGED_PR_ENDPOINT = ("http://bitbucket.org/api/2.0/repositories/yt_analysis/"
"yt/pullrequests/?state=MERGED")
@@ -284,7 +285,7 @@
print("PR #%s\nTitle: %s\nCreated on: %s\nLink: %s\n%s" % pr_desc)
print("To backport, issue the following command(s):\n")
print(message)
- raw_input('Press any key to continue')
+ input('Press any key to continue')
if __name__ == "__main__":
@@ -311,9 +312,9 @@
inv_map = screen_already_backported(repo_path, inv_map)
print("In another terminal window, navigate to the following path:")
print("%s" % repo_path)
- raw_input("Press any key to continue")
+ input("Press any key to continue")
backport_pr_commits(repo_path, inv_map, last_stable, prs)
- raw_input(
+ input(
"Now you need to push your backported changes. The temporary\n"
"repository currently being used will be deleted as soon as you\n"
"press any key.")
https://bitbucket.org/yt_analysis/yt/commits/bf48669116f1/
Changeset: bf48669116f1
Branch: yt
User: migueldvb
Date: 2016-03-16 18:46:06+00:00
Summary: Shorten call to isinstance function and formatting changes
Affected #: 1 file
diff -r b25a1797bd28261d003bd93f0824771991a09ec5 -r bf48669116f109a779f6828dc2ea041fca6966e3 scripts/iyt
--- a/scripts/iyt
+++ b/scripts/iyt
@@ -97,6 +97,7 @@
# http://pymel.googlecode.com/svn/trunk/tools/ipymel.py
# We'll start with some fields.
+
def yt_fieldname_completer(self, event):
"""Match dictionary completions"""
#print "python_matches", event.symbol
@@ -124,7 +125,7 @@
except:
raise IPython.ipapi.TryNext
- if isinstance(obj, (YTDataContainer, ) ):
+ if isinstance(obj, YTDataContainer):
#print "COMPLETING ON THIS THING"
all_fields = [f for f in sorted(
obj.ds.field_list + obj.ds.derived_field_list)]
@@ -135,6 +136,6 @@
raise try_next
-ip.set_hook('complete_command', yt_fieldname_completer , re_key = ".*" )
+ip.set_hook('complete_command', yt_fieldname_completer, re_key = ".*")
ip_shell.mainloop(**kwargs)
https://bitbucket.org/yt_analysis/yt/commits/79d73463644b/
Changeset: 79d73463644b
Branch: yt
User: migueldvb
Date: 2016-03-16 20:20:22+00:00
Summary: specify exception
Affected #: 1 file
diff -r bf48669116f109a779f6828dc2ea041fca6966e3 -r 79d73463644b6ccc18d853cf8d438bba773f9052 scripts/iyt
--- a/scripts/iyt
+++ b/scripts/iyt
@@ -17,7 +17,7 @@
try:
import IPython
-except:
+except ImportError:
print('ipython is not available. using default python interpreter.')
import code
import sys
https://bitbucket.org/yt_analysis/yt/commits/4537ad5e010c/
Changeset: 4537ad5e010c
Branch: yt
User: migueldvb
Date: 2016-03-16 21:26:47+00:00
Summary: write import statements in separate lines
Affected #: 1 file
diff -r 79d73463644b6ccc18d853cf8d438bba773f9052 -r 4537ad5e010cded874f6f7978a4ed35fd543172c scripts/iyt
--- a/scripts/iyt
+++ b/scripts/iyt
@@ -1,6 +1,7 @@
#!python
from __future__ import print_function
-import os, re
+import os
+import re
from distutils.version import LooseVersion
from yt.mods import *
from yt.data_objects.data_containers import YTDataContainer
https://bitbucket.org/yt_analysis/yt/commits/1cc2beb515d1/
Changeset: 1cc2beb515d1
Branch: yt
User: ngoldbaum
Date: 2016-03-17 01:40:43+00:00
Summary: Merged in migueldvb/yt (pull request #2046)
Use parentheses in call to print
Affected #: 2 files
diff -r 9f8461c82f40422fce303ee43132a0c8b7afbc65 -r 1cc2beb515d168c04a39df000d33bd4f06f987d4 scripts/iyt
--- a/scripts/iyt
+++ b/scripts/iyt
@@ -1,5 +1,7 @@
#!python
-import os, re
+from __future__ import print_function
+import os
+import re
from distutils.version import LooseVersion
from yt.mods import *
from yt.data_objects.data_containers import YTDataContainer
@@ -16,8 +18,8 @@
try:
import IPython
-except:
- print 'ipython is not available. using default python interpreter.'
+except ImportError:
+ print('ipython is not available. using default python interpreter.')
import code
import sys
code.interact(doc, None, namespace)
@@ -70,7 +72,7 @@
Feel free to edit this file to customize your ipython experience.
Note that as such this file does nothing, for backwards compatibility.
-Consult e.g. file 'ipy_profile_sh.py' for an example of the things
+Consult e.g. file 'ipy_profile_sh.py' for an example of the things
you can do here.
See http://ipython.scipy.org/moin/IpythonExtensionApi for detailed
@@ -96,7 +98,7 @@
# http://pymel.googlecode.com/svn/trunk/tools/ipymel.py
# We'll start with some fields.
-import re
+
def yt_fieldname_completer(self, event):
"""Match dictionary completions"""
#print "python_matches", event.symbol
@@ -110,7 +112,7 @@
if not m:
raise try_next
-
+
expr, attr = m.group(1, 3)
#print "COMPLETING ON ", expr, attr
#print type(self.Completer), dir(self.Completer)
@@ -122,9 +124,9 @@
try:
obj = eval(expr, self.Completer.global_namespace)
except:
- raise IPython.ipapi.TryNext
-
- if isinstance(obj, (YTDataContainer, ) ):
+ raise IPython.ipapi.TryNext
+
+ if isinstance(obj, YTDataContainer):
#print "COMPLETING ON THIS THING"
all_fields = [f for f in sorted(
obj.ds.field_list + obj.ds.derived_field_list)]
@@ -135,6 +137,6 @@
raise try_next
-ip.set_hook('complete_command', yt_fieldname_completer , re_key = ".*" )
+ip.set_hook('complete_command', yt_fieldname_completer, re_key = ".*")
ip_shell.mainloop(**kwargs)
diff -r 9f8461c82f40422fce303ee43132a0c8b7afbc65 -r 1cc2beb515d168c04a39df000d33bd4f06f987d4 scripts/pr_backport.py
--- a/scripts/pr_backport.py
+++ b/scripts/pr_backport.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import hglib
import requests
import shutil
@@ -6,6 +7,7 @@
from datetime import datetime
from distutils.version import LooseVersion
from time import strptime, mktime
+from yt.extern.six.moves import input
MERGED_PR_ENDPOINT = ("http://bitbucket.org/api/2.0/repositories/yt_analysis/"
"yt/pullrequests/?state=MERGED")
@@ -280,17 +282,17 @@
if commit_already_on_stable(repo_path, commits[0]) is True:
continue
message = "hg graft %s\n" % commits[0]
- print "PR #%s\nTitle: %s\nCreated on: %s\nLink: %s\n%s" % pr_desc
- print "To backport, issue the following command(s):\n"
- print message
- raw_input('Press any key to continue')
+ print("PR #%s\nTitle: %s\nCreated on: %s\nLink: %s\n%s" % pr_desc)
+ print("To backport, issue the following command(s):\n")
+ print(message)
+ input('Press any key to continue')
if __name__ == "__main__":
- print ""
- print "Gathering PR information, this may take a minute."
- print "Don't worry, yt loves you."
- print ""
+ print("")
+ print("Gathering PR information, this may take a minute.")
+ print("Don't worry, yt loves you.")
+ print("")
repo_path = clone_new_repo()
try:
last_major_release = get_first_commit_after_last_major_release(repo_path)
@@ -308,11 +310,11 @@
del inv_map[None]
inv_map = screen_already_backported(repo_path, inv_map)
- print "In another terminal window, navigate to the following path:"
- print "%s" % repo_path
- raw_input("Press any key to continue")
+ print("In another terminal window, navigate to the following path:")
+ print("%s" % repo_path)
+ input("Press any key to continue")
backport_pr_commits(repo_path, inv_map, last_stable, prs)
- raw_input(
+ input(
"Now you need to push your backported changes. The temporary\n"
"repository currently being used will be deleted as soon as you\n"
"press any key.")
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list