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

Port to Python 3 #805

Closed
wants to merge 5 commits into from
Closed

Port to Python 3 #805

wants to merge 5 commits into from

Conversation

rhl-bthr
Copy link
Contributor

Fixes #787

@quozl quozl added this to Pull Requests in Port to Python 3 via Six Aug 13, 2018
@quozl
Copy link
Contributor

quozl commented Aug 13, 2018

Thanks. Reviewed to 8166eb0. Not tested. Lost of symbolic constants for os.statvfs is unfortunate; is there any alternative?

@rhl-bthr
Copy link
Contributor Author

is there any alternative?

None that I could see

@quozl quozl mentioned this pull request Jan 9, 2019
10 tasks
@quozl quozl mentioned this pull request Jan 18, 2019
@manddy
Copy link

manddy commented Jan 18, 2019

@pro-panda i am not getting why there is merge conflicts in src/jarabe/controlpanel/cmd.py?

@quozl
Copy link
Contributor

quozl commented Jan 18, 2019

GitHub does a poor job of showing divergent histories. The best view is Network but you have to somehow look at both sugarlabs and pro-panda repositories at the same time to see the problem.

Use a git history visualiser, such as git log with several options or gitk --all, and you'll see that this branch diverged from master some time ago.

Latest commit common to both branches is c36b7fb.

Anyone can fix this. Skills needed are git conflict resolution, or rebasing, combined with a good understanding of the intent of each patch.

I'll put this on my list to do today.

* remove call to sys.setdefaultencoding
  default encoding is 'utf-8' by default in Python 3

* remove use of statvfs
  statvfs does not exist in python 3
* TODO was fixed in af6ce2e
@quozl
Copy link
Contributor

quozl commented Jan 19, 2019

Did git checkout python3, git rebase -i master, resolved conflicts, and git push --force.

@manddy
Copy link

manddy commented Jan 19, 2019

@quozl Is this issue complete or there is anything else to still work on?

@@ -147,6 +147,8 @@ def _entry_activated_cb(self, entry):
new_query = entry.props.text
if self._query != new_query:
self._query = new_query
if isinstance(self._query, bytes):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pro-panda why did you add this line in the code,because it not not related to this issue of porting to a different version @quozl Your suggestions will also be helpful

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manddy, thanks for asking. The change seems common to me. @pro-panda didn't explain the change in the commit message. I'm not sure why the change is needed though. I've no suggestions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for asking @manddy.
Most of such changes were introduced since sugarlabs/sugar-toolkit-gtk3#383 supported both Python 2 and 3, which implied that you could expect bytes or unicode, depending on the version an interacting sugar activity is written in.

From what I recall, this instance was also implemented for a similar reason.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, of course, thanks.

@Aniket21mathur
Copy link
Contributor

Aniket21mathur commented Jul 3, 2019

em.py is removed from master, as well as popwindow commit is merged. Rebased and resolved conflicts with master.
Replaced by #844

@Aniket21mathur Aniket21mathur mentioned this pull request Jul 3, 2019
@quozl quozl closed this Jul 6, 2019
@quozl quozl deleted the python3 branch September 11, 2019 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Port to Python 3
4 participants