[issue33150] Signature error for methods of class configparser.Interpolation

2019-07-29 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy:  -nanjekyejoannah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33150] Signature error for methods of class configparser.Interpolation

2019-04-25 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33150] Signature error for methods of class configparser.Interpolation

2018-03-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Can you write a test case that raises the exception?  Use .read_string to 
create the CF instance, as that calls .read_file, which calls ._read, which 
calls ._join_multiline_values.

I wonder if we could delete .before_read and replace its call with the value 
passed and intended to be returned.  None of the Interpolation subclasses 
override it, and it is undocumented in both code and docs.  Ditto for 
.before_write.

--
components:  -Build, asyncio
nosy: +terry.reedy
versions: +Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33150] Signature error for methods of class configparser.Interpolation

2018-03-27 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +lukasz.langa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33150] Signature error for methods of class configparser.Interpolation

2018-03-26 Thread Arno-Can Uestuensoez

New submission from Arno-Can Uestuensoez :

I am not sure whether this is already covered by an issue, it is present in 
3.6.2 and 3.6.4.

The class Interpolation in the configparser module causes an exception:

  File "/opt/python/python-3.6.4/lib/python3.6/configparser.py", line 1123, in 
_join_multiline_values
name, val)
TypeError: before_read() missing 1 required positional argument: 'value'


This is due to the missing 'parser' parameter at the call of 
'Interploation.xyz()' methods, also the case for several other method calls.


class Interpolation:
"""Dummy interpolation that passes the value through with no changes."""

def before_read(self, parser, section, option, value):
return value

   ...

Same for derived classes see e.g.

   class BasicInterpolation(Interpolation):
   ...

   class ExtendedInterpolation(Interpolation):
   ...

A work around seems to be:

- defining a dummy with changed signatures as parameter 'interpolation'

--
components: Argument Clinic, Build, asyncio
messages: 314493
nosy: acue, asvetlov, larry, yselivanov
priority: normal
severity: normal
status: open
title: Signature error for methods of class configparser.Interpolation
type: compile error
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com