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

Python 3 / wxPython 4 Support #78

Open
swt2c opened this issue Jan 26, 2019 · 15 comments
Open

Python 3 / wxPython 4 Support #78

swt2c opened this issue Jan 26, 2019 · 15 comments

Comments

@swt2c
Copy link

swt2c commented Jan 26, 2019

Now that wxPython 4 is out (with Python 3 support) it would be great if wammu supported wxPython 4 and Python 3.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nijel
Copy link
Member

nijel commented Jan 26, 2019

Patches are welcome, it's unlikely that I will find time for that.

@swt2c
Copy link
Author

swt2c commented Jan 26, 2019

I may take a stab at it. I'm assuming you would want to retain Python 2 / wxPython 3.x support as well?

@nijel
Copy link
Member

nijel commented Jan 26, 2019

I would not mind dropping Python 2 support

@sergiomb2
Copy link

Hello ,
@swt2c , now with Fedora dropping python 2 [1] and [2]

[1]
https://fedoraproject.org/wiki/Changes/RetirePython2

[2]
https://bugzilla.redhat.com/show_bug.cgi?id=1737869

@swt2c
Copy link
Author

swt2c commented Sep 3, 2019

Yes, @sergiomb2 that was my motivation in the first place. However, I'm not very motivated as I don't actually use wammu.

@sergiomb2
Copy link

ya , even https://github.com/gammu/wammu/blob/master/setup.py is not python 3 compatible ...
I don't use this software since 2 or 4 years ago with usb pen mobile network 3G

@swt2c
Copy link
Author

swt2c commented Sep 3, 2019

Maybe just retire it from Fedora?

@nijel nijel pinned this issue Sep 4, 2019
@nijel
Copy link
Member

nijel commented Sep 4, 2019

The same issue is on Debian, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=938807

@sergiomb2
Copy link

Let me know if any progress on Debian package I will follow it on Fedora .

Thanks

@nijel
Copy link
Member

nijel commented Sep 7, 2019

Unless somebody steps up to implement needed changes, the package will be removed.

@lgbaldoni
Copy link

How does 33faf64 relate to this?

@nijel
Copy link
Member

nijel commented Mar 1, 2022

There is no relationship. It is just a bump of a GitHub action...

@kamikaze-kun
Copy link

Hello. I am trying to make Wammu working on Python 3 during spare time at work. It's Windows 7 PC with limited (because security) internet, and I upload many changes at once later at home. I worked with Delphi for several years and Python is new for me but it is very interesting. Hopefully there are a lot of documentation and advice over the web.

Next thing to fix: SMS and Messages export. These are the main things why I use Wammu.
Still no success in loading locale files…

Please check my Wammu fork. Looking forward to any help.

@Jancs-E
Copy link

Jancs-E commented May 2, 2023

Hi! Any news regarding use of Wammu on Linux having Python 3.9? I went around one issue, but wammu expects wxPython being installed under 2.7.

@ppisa
Copy link

ppisa commented Jan 14, 2024

I have successfully tested fork https://github.com/kamikaze-kun/wammu. The branch python3 works for me with some minor corrections.

--- Main.py.orig        2024-01-14 10:46:20.917228159 +0100
+++ Main.py     2024-01-14 10:47:56.017224259 +0100
@@ -975,7 +975,7 @@

     def OnProgress(self, evt):
         if hasattr(self, 'progress'):
-            if not self.progress.Update(evt.progress):
+            if not self.progress.Update(round(evt.progress)):
                 try:
                     evt.cancel()
                 except:

to resolve

  File "/opt/gammu/lib/python3.11/dist-packages/wammu-0.44-py3.11.egg/Wammu/Main.py", line 978, in OnProgress
    if not self.progress.Update(evt.progress):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Exception: TypeError: ProgressDialog.Update(): argument 1 has unexpected type 'float'

and I have some problems with resources/images lookup solved by

--- Paths.py.orig       2024-01-14 02:58:13.430861085 +0100
+++ Paths.py    2024-01-14 01:56:29.882999398 +0100
@@ -36,6 +37,8 @@
     os.path.join(os.path.dirname(__file__).replace('lib/python2.7/dist-packages/Wammu', ''), 'share', 'Wammu'),
      # Local directory
     os.path.join(os.path.dirname(__file__), '..'),
+    os.path.join(os.path.dirname(__file__), '../share/Wammu'),
+    #os.path.join(os.path.dirname(__file__), '/opt/gammu/lib/python3.11/dist-packages/wammu-0.44-py3.11.egg/share'),
 ]

 def CheckImagesPath(path):

My test are on Debian 12.4 (Bookworm, actual stable). The gammu, python_gammu and wammu are build into /opt/gammu prefix and hacked and symlinked to /usr/local/bin, /usr/local/lib and /usr/local/lib/python3.11/dist-packages.

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

No branches or pull requests

7 participants