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

[Bug]: pkgcheck scan show ValueError with python-3.12.7 #705

Closed
1 task done
peeweep opened this issue Oct 2, 2024 · 2 comments
Closed
1 task done

[Bug]: pkgcheck scan show ValueError with python-3.12.7 #705

peeweep opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels

Comments

@peeweep
Copy link

peeweep commented Oct 2, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

gentoo-zh % pkgcheck scan .                                  13:46:15 [1316/5136]
Traceback (most recent call last):                                                                                              
  File "/usr/lib/python-exec/python3.12/pkgcheck", line 8, in <module>                                                          
    sys.exit(main())                                                                                                            
             ^^^^^^                                                                                                             
  File "/usr/lib/python3.12/site-packages/pkgcheck/scripts/__init__.py", line 48, in main                                       
    run(os.path.basename(sys.argv[0]))                                                                                          
  File "/usr/lib/python3.12/site-packages/pkgcheck/scripts/__init__.py", line 40, in run                                        
    sys.exit(tool())                                                                                                            
             ^^^^^^                                                                                                             
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/tool.py", line 81, in __call__                                           
    ret = self.main()                                                                                                           
          ^^^^^^^^^^^                                                                                                           
  File "/usr/lib/python3.12/site-packages/pkgcheck/cli.py", line 20, in main                                                    
    return super().main()                                                                                                       
           ^^^^^^^^^^^^^^                                                                                                       
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/tool.py", line 191, in main                                              
    self.handle_exec_exception(e)                                                                                               
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/tool.py", line 173, in main                                              
    self.options, func = self.parse_args(                                                                                       
                         ^^^^^^^^^^^^^^^^                                                                                       
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/tool.py", line 128, in parse_args                                        
    self.handle_exec_exception(e)                                                                                               
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/tool.py", line 102, in parse_args                                        
    options = self.parser.parse_args(args=args, namespace=namespace)                                                            
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                            
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/arghparse.py", line 1260, in parse_args                                  
    args, unknown_args = self.parse_known_args(args, namespace)                                                                 
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                 
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/arghparse.py", line 1247, in parse_known_args                            
    namespace, args = self._parse_known_args(args, namespace)                                                                   
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                   
  File "/usr/lib/python3.12/argparse.py", line 2171, in _parse_known_args                                                       
    stop_index = consume_positionals(start_index)                                                                               
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                               
  File "/usr/lib/python3.12/argparse.py", line 2127, in consume_positionals                                                     
    take_action(action, args)                                                                                                   
  File "/usr/lib/python3.12/argparse.py", line 2006, in take_action                                                             
    action(self, namespace, argument_values, option_string)                                                                     
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/arghparse.py", line 539, in __call__                                     
    namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)                                                    
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                    
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/arghparse.py", line 1244, in parse_known_args                            
    namespace, args = functor(parser, namespace, args)                                                                          
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                          
  File "/usr/lib/python3.12/site-packages/pkgcheck/scripts/pkgcheck_scan.py", line 404, in _setup_scan                          
    namespace = config_parser.parse_config_options(namespace, configs=configs)                                                  
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                  
  File "/usr/lib/python3.12/site-packages/pkgcheck/cli.py", line 78, in parse_config_options                                    
    namespace = self.parse_config_sections(namespace, ["DEFAULT"])                                                              
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                              
  File "/usr/lib/python3.12/site-packages/pkgcheck/cli.py", line 62, in parse_config_sections                                   
    namespace, args = self.parser.parse_known_optionals(config_args, namespace)                                                 
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                 
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/arghparse.py", line 702, in parse_known_optionals                        
    return self._parse_optionals(args, namespace)                                                                               
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                               
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/arghparse.py", line 906, in _parse_optionals                             
    start_index = consume_optional(start_index)                                                                                 
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                 
  File "/usr/lib/python3.12/site-packages/snakeoil/cli/arghparse.py", line 777, in consume_optional                             
    action, option_string, explicit_arg = option_tuple                                                                          
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                         
ValueError: not enough values to unpack (expected 3, got 1)

After upgrading to python-3.12.7, if there is a pkgcheck.conf, the pkgcheck scan . command will throw an ValueError.

[DEFAULT]
# Disable noisy keywords (checks)
keywords = -PotentialStable,-RedundantVersion

This is my pkgcheck.conf. Deleting pkgcheck.conf or downgrading Python to 3.12.6 resolves the error. I think this issue is similar to the one fixed in #676 .

Expected Behavior

No response

pkgcheck version

pkgcheck 0.10.31

pkgcore version

pkgcore 0.12.28

@peeweep peeweep added the bug label Oct 2, 2024
@peeweep peeweep changed the title [Bug]: pkgcheck scan show ValueError [Bug]: pkgcheck scan show ValueError with python-3.12.7 Oct 2, 2024
@arthurzam arthurzam self-assigned this Oct 2, 2024
@arthurzam
Copy link
Member

Caused by python/cpython@cbea45a

@arthurzam
Copy link
Member

Fixed in pkgcore/snakeoil@817418d, which would be a fast release of snakeoil 0.10.9. I hope in some minutes to push it to ::gentoo.

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

No branches or pull requests

2 participants