Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPython3 port #16
Python3 port #16
Conversation
* run 2to3 * Use property decorator Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Remove duplicate condition Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
As the source code for CairoPlot is maintained elsewhere, let's minimise the change between them and us. This will ease maintenance of our changes and let us apply any future patches from upstream.
|
Thanks. Reviewed. Some patches added. Briefly tested. Waiting for you to proceed with or update your TODO in opening comment. |
|
@ayushnawal, please test and review, thanks. |
|
Tested, reviewed. I agree with caa381a, thanks. |
Upstream doesn't have this syntax. Reported-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
|
Thanks. Reviewed. @chimosky Got this in logs while testing:
Maybe not because of your changes Reviewed TO DO in the first comment too. Fixed source_remove warnings in #17 @quozl, please review |
|
Regarding the AttributeError;
Same broken code pattern also still used in Fototoon, GetBooks, Memorize, Speak, and Chess. |
Reported-by: ayush nawal <ayushnawal457@gmail.com>
Co-authored-by: James Cameron <quozl@laptop.org> # rebase on python3-port
|
Regarding #17 the commit 4da7b31 can't be easily cherry-picked because it is based on much older commit;
In turn this is because this pull-request has changed from GObject to GLib for those calls.
@@@ -610,8 -610,9 +625,14 @@@
self.total_time = 0
self._edit_card = None
self._dead_key = None
++<<<<<<< HEAD
+ if hasattr(self, 'timeout_id') and self.timeout_id:
+ GLib.source_remove(self.timeout_id)
++=======
+ if hasattr(self, 'timeout_id') and self.timeout_id is not None:
+ GObject.source_remove(self.timeout_id)
+ self.timeout_id = None
++>>>>>>> 4da7b31... Fix source_remove warnings
# Fill the grid with custom cards.
self.grid.restore(self.deck, CUSTOM_CARD_INDICIES)When you want to contribute to an existing pull-request like this, please base your branch on the latest commit in the pull-request. This conflict means the two pull-requests are also in conflict, so when we merge this one you'll have to rebase yours. So I rebased as 315b67c. |
|
Our new focus on the use of timeouts made me review them in general. I suggest others review too.
Also I noticed the improper use of the |
Got it sir, will rebase from next time. your experience helps me learn Reviewed and Tested the PR again after the last 2 commits, no warnings or error. |
I agree, thought of removing them but I decided to focus on other things.
Agreed. Tested 315b67c and it doesn't fix |
* move timeout source IDs to __init__, * remove hasattr calls.
* use an underscore prefix, * shorten the name to remove timeout, as they are actually source IDs for timeouts,
After changing the variable names, code was excessively wrapped.
Several opportunities existed for timeout IDs not to be cleared despite the timeout having been removed from the list of sources by implied "return False". Proposed as a fix for source_remove warnings. Reported-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
|
Thanks for testing. I took a close look, and there were certainly ways in which the timeout source IDs were not cleared despite the source having been automatically removed. 5cea479. |
|
Tested. Added a few more commits based on observations. |
|
Tested 7291292, |
On code review of aggregate change, it was seen that the source ID assigned on line 1437 is immediately destroyed by the assignment on line 1443. Effect unknown.
Thanks for testing. I don't know quite what you mean; can you explain how to reproduce? Or can you do a I did review the aggregate change again and spotted a mistake, fixed in 2948f82. I don't know if it relates to what you saw. |
I think the error was introduced at 06f0162 as this behaviour is no longer noticed there. |
|
Thanks. I've reviewed 06f0162 again. The CairoPlot changes can be ignored as the problem is unrelated to the plotting. None of the other changes seem likely to affect the decision-making of the program. I've tested 2948f82 and reproduced a behaviour almost the same as what you report; the left-most card in the boxes can be returned, but not the centre card. The right-most card can never be returned because the win or loss sequence blocks it. Also, I'm not sure if the method of selecting the cards is significant; I've only just discovered they can be dragged. |
Yeah, edited my comment accordingly.
No the method of selecting the cards isn't significant - just discovered they can be dragged too -, just clicking on them in the card boxes are. |
Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
|
@quozl kindly review.
|
|
#19. There was a excess print() statement, which I demoted to logger. Please review and merge |
|
@chimosky: Thanks. Tested. Fixed XML parse error. Please continue. |
On Ubuntu 20.04 with librsvg 2.48.0 the activity hangs and logs contain;
Traceback (most recent call last):
File "/usr/share/sugar/activities/Dimensions.activity/game.py", line 514, in _prepare_new_game
self.deck.create(self._sprites, self.card_type,
File "/usr/share/sugar/activities/Dimensions.activity/deck.py", line 85, in create
i = self._make(sprites, card_type, numbers_type, i,
File "/usr/share/sugar/activities/Dimensions.activity/deck.py", line 138, in _make
self.cards[i].create(
File "/usr/share/sugar/activities/Dimensions.activity/card.py", line 45, in create
self.spr = Sprite(sprites, 0, 0, svg_str_to_pixbuf(string, True))
File "/usr/share/sugar/activities/Dimensions.activity/card.py", line 69, in svg_str_to_pixbuf
pl.close()
gi.repository.GLib.Error: rsvg-error-quark: XML parse error: error code=201 (3) in (null):25:2: Namespace prefix xlink for href on image is not defined
librsvg 2.47.0 introduced stricter namespaces in the XML parser,
https://gitlab.gnome.org/GNOME/librsvg/-/blob/master/NEWS#L67
so add namespace declarations.
Remove use of ChatTube and use collabwrapper for collaboration, game state is shared but each instance is playing as one player and card type differs when activity is shared. Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
|
TODO
|

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Made some changes.
TODO
source_removewarning.@srevinsaju I think you meant collaboration as collabwrapper isn't used in the activity.
@tchx84 @walterbender