Skip to content
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

Migrate to use Rubicon, rather than PyObjC #227

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

freakboy3742
Copy link

This patch migrates PyAutoGUI to use Rubicon, rather than PyObjC. Rubicon is pure Python, and doesn't try to install the entire universe; it requires a little more configuration, but it's just as reliable as PyObjC, (in my experience, anyway; Toga uses Rubicon on both iOS and macOS).

Two notes about the patch:

  • There are currently 2 keyboard tests failing - however, they were also failing for me under PyObjC:
======================================================================
FAIL: test_press (tests.basicTests.TestKeyboard)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rkm/projects/pyautogui/tests/basicTests.py", line 562, in test_press
    self.assertEqual(response, 'ba')
AssertionError: 'a\x1b[Db' != 'ba'
- b
+ ba


======================================================================
FAIL: test_typewrite_editable (tests.basicTests.TestKeyboard)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rkm/projects/pyautogui/tests/basicTests.py", line 536, in test_typewrite_editable
    self.assertEqual(response, 'c')
AssertionError: 'abc\x1b[D\x1b[D\x1b[D\x1b[3~\x1b[3~' != 'c'
- abc
+ c


----------------------------------------------------------------------
Ran 16 tests in 22.738s

FAILED (failures=2)
  • It's Python3 only. Rubicon uses a bunch of Py3 features (most notably, type annotations). Besides, PYTHON3 IS THE FUTURE!! :-)

@afs2015
Copy link

afs2015 commented May 17, 2018

@freakboy3742: Are you on OS X? I believe it's the same failing tests I am encountering here on #225.

@freakboy3742
Copy link
Author

@afs2015 I am, and yes, those two are the same failing tests.

@asweigart
Copy link
Owner

Hey Russ! I will definitely take a look at this in the near future.

@freakboy3742
Copy link
Author

Thanks Al! I've just updated the PR; the patch now passes all tests on macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants