EGI-Federation / bdii

Berkeley Database Information Index
Apache License 2.0
8 stars 8 forks source link

Deprecation warning for /usr/sbin/bdii-update #53

Closed marianne013 closed 4 months ago

marianne013 commented 5 months ago

Short Description of the issue

This is on a Rocky Linux release 9.4 (Blue Onyx) site bdii installed from epel. The bdii-update.log is filled with depreciation warnings, making it hard to see any real errors. The actual running of the bdii is unaffected.

[root@bdii02 ~]# tail /var/log/bdii/bdii-update.log
/usr/sbin/bdii-update:552: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  log.warn(line.strip())

Summary of proposed changes

The fix (replace 'warn' by 'warning') is straight forward and gets rid of this spurious error message.

brucellino commented 5 months ago

Does this affect only that one os or can it be applied across the board?

marianne013 commented 5 months ago

I believe this is a python issue. 'warn' has been deprecated since 3.3 and 'warning' seems to exist even in 3.0, I think it's save to assume no-one is running python2 any longer.

brucellino commented 5 months ago

Awesome, thanks. Would you like to work on a PR for this? If not, we can do it.

marianne013 commented 5 months ago

I'll have a go

brucellino commented 5 months ago

Thanks @marianne013 -- could you put the PR in draft at first, since I would like to add a test case for this to ensure that we actually do eliminate the warning. I will put it on the same PR you work on so we can merge together.

marianne013 commented 5 months ago

Why would you need a draft (instead of a standard) pull request for testing ? I mean I can make a draft, but I can't quite see the difference.

marianne013 commented 5 months ago

Here's the draft: https://github.com/EGI-Federation/bdii/pull/58

brucellino commented 5 months ago

Why would you need a draft (instead of a standard) pull request for testing ? I mean I can make a draft, but I can't quite see the difference.

Just to avoid automerging if tests pass.

Thanks for the PR! Will be in touch soon.

gwarf commented 4 months ago

Dear @marianne013, a new version for AlmaLinux 9 got released, would be great if you could give it a test and report: https://github.com/EGI-Federation/bdii/releases/tag/v6.0.2 Thanks!