[issue39860] configparser - no support for cascading defaults (as defined by MySQL)

2022-02-09 Thread Ben Griffin


Ben Griffin  added the comment:

This is still being ignored.  
It's a bug, because it prevents the ini file from being used by other clients.

--
versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9

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



[issue41212] Emoji Unicode failing in standard release of Python 3.8.3 / tkinter 8.6.8

2020-07-06 Thread Ben Griffin

Ben Griffin  added the comment:

Wow, well if you are right, then TCL/TK is a showstopper for us, and we will 
have to consider an alternative to tkinter. 

Frankly, I am aghast that any active software would be limited to fixed width 
characters.

We moved our languages over to multiwidth (utf-8) back in 2003: most of the 
changes were restricted to a handful of string functions (strcut, strlen, 
etc.). Compiling TCL to use 4 byte chars isn’t really a solution either.

What confuses me is that there are several people on SO who are saying ‘works 
for me’.

--

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



[issue41212] Emoji Unicode failing in standard release of Python 3.8.3 / tkinter 8.6.8

2020-07-05 Thread Ben Griffin

Ben Griffin  added the comment:

Erm, I don’t rightly know how to parse epaine’s comment, as it seems to relate 
to a version of Unicode from over a decade ago, and a wiki page that was 
written 12 years ago.

IIRC Python 3 was (IMO rightly) developed to default to UTF-8, and according to 
a much more recently edited article (https://en.m.wikipedia.org/wiki/UTF-8), a 
normative UTF-8 parser can handle any of the million+ Unicode characters, 
including emoji.

As I pointed out in the bug report, and as mentioned by contributors on SO, TCL 
has seems to have fixed these issues by 8.6.10.

If epaine is correct and TCL CANTFIX/WONTFIX normative utf-8 - then maybe it’s 
time to drop the strong relationship that Python has with tkinter. However Im 
pretty sure that there is no need for such a drastic measure: the UTF-8 
algorithm isn’t that complex.

--

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



[issue41212] Emoji Unicode failing in standard release of Python 3.8.3 / tkinter 8.6.8

2020-07-05 Thread Ben Griffin

New submission from Ben Griffin :

https://stackoverflow.com/questions/62713741/tkinter-and-32-bit-unicode-duplicating-any-fix

Emoji are doubling up when using canvas.create_text()
This is reported to work on tcl/tk 8.6.10 but there’s no. Way to upgrade tcl/tk 
using the standard installs from the python.org site

--
components: Tkinter
files: Emoji.py.txt
messages: 373019
nosy: Ben Griffin
priority: normal
severity: normal
status: open
title: Emoji Unicode failing in standard release of Python 3.8.3 / tkinter 8.6.8
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49297/Emoji.py.txt

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



[issue39860] configparser - no support for cascading defaults (as defined by MySQL)

2020-03-05 Thread Ben Griffin


Ben Griffin  added the comment:

Having looked at the code, I believe that it is best NOT to interfere with the 
'default_section' value of the class, as it is used as a proxy to _defaults, 
whereas the section parameter of get() is easily extended.

The actual changes are all to the method _unify_values, and it is trivial to 
extend that method to allow for multiple dictionaries to be passed to _ChainMap.

This is what I did in PR-18791

--
type:  -> enhancement

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



[issue39860] configparser - no support for cascading defaults (as defined by MySQL)

2020-03-05 Thread Ben Griffin


New submission from Ben Griffin :

While there is now support for a single default group, mysql documentation is 
clear that there is a cascade of groups for option settings, normally starting 
with [client], and including version numbers..

This allows generic settings to be overridden by specific settings, and it's an 
important feature when building an architecture around a mysql/mariadb 
environment.

A typical configuration chain may look like this.

[client] -> [mysql] -> [mysql-5.6] -> [pymysql] -> [my_custom_app]

Currently, the implementation of configparser only allows the programmer to 
define the default group (typically [client]) and then the group to read from 
[my_custom_app].

In terms of a proposed approach to the library, I suggest two changes (both 
backwards compatible).
(1) Extend the 'default_section' initializer such that it supports both a 
string (current implementation) and an iterable (ordered from specialised to 
general).

(2) Likewise extend the 'section' parameter of get() such that it supports both 
a string (current implementation) and an iterable (ordered from specialised to 
general), as above.

Mysql's own docs are as follows.

https://dev.mysql.com/doc/refman/8.0/en/option-files.html#option-file-syntax

"List more general option groups first and more specific groups later. For 
example, a [client] group is more general because it is read by all client 
programs, whereas a [mysqldump] group is read only by mysqldump. Options 
specified later override options specified earlier, so putting the option 
groups in the order [client], [mysqldump] enables mysqldump-specific options to 
override [client] options."

--
components: Library (Lib)
messages: 363421
nosy: Ben Griffin
priority: normal
severity: normal
status: open
title: configparser - no support for cascading defaults (as defined by MySQL)
versions: Python 3.7

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