[issue9802] Document 'stability' of builtin min() and max()

2010-09-08 Thread Matthew Woodcraft
New submission from Matthew Woodcraft matt...@woodcraft.me.uk: In CPython, the builtin max() and min() have the property that if there are items with equal keys, the first item is returned. From a quick look at their source, I think this is true for Jython and IronPython too. I propose making

[issue9802] Document 'stability' of builtin min() and max()

2010-09-12 Thread Matthew Woodcraft
Matthew Woodcraft matt...@woodcraft.me.uk added the comment: (1) Shouldn't 'reverse=True' be omitted in the second doc addition? Yes, of course, sorry. (2) I'd also suggest adding a brief comment about what this means for distinct, but equal, objects; otherwise it's not really obvious

[issue2972] arguments and default path not set in site.py and sitecustomize.py

2010-09-28 Thread Matthew Woodcraft
Matthew Woodcraft matt...@woodcraft.me.uk added the comment: open(/proc/self/cmdline).read() should work on linux (note that the arguments are separated by NULs). -- nosy: +mattheww ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue9976] Make TestCase._formatMessage public

2010-09-28 Thread Matthew Woodcraft
New submission from Matthew Woodcraft matt...@woodcraft.me.uk: It would be pleasant if TestCase._formatMessage, or something similar, could be made part of the documented API; I think pretty much anyone writing a custom TypeEqualityFunc is going to end up reimplementing it. (This is the code

[issue9977] TestCase.assertItemsEqual's description of differences

2010-09-28 Thread Matthew Woodcraft
New submission from Matthew Woodcraft matt...@woodcraft.me.uk: TestCase.assertItemsEqual uses two different techniques to describe the differences in the inputs that it compares. If the inputs are sortable, it sorts them and then uses assertSequenceEqual to describe the difference between them

[issue9977] TestCase.assertItemsEqual's description of differences

2010-10-01 Thread Matthew Woodcraft
Matthew Woodcraft matt...@woodcraft.me.uk added the comment: Terry J. Reedy wrote: If I understand correctly, you are requesting that .assertItemsEqual only use the 2nd (multiset comparison) method, so that if one want the first method, one should directly call .assertSequenceEqual(sorted

[issue4106] multiprocessing occasionally spits out exception during shutdown

2010-10-10 Thread Matthew Woodcraft
Changes by Matthew Woodcraft matt...@woodcraft.me.uk: -- nosy: +mattheww ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4106 ___ ___ Python-bugs

[issue5173] What's new claims StandardError was removed in 2.6

2009-02-06 Thread Matthew Woodcraft
New submission from Matthew Woodcraft m...@pearson.co.uk: In the current What's New In Python 3.0 documentation, under Changes To Exceptions, it is claimed that the removal of StandardError is in 2.6 already. But according to the 2.6.1 documentation, StandardError is still there in its usual

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2011-11-27 Thread Matthew Woodcraft
Matthew Woodcraft matt...@woodcraft.me.uk added the comment: The proposed --nopath0 option is something I've wished I had in the past. If this is added, it would be good if it could be given a single-letter form too, because it's an option that would be useful in #! lines (they don't reliably

[issue13995] sqlite3 Cursor.rowcount documentation for old sqlite bug

2012-02-11 Thread Matthew Woodcraft
New submission from Matthew Woodcraft matt...@woodcraft.me.uk: The documentation for the sqlite3 module contains the following statement, under 'Cursor.rowcount': For DELETE statements, SQLite reports rowcount as 0 if you make a DELETE FROM table without any condition. This doesn't happen

[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'

2012-10-13 Thread Matthew Woodcraft
New submission from Matthew Woodcraft: If I run my code using 'python -m' and there is an unhandled exception, the tracebacks include lines from runpy.py (and now sometimes from importlib._bootstrap) which don't provide useful information, and tend to overwhelm the valuable part

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2014-04-18 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: For the record: the '-I' option (#16499) in Python 3.4 disables sys.path[0] initialisation (among other things). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13475

[issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8

2017-06-25 Thread Matthew Woodcraft
New submission from Matthew Woodcraft: I have a system where the default locale is C.UTF-8, and en_US.UTF-8 is not installed. But locale.normalize() unhelpfully converts "C.UTF-8" to "en_US.UTF-8". So the following crashes for me: python3.6 -c "import locale;local

[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2017-06-25 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: That alias (C.UTF-8 to en_US.UTF-8) is surely a bug in itself nowadays. I've filed #30755 . -- nosy: +mattheww ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8

2017-09-25 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: I've investigated a bit more. First, I've tried with Python 3.7.0a1 . As you'd expect, PEP 537 means this behaviour now also occurs when no locale environment variables at all are set. Second, I've looked through locale.py a bit. I believe what it calls

[issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8

2017-09-25 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: (For PEP 537 please read PEP 538, sorry) -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/i

[issue33302] The search for pyvenv.cfg doesn't match PEP 405

2018-04-17 Thread Matthew Woodcraft
New submission from Matthew Woodcraft <matt...@woodcraft.me.uk>: PEP 405 says that the pyvenv.cfg file is found as follows: « a pyvenv.cfg file is found either adjacent to the Python executable or one directory above it (if the executable is a symlink, it is not derefe

[issue43340] json.load() can raise UnicodeDecodeError, but this is not documented

2021-02-27 Thread Matthew Woodcraft
New submission from Matthew Woodcraft : The documentation for json.load() and json.loads() says: « If the data being deserialized is not a valid JSON document, a JSONDecodeError will be raised. » But this is not currently entirely true: if the data is provided in bytes form