-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Zenmap and Ndiff are python2 only #1176
Comments
Sorry, thought we already had an issue for this, but I got the wrong thing (a PR instead). |
Any work in progress? |
@Vascom No, no work is in progress. We would accept a pull request if one was made that passed review. Some challenges that would have to be overcome:
|
I've received the following from a bug report on Debian:
The bug report is here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885498 I believe that means you might want to switch to GObject Introspection while also dropping the python2 dependency. I'm not sure if I should open another issue or just use this one for both problems (maybe change title of issue?). Thanks |
See #1484 for a first step to support python3. |
Can python2 support be dropped entirely? Just jump straight to python3? |
It can be dropped altogether with nping and zenmap only. Porting gtk application from Python 2 to Python 3 is not simple task but patches are welcomed :) |
I didn't even see that nping had python2 bits. Does ndiff need to keep python2 support? |
I meant ndiff and zenmap. Sorry |
Ported all python scrips in ndiff/ except setup.py Some hints on cmp taken from nmap#1484 Minor tweaks to Makefile to support python3, but unsure if there is a better way to do that. Seperated .travis.yml commands for easier debugging where it breaks. This closes the easy half of nmap#1176 Resolves: nmap#1484
^^ #1807 Proposed port of ndiff - did everything but setup.py. |
Less than 2 months left for the old snake to be alive: https://pythonclock.org/ |
Ported all python scrips in ndiff/ except setup.py Some hints on cmp taken from nmap#1484 Minor tweaks to Makefile to support python3, but unsure if there is a better way to do that. Seperated .travis.yml commands for easier debugging where it breaks. This closes the easy half of nmap#1176 Resolves: nmap#1484
Zenmap has been removed from Debian unstable - and ndiff in Debian has been kept by merging my PR #1807 ahead of upstream. I don't have time at the moment, but I'm not planning on trying Zenmap porting until ndiff is merged. |
Ported all python scrips in ndiff/ except setup.py Some hints on cmp taken from nmap#1484 Minor tweaks to Makefile to support python3, but unsure if there is a better way to do that. Seperated .travis.yml commands for easier debugging where it breaks. This closes the easy half of nmap#1176 Resolves: nmap#1484
@landgraf @dmiller-nmap |
I just wanted to note that there are some useful comments in the closed duplicate issue #2022 . In particular, here is a workaround posted by @N0rbert for Ubuntu 20.04 LTS:
We have been slow with this because the pygtk and Windows aspects make it more difficult than a traditional Python2 -> Python3 port. But it is on our radar. |
I also wanted to note PR #1972 here. That's a patch which tries to support Python3 while still retaining Python2 compatibility. |
@BryanQuigley Thank you very much for your help. I'm not familiar with working branches; I'm only seeing the By "those with commit access", are you referring to people who have write access to the repository? Most importantly, what should I do? Should I reopen the pull request, delete it, or fiddle with it somehow? |
I don't believe more coding work is needed - it's more organizational - see the open PRs here https://github.com/nmap/nmap/pulls?q=is%3Apr+is%3Aopen+python3 |
...Oh. Well, then. Could somebody please remove the BountySource listing, perchance? :( I should have read the thread before beginning my coding. I learned some things, anyway. |
Possible workaround is to use Flatpak version of ZenMap as follows:
Such installation needs ~330 Mb of downloads, and will use ~1 Gb on disk. |
For now all Arch based distros removed python2 from their official repos, and it's nightmare to build it from AUR. |
ubuntu 22.04
Please zenmap for ubuntu 22.04. Thanks |
Use Flatpak then as described in #1176 (comment) . Or check https://aur.archlinux.org/packages/zenmap-python3-git . |
very heavy |
Please, use Python3 version as described here |
The zenmap flatpack project seems abandoned. The expected results are not obtained. |
Sure, use this branch: |
@chmelarp Based on the incomplete kulikjak#1, the I would be interested to work on https://github.com/nmap/nmap/pulls/cclauss if any maintainers of the nmap/nmap repo are willing to review PRs. It has been 1,051 days since Python 2 end of life on 1/1/2020 so it is past the time to make this upgrade. |
Thank you for your effort, @cclauss ! @kulikjak 's code works OK, but it may need some polishing as he made it quite a time ago. There are plenty of deprecated warnings and the README should be updated from what I can see. Also, Zenmap is mostly independent on the C code. IMHO it should have a separate repository so it can be packaged and maintained separately. |
Hi, I rebased my change pretty recently (3 months ago) and based on my limited testing, everything seemed to work - but I won't deny there might be some polishing to be done. That said, it appears that some people (maybe even distros) are already using it, and I fixed most issues they reported so far. I didn't get rid of all deprecation warnings because that would mean even more changes, and I didn't want to rewrite it completely as that would make the review and subsequent merge even harder. The same goes for the GTK 4 migration (I asked about it in January, but got no upstream response for that and thus didn't really explore it further yet).
I guess that separate repository might make sense, considering that the Zenmap GUI isn't really the core of Nmap and doesn't really depend on it that much. |
I'm all in for the separate repo: it makes sense from a coding point of view and it will allow to proceed faster as well. |
Well, I think it's complete from the Zenmap point of view (I mean, except for possible bugs I didn't catch). I didn't touch |
@cldrn @fyodor @hsluoyz Would it be possible to create repos for: so that we can focus on modernizing those codebases? There are currently almost 500 open issues and more than 200 open pull requests on https://github.com/nmap/nmap so perhaps all would benefit from a bit of divide and conquer. If there are more appropriate repos to focus on these two codebases, please let us know. |
Python 2.X faces official EOL in 2020 and most of the Linux distributions started to drop python2 support already. To keep zenmap and ndiff they should be ported to python3.
The text was updated successfully, but these errors were encountered: