[issue42193] Improve socket.bind error message

2020-10-29 Thread flying sheep
Change by flying sheep : -- components: +IO versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue42193> ___ ___ Python-bugs-list mailin

[issue42193] Improve socket.bind error message

2020-10-29 Thread flying sheep
New submission from flying sheep : In the end of my stack trace, I just see File "...", line 174, in bind_sockets sock.bind(sockaddr) OSError: [Errno 99] Cannot assign requested address It would be useful if it would tell me which socket that was in the erro

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2019-08-13 Thread flying sheep
flying sheep added the comment: There’s this monkeypatching solution: https://pypi.org/project/nest-asyncio/ But yes, it’s a very practical problem that you can’t call async code from sync code that’s being called from async code. -- nosy: +flying sheep

[issue37173] inspect.getfile error names module instead of passed class

2019-06-06 Thread flying sheep
Change by flying sheep : -- keywords: +patch pull_requests: +13736 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13861 ___ Python tracker <https://bugs.python.org/issu

[issue37173] inspect.getfile error names module instead of passed class

2019-06-06 Thread flying sheep
New submission from flying sheep : Currently, inspect.getfile(str) will report nonsense: >>> inspect.getfile(str) TypeError: is a built-in class -- components: Library (Lib) messages: 344799 nosy: flying sheep priority: normal severity: normal status: open title: inspec

