[issue7005] ConfigParser does not handle options without values

2010-09-02 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

This one is strange. Trying to set a None value through set() raises 
'TypeError: option values must be strings' on both Python 3.2 and 2.7. A string 
value of 'None' behaves as expected (e.g. correctly).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2010-09-02 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

I've attached a diagnostic script that I ran with Python 2.4..3.2 (current py3k 
HEAD); there are two output variants:

old style:

[section]
option = None

new style:

[section]
option

This is the output I get when running this script for each of those Python 
versions:

2.4.6 RawConfigParser: old-style output
2.4.6 SafeConfigParser: raised TypeError on set
2.4.6 ConfigParser: old-style output

2.5.5 RawConfigParser: old-style output
2.5.5 SafeConfigParser: raised TypeError on set
2.5.5 ConfigParser: old-style output

2.6.5 RawConfigParser: old-style output
2.6.5 SafeConfigParser: raised TypeError on set
2.6.5 ConfigParser: old-style output

2.7 RawConfigParser: new-style output
2.7 SafeConfigParser: raised TypeError on set
2.7 ConfigParser: new-style output

3.1.1 RawConfigParser: old-style output
3.1.1 SafeConfigParser: raised TypeError on set
3.1.1 ConfigParser: old-style output

3.2a1+ RawConfigParser: new-style output
3.2a1+ SafeConfigParser: raised TypeError on set
3.2a1+ ConfigParser: new-style output

Essentially: For the RawConfigParser and ConfigParser classes, the output 
changes in 2.7 and 3.2, and in a way that should be considered incorrect 
because it conflicts with the allow_no_values setting.

This is a bug and should be fixed in both 2.7 and 3.2.

The TypeError-on-set is consistently raised only for SafeConfigParser, and 
should remain unchanged.  (Why this was handled differently for 
SafeConfigParser I don't recall offhand.)

--
Added file: http://bugs.python.org/file18717/cpsample.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2010-09-02 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

Attached fix  test for Python 2; adjusting to Python 3 is trivial.

The test could be added to 2.6 as well to protect against regressions there, 
though that's unlikely to be a significant issue.

--
Added file: http://bugs.python.org/file18718/issue-7005.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2010-09-02 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

Commited as r84443 (release27-maint), r8 (py3k)

--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2010-08-26 Thread Dwayne Bailey

Dwayne Bailey dwayne+pythonb...@translate.org.za added the comment:

This is causing a regression in our code.

Previously when we write out our INI file for an entry that has a value of None 
we saw the following:
value = None

These are now stored as:
value

This is now causing a traceback in our code.

But interestingly I haven't changed anything in our initialisation of 
ConfigParser, I would have assumed that I need to set allow_no_value for this 
to work in the new way that MySQL expects.

I would have expected everything to work as it currently does in 2.6 unless I 
specifically request

You can see the traceback of Virtaal under Python 2. in this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=622061

--
nosy: +dwayne

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2010-08-26 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

Re-opening for investigation.

(The previous message really should have been a new issue.)

--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2010-08-26 Thread Fred L. Drake, Jr.

Changes by Fred L. Drake, Jr. fdr...@acm.org:


--
nosy: +lukasz.langa

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2010-02-18 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

Patch and documentation merged to the py3k branch (r78233).

Work on this is complete.

--
resolution:  - accepted
stage:  - committed/rejected
status: open - closed
type:  - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2010-02-16 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

Assigning to myself for handling.

Bumping to Python 2.7 / 3.2 since support for this syntax variation is a new 
feature.

--
assignee:  - fdrake
versions: +Python 2.7, Python 3.2 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7005] ConfigParser does not handle options without values

2009-11-14 Thread Mats Kindahl

Mats Kindahl m...@sun.com added the comment:

So, what is the status on this?
Who needs to review it?
Is there anything I can do to get it accepted?
Do I need to make any changes (in addition to those already suggested
and done by fdrake)?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7005
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com