Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 719204 - dev-java/java-config-2.2.0-r4 Warning under Python 3.8
Summary: dev-java/java-config-2.2.0-r4 Warning under Python 3.8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on: 730530
Blocks: python3.8-compat
  Show dependency tree
 
Reported: 2020-04-24 09:34 UTC by Viktar Patotski
Modified: 2020-07-22 05:43 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Viktar Patotski 2020-04-24 09:34:01 UTC
Recently I have switched my system to Python 3.8 and now when I run java-config I'm getting following warnings:

java-config --list-available-vms
/usr/lib/python-exec/python3.8/java-config-2:202: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if os.getuid() is 0:
/usr/lib/python-exec/python3.8/java-config-2:230: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if os.getuid() is 0:
/usr/lib/python-exec/python3.8/java-config-2:255: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if os.getuid() is 0:
/usr/lib/python-exec/python3.8/java-config-2:280: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if os.getuid() is 0:
Comment 1 Hanno Böck gentoo-dev 2020-04-25 08:47:09 UTC
This code does not appear to be present in the current java-config git repo [1]. The java-config 2.2.0 release is 7 years old, probably time to have a release with the latest git code?

[1] https://gitweb.gentoo.org/proj/java-config.git/
Comment 2 Larry the Git Cow gentoo-dev 2020-04-29 18:31:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adc7ec8ea7b65cf85514eefe8a8ef5172e337005

commit adc7ec8ea7b65cf85514eefe8a8ef5172e337005
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-04-29 18:30:38 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-04-29 18:31:10 +0000

    Revert "dev-java/java-config: Python 3.8 compatibility"
    
    This reverts commit 5d50d82c6407fe431c069494b8e4b788e5013c88.
    
    Bug: https://bugs.gentoo.org/719204
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-java/java-config/java-config-2.2.0-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 matoro archtester 2020-04-29 23:22:40 UTC
(In reply to Viktar Patotski from comment #0)
> Recently I have switched my system to Python 3.8 and now when I run
> java-config I'm getting following warnings:
> 
> java-config --list-available-vms
> /usr/lib/python-exec/python3.8/java-config-2:202: SyntaxWarning: "is" with a
> literal. Did you mean "=="?
>   if os.getuid() is 0:
> /usr/lib/python-exec/python3.8/java-config-2:230: SyntaxWarning: "is" with a
> literal. Did you mean "=="?
>   if os.getuid() is 0:
> /usr/lib/python-exec/python3.8/java-config-2:255: SyntaxWarning: "is" with a
> literal. Did you mean "=="?
>   if os.getuid() is 0:
> /usr/lib/python-exec/python3.8/java-config-2:280: SyntaxWarning: "is" with a
> literal. Did you mean "=="?
>   if os.getuid() is 0:

FYI - this is fixable with a simple find-and-replace.  I have a fixed version in my overlay with links to an explanation:  https://github.com/matoro/overlay/blob/master/dev-java/java-config/java-config-2.2.0-r4.ebuild
Comment 4 Larry the Git Cow gentoo-dev 2020-05-07 09:55:34 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=943a0212ff7b44ada2bcd53a6c73bcd7605a3286

commit 943a0212ff7b44ada2bcd53a6c73bcd7605a3286
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-05-07 09:49:43 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-05-07 09:52:10 +0000

    dev-java/java-config: add python3_8 compat
    
    Bug: https://bugs.gentoo.org/719204
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 .../java-config/files/java-config-2.2.0-py38.patch | 52 ++++++++++++++++++++++
 dev-java/java-config/java-config-2.2.0-r4.ebuild   |  7 ++-
 2 files changed, 57 insertions(+), 2 deletions(-)
Comment 5 Georgy Yakovlev archtester gentoo-dev 2020-05-07 09:57:08 UTC
I've added a patch and re-enabled 3.8 support.

git master contains way too many changes, I'll leave tagging new version to people who knows the code.
Comment 6 Viktar Patotski 2020-05-07 10:08:28 UTC
(In reply to Georgy Yakovlev from comment #5)
> I've added a patch and re-enabled 3.8 support.
> 
> git master contains way too many changes, I'll leave tagging new version to
> people who knows the code.

Thanks! But we definitelly need try releasing new version of java-config. Will we do it under this bug? Or we need to open new one?
Comment 7 charles17 2020-06-25 08:39:10 UTC
(In reply to Viktar Patotski from comment #6)
> [...]
> Thanks! But we definitelly need try releasing new version of java-config.
> Will we do it under this bug? Or we need to open new one?


dev-java/java-config-2.3.1 is there.
Comment 8 Patrice Clement gentoo-dev 2020-07-03 07:01:02 UTC
Hi. I've filed bug 730530 to stabilise java-config-2.3.1. This release does away with Python 2.7 and fixes all Python 3 warnings. Please update as soon as the stabilisation process is over. Thanks.
Comment 9 Tamas Jantvik 2020-07-07 10:19:58 UTC
(In reply to Patrice Clement from comment #8)
> Hi. I've filed bug 730530 to stabilise java-config-2.3.1. This release does
> away with Python 2.7 and fixes all Python 3 warnings. Please update as soon
> as the stabilisation process is over. Thanks.

I masked 2.3.1 after having spent 15 minutes trying to understand how to set the system vm without success.

This version seems to make the Java page on the wiki invalid, and the package homepage (https://www.gentoo.org/proj/en/java/) is also invalid.
Comment 10 Tamas Jantvik 2020-07-07 10:20:31 UTC
(In reply to Patrice Clement from comment #8)
> Hi. I've filed bug 730530 to stabilise java-config-2.3.1. This release does
> away with Python 2.7 and fixes all Python 3 warnings. Please update as soon
> as the stabilisation process is over. Thanks.

I masked 2.3.1 after having spent 15 minutes trying to understand how to set the system vm without success.

This version seems to make the Java page on the wiki invalid, and the package homepage (https://www.gentoo.org/proj/en/java/) is also invalid.
Comment 11 Patrice Clement gentoo-dev 2020-07-15 20:07:17 UTC
(In reply to Tamas Jantvik from comment #10)
> 
> I masked 2.3.1 after having spent 15 minutes trying to understand how to set
> the system vm without success.

That's normal. If you read carefuly the java-config 2.2.0 help output, you would have seen this:

  Deprecated:
    Use eselect java-vm instead. Report usability issues so they can be
    taken care of.                                             
                                                               
    -S VM, --set-system-vm=VM                                  
                        Set the default Java VM for the system
    -s VM, --set-user-vm=VM                                    
                        Set the default Java VM for the user

> 
> This version seems to make the Java page on the wiki invalid, and the
> package homepage (https://www.gentoo.org/proj/en/java/) is also invalid.

Thanks for the heads up. I will fix it ASAP.
Comment 12 Patrice Clement gentoo-dev 2020-07-22 05:43:31 UTC
This version is now gone. java-config has been converted to Python 3. Please use java-config-2.3.1 and above. Thank you.