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

Building documentation with Python3 #76

Open
arizvisa opened this issue Nov 17, 2020 · 7 comments
Open

Building documentation with Python3 #76

arizvisa opened this issue Nov 17, 2020 · 7 comments

Comments

@arizvisa
Copy link
Owner

arizvisa commented Nov 17, 2020

At the moment, the plugin is only compatible with Python2 due to a variety of reasons. Fortunately IDA supports both Py2 and Py3 plugins (albeit not at the same time). However, I imagine at some point IDA is going to switch to Py3-only which will break this plugin entirely.

Py3 3.10.x will introduce a pattern matching syntax into the language and so if we want to leverage this in order to wrap Hex-Rays, we'll need to support Python3 at some point.

@arizvisa
Copy link
Owner Author

Probably going to be releasing this PR along an alpha-beta release schedule as I'm not 100% sure how much stuff I might've broken, and it's going to take me a bit to fucking test everything.

@arizvisa
Copy link
Owner Author

arizvisa commented Dec 3, 2020

So, PRs #80, #81, #82, and #83 are all pre-requisites. This PRs do things like add wrappers, conditionals, etc. for some of the common-language stuff that was broken by Python3.

@arizvisa
Copy link
Owner Author

arizvisa commented Dec 3, 2020

Once all the pre-requisites get merged, then PR #84 should add support for Python3. This will require a ton of testing, and as such will be tested in stages. Fucking shoot me.

@arizvisa arizvisa changed the title Python3 compatibility? Adding proper support for Python3 whilst still remaining backwards-compatible with Python2 for older versions of IDA Dec 3, 2020
@arizvisa arizvisa pinned this issue Dec 3, 2020
arizvisa added a commit that referenced this issue Dec 12, 2020
Replaced all string-joins that used tuples with lists in order to improve readability and slightly increase the performance on Python3.
arizvisa added a commit that referenced this issue Dec 12, 2020
Replaced all instances of the `logging.warn` function which is deprecated in Python3 with its new function name `logging.warning`.
arizvisa added a commit that referenced this issue Dec 12, 2020
Replaced or removed any and all types that are either missing or deprecated in Python3 with suitable alternatives that are still compatible with Python2.
arizvisa added a commit that referenced this issue Dec 12, 2020
Replaced a number of `six` wrappers with builtins, iterators, list-comprehensions, set-comprehensions, and dict-comprehensions which are compatible with Python3.
arizvisa added a commit that referenced this issue Mar 4, 2021
Added support for Python3 compatibility by implementing a number of wrappers, refactoring the trie used by the tag parser, and tweaking a whole bunch of the code.
@arizvisa
Copy link
Owner Author

arizvisa commented Mar 4, 2021

PR #84 was finally merged into the master branch which means that we now have support for both Python2 and Python3. The next thing that will need to be done is to update the documentation. Maybe I'll try and work at figuring that out this weekend.

@arizvisa
Copy link
Owner Author

arizvisa commented May 5, 2021

The documentation has been updated to include Python3 support, but it's still being built with Python2. This is pretty much the only hold-up. I'm working on issue #6, and probably after that I'll get back to figure out how to rewrite the parser so that it works on both Py2 and Py3...

@arizvisa arizvisa changed the title Adding proper support for Python3 whilst still remaining backwards-compatible with Python2 for older versions of IDA Building documentation with Python3 Jul 11, 2022
@arizvisa
Copy link
Owner Author

Currently doing a refactor as per #158...This will probably completely break the documenation generation process for some period of time, so I'm not sure when documentation will catch up. If only these Python autodoc projects would combine the documentation from multiple function definitions that have the exact same name....

@arizvisa
Copy link
Owner Author

I'm pretty tired of writing documentation...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant