[issue44748] argparse: a bool indicating if arg was encountered
Thermi added the comment: 1) True. That'd mean such functionality would not be usable by such a workaround though. 2) ANY setting has a default value. The output in the --help message has to, if any defaults at all are shown, be the same as the actual default values. Storing the default values as part of the argparse.ArgumentParser configuration prevents duplication of the default value declaration in the config file reader, and the argument parser. What I request is the reverse of what you wrote. I want the order of priority to fall back to the defaults, if no value is specified in the config file. And if an argument is passed via argv, then that value should take precedence over what is set in the config file. This is in the first message in this issue. 3) Two different places to touch when you want to add a new option: 1) Default config declared in program code 2) argparse.ArgumentParser configuration in code. -- ___ Python tracker <https://bugs.python.org/issue44748> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44748] argparse: a bool indicating if arg was encountered
Thermi added the comment: Raymond, then you can't show the defaults in the help message. -- ___ Python tracker <https://bugs.python.org/issue44748> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44748] argparse: a bool indicating if arg was encountered
Thermi added the comment: joker, that is a different issue from the one described here. Please open your own. -- ___ Python tracker <https://bugs.python.org/issue44748> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44748] argparse: a bool indicating if arg was encountered
New submission from Thermi : It'd be great if as part of the namespace returned by argparse.ArgumentParser.parse_args(), there was a bool indicating if a specific argument was encountered. That could then be used to implement the following behaviour: With a config file loaded as part of the program, overwrite the values loaded from the config file if the argument was encountered in the argument vector. That's necessary to implement overwriting of settings that were previously set by a different mechanism, e.g. read from a config file. After all the following order of significance should be used: program defaults < config file < argument vector -- components: Library (Lib) messages: 398288 nosy: Thermi priority: normal severity: normal status: open title: argparse: a bool indicating if arg was encountered type: enhancement versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue44748> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43536] 3.9.2 --without-pymalloc --with-pydebug --with-valgrind: test failed: test_posix
Thermi added the comment: PKGBUILD I use to build the python package I need for debugging on Arch. Only changes to it are the addition of the 3 configure flags mentioned in the title. Other than that, it should work fine. I built the package previously without those changes and that worked. flags: --without-pymalloc --with-pydebug --with-valgrind -- Added file: https://bugs.python.org/file49888/PKGBUILD ___ Python tracker <https://bugs.python.org/issue43536> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43536] 3.9.2 --without-pymalloc --with-pydebug --with-valgrind: test failed: test_posix
New submission from Thermi : -- Ran 210 tests in 0.950s OK (skipped=26) == Tests result: FAILURE == 412 tests OK. 1 test failed: test_posix 10 tests skipped: test_devpoll test_gdb test_kqueue test_msilib test_ossaudiodev test_startfile test_winconsoleio test_winreg test_winsound test_zipfile64 Total duration: 1 hour 3 min Tests result: FAILURE test test_posix failed 0:38:00 load avg: 1.89 [265/423/1] test_posixpath -- test_posix failed Possibly related: test_setscheduler_with_policy (test.test_posix.TestPosixSpawnP) ... ERROR test_setscheduler_with_policy (test.test_posix.TestPosixSpawn) ... ERROR Distribution: Arch Linux Linux 5.11.6-arch1-1 gcc 10.2.0-6 glibc 2.33-4 valgrind 3.16.1-4 -- components: Tests files: config.log messages: 388986 nosy: Thermi priority: normal severity: normal status: open title: 3.9.2 --without-pymalloc --with-pydebug --with-valgrind: test failed: test_posix type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49887/config.log ___ Python tracker <https://bugs.python.org/issue43536> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32510] Broken comparisons (probably caused by wrong caching of values)
New submission from Thermi : With Python 3.6.4 on Arch Linux, on three different hosts (one Skylake CPU, one i7-3820, one Xeon E5-2680, all running Arch Linux with the same Python version), the Python 3 interpreter behaves erratically in a script of mine. The following symptoms occur: 1) Comparisons fail, although they logically need to succeed. The comparisons work a lot of the times, but sometimes, they don't. 2) Integers magically increase without ever being written to in the code after initially assigned in the constructor. The behaviour changes if code is rearranged, variables and lines are added that do not pertain the broken comparisons, making accidental writes to memory or reads from unitialized memory likely. The breakage occurs in the code between line 114 and the execution of the code in the recurse() method of the class Branch. The script is here (https://gist.github.com/Thermi/05bc671436841670ac81b3b86217dd62). It basically only does some arithmetic with translation tables. -- components: Interpreter Core messages: 309619 nosy: Thermi priority: normal severity: normal status: open title: Broken comparisons (probably caused by wrong caching of values) versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue32510> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com