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

Cleanup and Python 3 support #110

Merged
12 commits merged into from
Sep 3, 2015
Merged

Cleanup and Python 3 support #110

12 commits merged into from
Sep 3, 2015

Conversation

kamilion
Copy link
Owner

@kamilion kamilion commented Sep 3, 2015

As discussed in #109 all updates have been tested.

  • Chunked hashing has been implemented, drastically dropping Customizer's memory usage.
  • Apt will not automatically launch daemons when packages are installed in the chroot.
  • Swapped out all instances of unicode() with u'{}'.format() and now everything works fine in python3.
  • We still print a message that you're running it under python3, but it's no longer a truly critical error, so the exit 0 was removed.
  • Problem with Empty Dialogs in non-english locales has been resolved.

Some notes on changes I made to how terminals launch:

To resolve the problems I was having with the terminal, I added a last terminal to check for, x-terminal-emulator, which will invoke debian's alternatives system to select the terminal the user has expressed a preference for.

Make sure your /etc/alternatives/x-terminal-emulator is linked to the terminal you'd like customizer to use.

update-alternatives --list x-terminal-emulator

will list known terminals, and

update-alternatives --config x-terminal-emulator

will display a list for you to choose a new one you prefer better.
It's the last terminal in the list; so if it doesn't exist, you'll end up with the last one found.
So, for you people on Arch, it should still work without debian's alternatives system around. \o/

gnome-terminal seems to be having issues after it's split into a backend/frontend process and which method was used as elevation to root -- pkexec, gksudo, or sudo.
pkexec seems to work best on older releases like 14.04, but fails on 15.10 with Xmir :0.0 errors.
gksudo seems to work on 15.04 and 15.10, but xubuntu doesn't have the gksu package.

@kamilion
Copy link
Owner Author

kamilion commented Sep 3, 2015

Note: Just because we HAVE python3 support doesn't mean we'll use it by default!
For reference, you'll need the python3-pyqt4 package.
Python 3.0, 3.1, and 3.2 lack the u'This is a unicode string' shortcut from python 2.7, but Python 3.3, 3.4, and 3.5 should work since they added the u'UNICODE!' shortcut back.

No need to run it through 2to3 or anything, same code runs fine on both interpreters. YMMV for pypy!

Tested on:
python 2.7.6 on 14.04.3
python 2.7.10 on 15.10
python 3.4 on 14.04.3
python 3.4.3+ on 15.10

Just a note to aid in review, clicking on the 'files' tab at the top will merge all the changesets into one.
https://github.com/clearkimura/Customizer/pull/110/files

@ghost
Copy link

ghost commented Sep 3, 2015

I have installed the latest commit from your repo and tested again to double-confirm. Host system running Python 2.7.6 on Xubuntu 14.04, works with both UMR and Xubuntu 14.04 32-bit ISO images. All looks good, so I will proceed to merge pull request.

I have already added your name into listing in this earlier commit. Thanks again for your contributions!

ghost pushed a commit that referenced this pull request Sep 3, 2015
Cleanup and Python 3 support
@ghost ghost merged commit 2a7864f into kamilion:master Sep 3, 2015
@kamilion
Copy link
Owner Author

kamilion commented Sep 3, 2015

Cool. Had a test with a 512MB VM, no swap. Got an 800MB ISO out of it.

ghost pushed a commit that referenced this pull request Sep 16, 2015
My mistake for not checking properly.. Finally replaced `f45d7e4` with correct commit `2a7864f` (when merging pull request #110 from kamilion/master on Sep 4).
@ghost ghost mentioned this pull request Oct 26, 2015
@ghost ghost mentioned this pull request Sep 23, 2016
This pull request was closed.
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.

1 participant