Bug 845483

Summary: python3-cherrypy can't use configuration files
Product: [Fedora] Fedora Reporter: Jörgen Maas <jorgen.maas>
Component: python3-cherrypyAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 17CC: dmalcolm, jorgen.maas
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-31 23:55:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jörgen Maas 2012-08-03 08:27:08 UTC
Description of problem:

This is bug is for the python3-cherrypy package.
When using a configfile a TypeError exception occurs, posted on the cherrypy ml and it seems this is a know issue with cherrypy on python3 which has since been fixed upstream.


Version-Release number of selected component (if applicable):

Fedora17
python3-3.2.3-7.fc17.x86_64
python3-cherrypy-3.2.0-0.rc1.r2567.1.fc17.4.noarch


How reproducible:

Create a very basic configuration file:
[global]
server.socket_host = 127.0.0.1

Use the following test code:
#!/usr/bin/env python3

import cherrypy

class HelloWorld(object):

  @cherrypy.expose
  def index(self):
    return "test"

cherrypy.config.update('config.conf')
cherrypy.quickstart(HelloWolrd())



Steps to Reproduce:
1. create above files
2. run code with python3
3.
  
Actual results:

Traceback (most recent call last):
  File "./test.py", line 11, in <module>
    cherrypy.config.update('config.conf')
  File "/usr/lib/python3.2/site-packages/cherrypy/_cpconfig.py", line 130, in update
    reprconf.Config.update(self, config)
  File "/usr/lib/python3.2/site-packages/cherrypy/lib/reprconf.py", line 113, in update
    config = Parser().dict_from_file(config)
  File "/usr/lib/python3.2/site-packages/cherrypy/lib/reprconf.py", line 184, in dict_from_file
    return self.as_dict()
  File "/usr/lib/python3.2/site-packages/cherrypy/lib/reprconf.py", line 168, in as_dict
    value = self.get(section, option, raw, vars)
TypeError: get() takes exactly 3 positional arguments (5 given)


Expected results:

Running cherrpy server with an updated configuration.

Additional info:

I'm using CherryPy 3.2.0, and in python3 PEP-3102 [1] is applied, which constrains the keyword arguments in CherryPy that was fixed on this [2] huge commit at line 212.


[1] http://www.python.org/dev/peps/pep-3102/
[2] https://bitbucket.org/cherrypy/cherrypy/changeset/3199e7eab651ecb2dacf0b95a2c94c151f47c81a#chg_cherrypy/lib/reprconf.py_newline212

So, updating cherrypy to 3.2.1+ shoud fix this, rather important, issue.

Comment 1 Fedora End Of Life 2013-07-03 22:13:08 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2013-07-31 23:55:49 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.