Menu

#19 Update dfuse-pack.py script to be python3 compliant

0.10
closed
nobody
None
2021-09-19
2016-04-19
No

dfuse-pack has a number of deficiencies when run from systems defaulting to the python3 interpreter. It would be helpful to update this to be 'python3' friendly to be compatible with modern distributions.

Discussion

  • Tormod Volden

    Tormod Volden - 2016-04-24

    What are the deficiencies? A patch would probably explain best... Is it possible to keep it compatible with python 2?

     
  • Michael Everitt

    Michael Everitt - 2016-04-24

    Hi Tormod,
    The key differences seem to be around use of the 'print' function, which you're chiefly using for debug output, integer division and one or two other things. As far as backward compatibility with python2 is concerned, I think there are easy ways to make this possible .. it's not an either/or situation :) !
    This article may help you: https://docs.python.org/3/whatsnew/3.0.html .
    Alas, I'm not proficient in python, so this may the best I can do, but if you need further help, I know others who may be able to shed some additional light on the subject.
    Cheers, Michael.

     
  • Michael Everitt

    Michael Everitt - 2016-04-24

    Friend has just alerted me to "2to3" .. so see attached :)

     
  • Tormod Volden

    Tormod Volden - 2016-04-24

    Thanks a lot! Which name/address should I put in the commit?

    I do some python but I am still on python 2, it is what is default in long-term support distributions.

     
  • Michael Everitt

    Michael Everitt - 2016-04-27

    My friend (who has incidentally submitted #18) is "David G Turner <dgturner<span>[at]iee.org>" has been doing the most work with dfu-util in Gentoo, and I shall be proxy maintaining the package for us and the Distro. I'm "Michael Everitt <m.j.everitt<span>[at]iee.org>" if you wish to put both of us down in the commit log. Shall we put it down to teamwork?! :)

     

    Last edit: Michael Everitt 2016-04-27
  • Tormod Volden

    Tormod Volden - 2016-04-27

    There is only one commit or patch "author" and if I understand correctly that was you but I can put signed-off-by from both. Generally it is not only about fame and honour but also about copyright and who has created part of it, for instance if there is a question of relicensing.

     
    • Michael Everitt

      Michael Everitt - 2016-04-27

      Fine by me - "all's fair in love and war". I'm still getting up-to-speed on software and distributed contributing convention and etiquette!
      I'm sure @digitall will be ok with this too.

       
  • Tormod Volden

    Tormod Volden - 2016-04-27
    • status: open --> accepted
    • Milestone: none --> 1.0
     
  • Tormod Volden

    Tormod Volden - 2016-05-05

    Before I push this to the public repo: Did you add the "[at]" spam protection to your e-mail addresses above? Just be aware that once the commit is in the repo, the addresses are visible to all and can be harvested by spammers.

     
  • Michael Everitt

    Michael Everitt - 2016-05-05

    Yes, I've bodged it because sourceforge automatically creates hyperlinks! Both I and digitall have our emails in repositories anyway, but they're not exactly in public view by contrast! :)
    Go ahead and post the actual emails into source, and I can officially patch the Gentoo ebuild and commit revised package to tree. We're still on v0.7, so will be good to get the updates publicised!
    Thanks.

     
  • Tormod Volden

    Tormod Volden - 2016-05-05
    • status: accepted --> closed
     
  • Tormod Volden

    Tormod Volden - 2016-05-05

    Still on 0.7 ?! You know 0.9 was released some months ago? :)

    Your patch has been pushed to the repo. Thanks for the contribution!

     
  • Michael Everitt

    Michael Everitt - 2016-05-05

    Superb, thanks Tormod!
    Right about the 0.7 issue .. it seemed to make sense to get everything cleaned up, I wasn't initially aware there -was- a python script in there, as it wasn't installed by default, so that had to be fixed also. We're good to go now .. watch out for updates at https://gitweb.gentoo.org/repo/gentoo.git/log/app-mobilephone/dfu-util shortly ... :D

     
  • Tormod Volden

    Tormod Volden - 2016-05-05

    Note that I have pushed more fixes so that it actually works with Python 3. The difficult issues popped up when I tested it for real 8-/

     

Anonymous
Anonymous

Add attachments
Cancel