Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Migrate to setuptools, make python3 compatible, and reducing chattiness #75

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

kyle-walker
Copy link

Absolutely open to making changes to this PR, but a few of the changes included are:

  • Migrate to a setuptools packaging strategy. The benefit being that we can then leverage the "python setup.py " workflow for packaging and installation.

  • Made the utility python3 compliant, though this was done with a fairly heavy hand. Further work is remaining to help clean it up and make it more presentable.

  • Corrected the references to the older github page with the new RedHatOfficial/rhsecapi URL.

  • Reduced the chattiness of the utility outside of the query responses themselves. This translates mostly into setting a default logging level of WARNING so that we don't get the NOTICE messages unless we want them.

@kyle-walker
Copy link
Author

It's been a few months, so - Bump!

@kyle-walker
Copy link
Author

(Quite) a few more months. - Bump!

@digitronik
Copy link

digitronik commented Feb 4, 2021

@ryran is it possible to bump this?
Still need more pythonic love :)

ryran and others added 8 commits August 18, 2021 13:53
Reorganizing the project. Multiple changes, but the intent of each
alteration is to make the project:

 - Installable via setuptools
 - Compatible with python2 and python3
Thre previous revision was exceptionally verbose and didn't play well with
the "python setup.py bdist_rpm" process. The new revision makes it more
terse.
There seems to be a problem within argparse for 3.7 which results in an
error around file handling. The process of resolving it would be too
arduous when compared to the alternative of avoiding calling "less"
directly in the manner previously used.

The recommended alternative is to simply pipe the help output to "less".
The previous location under "ryran" is no longer applicable. Moving
mentions of that path over to the RedHatOfficial group.
The previous revision emitted a lot of informational output besides just
the response. This is helpful if the utility is being investigated, but
requiring a "-l warning" flag to omit those messages is not really
necessary.

Setting the default to WARNING to silence the NOTICE messages.
The backend security API no longer supports IAVAs as a query subject. This
was removed towards the end of 2018. This patch attempts to remove the
corresponding client-side IAVA query code while preserving the remaining
operations.
Since we are now relying on the setuptools mechanism to install to either
python2 or python3, it no longer makes sense to include shebang callouts at
the top of the script.
This avoids IDE configurations from being propagated into the project.
This updates the version both in the setup.py and also within the in-
CLI definition.
It isn't necessary, and causes installation issues for systems where it
isn't available.
The previous version didn't require the library, and so would fail with the
following error.

    Traceback (most recent call last):
       File "/usr/bin/rhsecapi", line 25, in <module>
        import rhsda
    ModuleNotFoundError: No module named 'rhsda'
It wasn't updated with the last tag.
@wyrmiyu
Copy link

wyrmiyu commented Jan 24, 2023

Hi, any chance this could be merged at some point? The Python 3 support would be most desirable. Is there still something missing?

@malvads
Copy link

malvads commented Nov 22, 2023

Any updates on this?

Just making it simpler for those that use hidden cwd-venvs
A similar quality-of-life improvement allowing:

    pip install -r requirements.txt
@kyle-walker kyle-walker force-pushed the master branch 2 times, most recently from f2eb175 to ac75afe Compare April 3, 2024 19:45
The project seems to be unmaintained upstream, so I'm dropping it here in favor
of tito.
@kyle-walker
Copy link
Author

kyle-walker commented Apr 3, 2024

Any updates on this?

Just a heads-up, I have a COPR that auto-builds this fork on tag events.

(Edit: It helps to include the COPR in the message...)
https://copr.fedorainfracloud.org/coprs/kwalker/rhsecapi/
(End Edit)

I also just went through the joy(more like pain) of moving the build process from rpkg to tito. The former seems to no longer be maintained upstream.

For anyone that is looking for a quick solution.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants