[issue43738] Clarify public name of curses.window

2021-04-05 Thread Ryan McCampbell
New submission from Ryan McCampbell : Until 3.8 the curses window class was not directly available in code, but now it is available as `_curses.window`. This is not explicitly stated in the documentation (although it is consistent with how the method signatures are written). It is useful to

[issue34305] inspect.getsourcefile and inspect.getcomments do not work with decorated functions

2020-03-05 Thread Ryan McCampbell
Ryan McCampbell added the comment: This seems like a pretty straightforward fix. What's holding it up? -- nosy: +rmccampbell7 ___ Python tracker <https://bugs.python.org/is

[issue39587] Mixin repr overrides Enum repr in some cases

2020-02-08 Thread Ryan McCampbell
New submission from Ryan McCampbell : In Python 3.6 the following works: class HexInt(int): def __repr__(self): return hex(self) class MyEnum(HexInt, enum.Enum): A = 1 B = 2 C = 3 >>> MyEnum.A However in Python 3.7/8 it instead prints >>> MyE

[issue39252] email.contentmanager.raw_data_manager bytes handler breaks on 7bit cte

2020-01-07 Thread Ryan McCampbell
New submission from Ryan McCampbell : The email.contentmanager.set_bytes_content function which handles bytes content for raw_data_manager fails when passed cte="7bit" with an AttributeError: 'bytes' object has no attribute 'encode'. This is probably not a m

[issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters

2019-07-09 Thread Ryan McCampbell
Ryan McCampbell added the comment: Oops my bad, didn't realize this was already fixed -- ___ Python tracker <https://bugs.python.org/issue37536> ___ ___

[issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters

2019-07-09 Thread Ryan McCampbell
Change by Ryan McCampbell : -- versions: +Python 3.6 ___ Python tracker <https://bugs.python.org/issue37536> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters

2019-07-09 Thread Ryan McCampbell
Change by Ryan McCampbell : -- components: +ctypes type: -> behavior ___ Python tracker <https://bugs.python.org/issue37536> ___ ___ Python-bugs-list mai

[issue37536] ctypes.create_string_buffer fails on windows with non-BMP characters

2019-07-09 Thread Ryan McCampbell
New submission from Ryan McCampbell : The ctypes.create_string_buffer function uses the length of the string to create the buffer if no size is provided. Since windows wide chars are UTF-16 the buffer may actually need to be larger to store surrogate pairs. This code crashes on windows

[issue35474] mimetypes.guess_all_extensions potentially mutates list

2018-12-12 Thread Ryan McCampbell
New submission from Ryan McCampbell : The mimetypes.guess_all_extensions function is defined as: def guess_all_extensions(self, type, strict=True): type = type.lower() extensions = self.types_map_inv[True].get(type, []) if not strict: for ext in self.types_map_inv[False

[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

2018-09-26 Thread Ryan McCampbell
Ryan McCampbell added the comment: This is how windows looks up commands, as well as the built in "where" command. (Note that windows doesn't actually distinguish between "executable" files and just plain old files, so this could be confusing for UNIX users... a tex

[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

2017-09-09 Thread Ryan McCampbell
New submission from Ryan McCampbell: On windows, shutil.which does not match the semantics of built-in command lookup. If you pass the name of a script like foo.py and the PATHEXT variable doesn't include .py it will search for foo.py.exe, foo.py.bat, foo.py.cmd, etc. but not foo.py,

[issue22487] ABC register doesn't check abstract methods

2014-09-24 Thread Ryan McCampbell
Ryan McCampbell added the comment: Obviously, I meant isinstance(o, Collections.Iterable). -- ___ Python tracker <http://bugs.python.org/issue22487> ___ ___ Pytho

[issue22487] ABC register doesn't check abstract methods

2014-09-24 Thread Ryan McCampbell
New submission from Ryan McCampbell: Is there a reason register() doesn't check for abstract methods, like subclassing does? Would it fail for some builtin classes? It seems that this would be a better guarantee that, say, something really is iterable when you check isins

[issue21684] inspect.signature bind doesn't include defaults or empty tuple/dicts

2014-06-24 Thread Ryan McCampbell
Ryan McCampbell added the comment: It's not really a particular use case. I was making a function decorator for automatic type checking using annotations (ironically I discovered later there is an almost identical example in the PEP for signatures). But I can't think of any use ca

[issue21684] inspect.signature bind doesn't include defaults or empty tuple/dicts

2014-06-21 Thread Ryan McCampbell
Ryan McCampbell added the comment: Copying defaults still doesn't give you var positional/keyword arguments, which means, you have to explicitly check the parameter type, and then add them in. I still think it would more useful to have an "official" way of getting all function

[issue21684] inspect.signature bind doesn't include defaults or empty tuple/dicts

2014-06-14 Thread Ryan McCampbell
Ryan McCampbell added the comment: If this is decided against, a partial solution would be to set the "default" attribute of VAR_POSITIONAL and VAR_KEYWORD args to an empty tuple/dict, respectively. Then you could get a parameter's value no matter what with boundargs

[issue21684] inspect.signature bind doesn't include defaults or empty tuple/dicts

2014-06-06 Thread Ryan McCampbell
New submission from Ryan McCampbell: I'm not sure if this is really a bug, but it is unexpected behavior. When you call "bind" on a Python 3.3 signature object, if you omit an optional argument, the default is not provided in the arguments dict. Similarly, if there is a &quo