-
Notifications
You must be signed in to change notification settings - Fork 28
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
Python 2/3 compat fixes, and first demo apps with bundled python3.5 #32
Commits on Dec 12, 2016
-
Replace implicit relative inports with absolute imports
in Lib/vanilla/test/testAll.py, use `importlib.reload` as the built-in `reload` is no longer available in Python 3
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for 73da70f - Browse repository at this point
Copy the full SHA 73da70fView commit details -
add 'py23' module; define 'unicode' and 'long' as aliases to 'str' an…
…d 'int' for PY3
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for ffd8e58 - Browse repository at this point
Copy the full SHA ffd8e58View commit details -
replace deprecated apply(func, args, kwargs) with with func(*args, **…
…kwargs)
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for 1df134b - Browse repository at this point
Copy the full SHA 1df134bView commit details -
replace comma with parentheses when Exception is raised
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for b8473e8 - Browse repository at this point
Copy the full SHA b8473e8View commit details -
py23: define basestring as str in PY3
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for 9993aad - Browse repository at this point
Copy the full SHA 9993aadView commit details -
fix objc.BadPrototypeError by adding @objc.python_method decorator to…
… methods that are only used from Python and never from Objective-C From https://pythonhosted.org/pyobjc/core/changelog.html, "Version 3.2": """ Backward compatibility note: Due to a change in the way the default method signature is calculated PyObjC is now more strict in enforcing the Python<->Objective-C mapping for selectors and a number of code patterns that were allowed before are no longer allowed, in particular the following method definitions raise objc.BadPrototypeError: class MyObject (NSObject): def mymethod(self, a, b): ... def method_arg_(self, a, b, c): ... If these methods are only used from Python and are never used from Objective-C the error can be avoided by decorating these methods with objc.python_method: class MyObject (NSObject): @objc.python_method def mymethod(self, a, b): ... This cannnot be used for methods used from Objective-C, for those you will have to rename the method or you will have to provide an appropriate selector explictly """
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for 212123d - Browse repository at this point
Copy the full SHA 212123dView commit details -
replace print statements with print() function, including docstrings …
…examples I didn't bother adding `from __future__ import print_function` in the docstring examples. That should be implied (hopefully).
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for a0f89ec - Browse repository at this point
Copy the full SHA a0f89ecView commit details -
py23: define range = xrange, and fix up uses of range; use enumerate …
…instead of range(len(...)) Also, replace: for index in range(len(alist)): item = alist[index] with enumerate(): for index, item in enumerate(alist): ...
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for 868450c - Browse repository at this point
Copy the full SHA 868450cView commit details -
TinyTextEditor.py: use io.open() with UTF-8 encoding when reading/wri…
…ting text
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for af6ba61 - Browse repository at this point
Copy the full SHA af6ba61View commit details -
py23: define unichr == chr in PY3
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for 66ed220 - Browse repository at this point
Copy the full SHA 66ed220View commit details -
convert dict.keys() to list where relevant; use sorted() to get sorte…
…d list of dict.keys()
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for a77ec1f - Browse repository at this point
Copy the full SHA a77ec1fView commit details -
Cosimo Lupo committed
Dec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for 8c6d102 - Browse repository at this point
Copy the full SHA 8c6d102View commit details -
SimpleApp.py: use flush=True with print(), else the output does print…
… on PY3 https://bitbucket.org/ronaldoussoren/pyobjc/issues/177/on-python3-print-does-not-automatically
Cosimo Lupo committedDec 12, 2016 Configuration menu - View commit details
-
Copy full SHA for a793989 - Browse repository at this point
Copy the full SHA a793989View commit details
Commits on Dec 13, 2016
-
dialogs.py: fix another objc.BadPrototypeError with @objc.python_meth…
…od decorator same as 212123d
Cosimo Lupo committedDec 13, 2016 Configuration menu - View commit details
-
Copy full SHA for 8c06107 - Browse repository at this point
Copy the full SHA 8c06107View commit details