flying sheep 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”.
if the argument is
flying sheep 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
<http://bugs.python.org/issue12
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
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
Change by flying sheep :
--
components: +IO
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue42193>
___
___
Python-bugs-list mailin
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
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
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
flying sheep added the comment:
I should have linked the file: distutils/command/check.py
--
___
Python tracker
<http://bugs.python.org/issue31292>
___
___
Pytho
Changes by flying sheep :
--
pull_requests: +3293
___
Python tracker
<http://bugs.python.org/issue31292>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by flying sheep :
--
keywords: +patch
pull_requests: +9848
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31292>
___
___
Py
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/
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
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
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 to
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
of
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
Changes by flying sheep :
--
components: +XML
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue17410>
___
___
Python-bugs-list mai
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 a
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
<http://bugs.python.org/issue17
Changes by flying sheep :
Removed file: http://bugs.python.org/file29401/htmltokenizer.patch
___
Python tracker
<http://bugs.python.org/issue17410>
___
___
Python-bug
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 &q
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
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 be
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 trac
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
flying sheep added the comment:
sure, go ahead! i wasn’t aware of PEP nor issue, so sorry for filing a dupe.
--
___
Python tracker
<http://bugs.python.org/issue22
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
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, and
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
they are
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
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
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
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
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 to
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
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
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, or
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
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. it
Changes by flying sheep :
--
type: -> behavior
versions: +Python 3.6
___
Python tracker
<http://bugs.python.org/issue26713>
___
___
Python-bugs-list mai
Changes by flying sheep :
--
nosy: +flying sheep
___
Python tracker
<http://bugs.python.org/issue27948>
___
___
Python-bugs-list mailing list
Unsubscribe:
42 matches
Mail list logo