[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2018-11-20 Thread flying sheep
Change by flying sheep : -- keywords: +patch pull_requests: +9848 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31292> ___ ___ Py

[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2017-08-30 Thread flying sheep
Changes by flying sheep <flying-sh...@web.de>: -- pull_requests: +3293 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31292> ___ _

[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2017-08-30 Thread flying sheep
flying sheep added the comment: I should have linked the file: distutils/command/check.py -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2017-08-28 Thread flying sheep
New submission from flying sheep: If I have a setup.py containing a include directive, and use the command in the title, I get Traceback (most recent call last): [...] File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/directives/misc.py", line 59, in run

[issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers()

2017-05-09 Thread flying sheep
flying sheep added the comment: well, we should just allow extractall(members=['foo', 'bar']) currently members only accepts TarInfo objects, not filenames, but it’s easy to accept both. https://github.com/python/cpython/blob/74683fc6247c522ae955a6e7308b8ff51def35d8/Lib/tarfile.py#L1991

[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-16 Thread flying sheep
flying sheep added the comment: Cool! This set of basic initial check will consist of all the is_* functions that were mentioned right? FWIW I also think that this is the way to go, as it’s not obvious if the semantics should be “conforms to this type annotation” or “is a type annotation

[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-13 Thread flying sheep
New submission from flying sheep: typing.Union prevents the use of `isinstance` and `issubclass` via a hook. This is presumably to prevent errors that would arise if someone tried to do issubclass(A, Union[A, B]) or isinstance(A(), Union[A, B]), because Union isn’t specified in the PEP

[issue27948] f-strings: allow backslashes only in the string parts, not in the expression parts

2016-09-19 Thread flying sheep
Changes by flying sheep <flying-sh...@web.de>: -- nosy: +flying sheep ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27948> ___ _

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread flying sheep
Changes by flying sheep <flying-sh...@web.de>: -- type: -> behavior versions: +Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread flying sheep
New submission from flying sheep: code inside of the braces of an f-literal should have the exact same lexing rules than outside *except* for an otherwise unparsable !, :, or } signifying the end of the replacement field 1. every other language with template literals has it that way 2

[issue26277] Allow zipapp to target modules

2016-02-03 Thread flying sheep
New submission from flying sheep: currently, zipapp’s notion of __main__.py is very different from the usual. the root directory of a zipapp is not a module, therefore __init__.py isn’t used and relative imports from __main__.py don’t work. i propose that the zipapp functionality is amended

[issue25830] _TypeAlias: Discrepancy between docstring and behavior

2015-12-09 Thread flying sheep
New submission from flying sheep: _TypeAlias claims in its docstring that “It can be used in instance and subclass checks”, yet promptly contradicts itself if you try it: “Type aliases cannot be used with isinstance().” it would be useful to either document (and therefore bless) type_impl

[issue7175] Define a standard location and API for configuration files

2015-09-04 Thread flying sheep
flying sheep added the comment: just because people do something doesn’t mean it’s right. i guess the tendency for CLI applications to do it wrong comes from 1. their ad-hoc beginnings. you usually start with one script file and extend it 2. availability expanduser('~') is in the stdlib

[issue7175] Define a standard location and API for configuration files

2015-09-03 Thread flying sheep
flying sheep added the comment: you’re right about the two problems being mixed, however not about the standards. also you’re intermingling conventions with actual standards. the directory standards for all three big OSs are either not going to change or fitted with a backwards-compatibility

[issue7175] Define a standard location and API for configuration files

2015-09-02 Thread flying sheep
flying sheep added the comment: of course if there is a chance that some specific config file exists at a known location, it’s the only sane choice to try and look for it there iff it isn’t in its preferred location. e.g. fontconfig made that switch some time ago: it used to be ~/.fonts.conf

[issue7175] Define a standard location and API for configuration files

2015-09-02 Thread flying sheep
flying sheep added the comment: hi mark, i’ve just lengthily replied to you on python-ideas. in short: nope! many command line tools that are relatively new (among them your examples git and pip) honor the specs, my ~/.cache, ~/.config, and ~/.local/share is full of things belonging

[issue7175] Define a standard location and API for configuration files

2015-09-01 Thread flying sheep
flying sheep added the comment: no, sorry, but ~/.python is wrong on linux. there exists a standard about where things belong: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html it says that configuration stuff belongs into `XDG_CONFIG_HOME`, with a fallback to `~/.config

[issue24849] Add __len__ to map, everything in itertools

2015-08-13 Thread flying sheep
flying sheep added the comment: The *iterable* itself may be reentrant, but the iterator formed from iter(iterable) is not. So by your previous comment, giving the iterator form a length is not appropriate. With the exception of tee, all the functions in itertools return iterators. ah

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread flying sheep
flying sheep added the comment: Hi, and sorry David, but I think you haven’t understood what I was proposing. Maybe that was too much text and detail to read at once, while skipping the relevant details: Python has iterators and iterables. iterators are non-reentrant iterables: once

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread flying sheep
flying sheep added the comment: To elaborate more on my second point (“No reentrant iterables are necessary here, only iterables with a __len__”) What i meant here is that inside a call of chain(*iterables), such as chain(foo, bar, *baz_generator()), the paramter “iterables” is always a tuple

[issue24849] Add __len__ to map, everything in itertools

2015-08-12 Thread flying sheep
New submission from flying sheep: Things like progressbars want len() to work on iterated objects. It’s possible to define __len__ for many of the iterables returned by itertools. some arguments have to be iterated to find the len(): of course we have to check if those are reentrant

[issue23275] Can assign [] = (), but not () = []

2015-05-27 Thread flying sheep
flying sheep added the comment: isn't it logical? [] is a mutable data structure while () is a immutable data structure but you don’t assign to data structures, but to names. you *modify* data structures. and in the square bracket assignment syntax you don’t modify the list created

[issue18156] Add an 'attr' attribute to AttributeError

2014-11-02 Thread flying sheep
flying sheep added the comment: yeah, exactly: my idea was to add a reference to the original object (AttributeError.target). together with this bug, that would be the AttributeError part of PEP 473, which i really like! -- nosy: +flying sheep

[issue22716] Add reference to the object missing an attribute to AttributeError

2014-11-02 Thread flying sheep
flying sheep added the comment: sure, go ahead! i wasn’t aware of PEP nor issue, so sorry for filing a dupe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22716

[issue22716] Add reference to the object missing an attribute to AttributeError

2014-10-25 Thread flying sheep
flying sheep added the comment: No, this is about the object which misses an argument, not the attribute name. But thanks for the pointer: one combined fix for both would be the smartest thing to do. -- status: closed - open ___ Python tracker rep

[issue22716] Add reference to the object missing an attribute to AttributeError

2014-10-24 Thread flying sheep
New submission from flying sheep: Trying to replicate a Ruby Gem that raises a “did you mean” error when mistyping a method name, I hit a showstopper: There seems to be no way to get the object which misses an attribute from an AttributeError. I propose the appended patch (it might

[issue18234] Unicodedata module should provide access to codepoint aliases

2014-10-11 Thread flying sheep
flying sheep added the comment: IDK if it came with unicode 7.0, but there is clarification: # Note that currently the only instances of multiple aliases of the same # type for a single code point are either of type control or abbreviation. # An alias of type abbreviation can, in principle

[issue22612] Add block info to unicodedata

2014-10-11 Thread flying sheep
New submission from flying sheep: See also #6331. The repo https://github.com/nagisa/unicodeblocks contains pretty much the functionality i’d like to see: a way to get access to information about all blocks, and a way to get the block name a char is in. I propose to include something very

[issue18172] New easter egg: insecure string pickle

2013-06-09 Thread flying sheep
New submission from flying sheep: the second meaning of the error message “insecure string pickle” inspired at least two different people independently of drawing it. i’d wish for a link to one of those pics in the docstring or message of the error. picture: http://i.imgur.com/To3DQ6J.jpg

[issue17410] Generator-based HTMLParser

2013-03-13 Thread flying sheep
New submission from flying sheep: hi, i have an idea on how to make an internal change to html.parser.HTMLParser, which would expose a token generator interface. after that, we would be able to do e.g. list(HTMLParser().tokenize(data)) or even parser = HTMLParser() for chunk in pipe_in_html

[issue17410] Generator-based HTMLParser

2013-03-13 Thread flying sheep
Changes by flying sheep flying-sh...@web.de: -- components: +XML type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17410

[issue17410] Generator-based HTMLParser

2013-03-13 Thread flying sheep
flying sheep added the comment: no, i didn’t change anything that didn’t have to be changed to expose the tokens. i kept the changes as minimal as possible. and the tests pass! i attached the patch. --- aside thoughts: i had to change _markupbase.py, too, but i wonder why it’s even

[issue17410] Generator-based HTMLParser

2013-03-13 Thread flying sheep
flying sheep added the comment: whoops, left my editor modeline in. i knew that was going to happen. -- Added file: http://bugs.python.org/file29402/htmltokenizer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17410

[issue17410] Generator-based HTMLParser

2013-03-13 Thread flying sheep
Changes by flying sheep flying-sh...@web.de: Removed file: http://bugs.python.org/file29401/htmltokenizer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17410

[issue15873] datetime cannot parse ISO 8601 dates and times

2012-10-31 Thread flying sheep
flying sheep added the comment: there is a module that parses those strings pretty nicely, it’s called pyiso8601: http://code.google.com/p/pyiso8601/ in the context of writing a better plistlib, i also needed the capability to parse those strings, and decided not to use the sucky incomplete

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread flying sheep
flying sheep flying-sh...@web.de added the comment: this is annoying: i’m creating a reindentation script that reindents any valid python script. the user can specify if, and how many spaces he/she wants to use per indentation level. `0` or leaving the option out means “one tab per level

[issue12776] argparse: type conversion function should be called only once

2011-11-24 Thread flying sheep
flying sheep flying-sh...@web.de added the comment: i don’t know, since i get python from the ubuntu repositories, sorry. in which python release will this patch first be integrated? -- ___ Python tracker rep...@bugs.python.org http