Change by Anthony Sottile :
--
pull_requests: +14395
pull_request: https://github.com/python/cpython/pull/14576
___
Python tracker
<https://bugs.python.org/issue35
Anthony Sottile added the comment:
This has regressed again -- I'll make another patch
--
___
Python tracker
<https://bugs.python.org/issue35605>
___
___
Pytho
Anthony Sottile added the comment:
just an f-string doesn't trigger this, there needs to be tokens before it
--
___
Python tracker
<https://bugs.python.org/issue37
Anthony Sottile added the comment:
I suspect it would be closed since it's essentially just a revert of this issue
:S
--
___
Python tracker
<https://bugs.python.org/issue23
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +14250
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14433
___
Python tracker
<https://bugs.python.org/issu
Anthony Sottile added the comment:
Debugging further, there's a token with a `multi_line_start` pointing at
uninitialized memory -- let's see if I can't track down where that gets set and
fix it :)
--
___
Python tracker
<https://bugs.python.
Anthony Sottile added the comment:
I can also trigger this with:
```
1+ """\q
"""
```
And `python -Werror`
so it seems not necessarily related to fstrings
--
___
Python tracker
<h
New submission from Anthony Sottile :
For instance this file:
foo = f"""{}
foo"""
$ python3.8 --version --version
Python 3.8.0b1 (default, Jun 6 2019, 03:44:52)
[GCC 7.4.0]
$ python3.8 t.py | wc -c
File "t.py", line 1
<>
Anthony Sottile added the comment:
yeah I guess I'm just curious why this bug (seemingly intentionally) made the
implementation diverge from PEP 451 and require an empty `create_module` (and
where I would have found that except by searching bugs.python.org)
Everyone I've shown this bit
Anthony Sottile added the comment:
Mostly looking for something that says how `create_module` should / shouldn't
be implemented (and why `return None` is necessary)
--
___
Python tracker
<https://bugs.python.org/issue23
Anthony Sottile added the comment:
Where can I find up to date best practices / docs for the import machinery? I
couldn't find a mention of this in docs.python.org
--
___
Python tracker
<https://bugs.python.org/issue23
Anthony Sottile added the comment:
Hi! just stumbled on this as I was updating pytest's import hook. I notice in
PEP 451 this is still marked as optional (then again, I don't know whether PEPs
are supposed to be living standards or not, or if there was a PEP which
supersedes that one
New submission from Anthony Sottile :
This is a regression from python2.x behaviour:
$ python2
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue36853>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +13799
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13579
___
Python tracker
<https://bugs.python.org/issu
Anthony Sottile added the comment:
at least for debian, the motivation is to provide a `pythonX.X-minimal` and a
`pythonX.X` package -- the former ~mostly just contains the interpreter and the
latter includes the stdlib
(I'm interested as well, hit this packaging 3.8 for deadsnakes
Change by Anthony Sottile :
--
pull_requests: +13574
pull_request: https://github.com/python/cpython/pull/13686
___
Python tracker
<https://bugs.python.org/issue5
Anthony Sottile added the comment:
If I'm reading this correctly this is the relevant line for python3:
https://github.com/python/cpython/blob/29cb21ddb92413931e473eb799a02e2d8cdf4a45/PC/getpathp.c#L1068
it was added in 4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9
python2 seems to do the same
Anthony Sottile added the comment:
sys.prefix isn't on sys.path on other platforms -- why is it on windows?
--
___
Python tracker
<https://bugs.python.org/issue37
New submission from Anthony Sottile :
Additionally, virtualenvs have the root of their directory on `sys.path` --
this is unlike posix behaviour
For example:
$ python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD6
4)] on win32
Type "help",
Change by Anthony Sottile :
--
pull_requests: +13554
pull_request: https://github.com/python/cpython/pull/13663
___
Python tracker
<https://bugs.python.org/issue36
Change by Anthony Sottile :
--
pull_requests: +13553
pull_request: https://github.com/python/cpython/pull/13662
___
Python tracker
<https://bugs.python.org/issue36
Anthony Sottile added the comment:
yep, happy to do that -- I know I'll need to do 3.7, but should I also do 3.6?
3.5?
--
___
Python tracker
<https://bugs.python.org/issue36
Anthony Sottile added the comment:
They're thin wrappers around the same C functions -- that's just how C works
it is also documented: https://docs.python.org/3/library/os.html#os.execvpe
> In either case, the arguments to the child process **should start with the
> name of the c
Anthony Sottile added the comment:
You want:
os.execl('/bin/bash', 'bash', '--init-file', ...)
argv[0] is supposed to be the program name, your example puts `--init-file` as
the program name
--
nosy: +Anthony Sottile
___
Python tracker
<ht
New submission from Anthony Sottile :
- New since 3.7.0
- is exposed by some public apis:
- the `__doc__` attribute of `typing` mentions `ForwardRef`
- `get_type_hints` can expose an instance of it:
https://bugs.python.org/issue35834
Should this be documented? including in __all__
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +13366
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36984>
___
_
New submission from Anthony Sottile :
expanding on https://bugs.python.org/issue36983
the docs are also a bit out of date in places
I'm not sure how to document something that appeared in two versions, but I'll
leave that part to review.
Using data generated / collected in
https
Anthony Sottile added the comment:
using the same heuristic as the test uses, here's what's been missing from
__all__ historically
(note: I _manually_ skipped `Final` for 3.5.0-3)
===(3, 5, 0)===
+FrozenSet
+SupportsBytes
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +13365
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36983>
___
_
New submission from Anthony Sottile :
notably it is missing ForwardRef, OrderedDict, ChainMap in python3.8
it is missing others in other versions
I'm going to attempt to write a test which should classify things that should
belong there
--
components: Library (Lib)
messages: 342975
Anthony Sottile added the comment:
there's other optional fields in the ast, type ignores don't seem essential to
the `Module`, could those be made optional as well?
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue35
Anthony Sottile added the comment:
still not able to answer the why, but at least I can answer the what here:
https://github.com/python/cpython/blob/f665b96e92a6a6943e312e2c606f348db95939ab/Parser/tokenizer.c#L984-L987
cpython adds a newline during tokenization if the file does not end
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +13312
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/iss
Anthony Sottile added the comment:
> You can not use the same implementation of the visitor for Num, Str,
> NameConstant and Ellipsis, because all these classes use different attribute
> for saving the value
ah yes, this is true -- maybe the better change would be to just add `
Anthony Sottile added the comment:
The simplest case is just the addition of an `isinstance` check:
https://github.com/asottile/dead/blob/85f5edbb84b5e118beab4be3346a630e41418a02/dead.py#L165-L170
class V(ast.NodeVisitor):
def visit_Str(self, node):
...
def visit_Constant
Anthony Sottile added the comment:
spent some more time thinking about this and I think we should strongly
consider reverting. simplification in the core interpreter should not be
weighed lightly against complexity and breaking changes for users.
the change is also unfortunate because
Anthony Sottile added the comment:
There would still be a breakage for that if someone was defining py36+
`visit_Constant` (which would clobber the `ast.NodeVisitor.visit_Constant` if
we were to add it)
--
___
Python tracker
<ht
Anthony Sottile added the comment:
hitting this in https://bugs.python.org/issue36917?
Is the simplification here really worth the breaking change to consumers?
I now have to write something that's essentially this to work around this which
feels more like the complexity has just been
Anthony Sottile added the comment:
wrong bpo, this is the right one: https://bugs.python.org/issue32892
--
___
Python tracker
<https://bugs.python.org/issue36
New submission from Anthony Sottile :
More fallout from the Constant change in https://bugs.python.org/issue32892
minimal reproduction:
import ast
class V(ast.NodeVisitor):
def visit_Str(self, node):
print(node.s)
def main():
V().visit(ast.parse('x = "hi"'))
i
Anthony Sottile added the comment:
seems intentional => closing
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Anthony Sottile added the comment:
+vstinner
Hmmm, actually the relevant commit appears to be
6c44fde3e03079e0c69f823dafbe04af50b5bd0d and intentional
(I ran a git bisect to find this!)
https://github.com/python/cpython/pull/12931
Does PEP 3149 require an update with this change, it still
New submission from Anthony Sottile :
This appears to be a regression between 3.8a3 and 3.8a4 -- though it may be
intentional and I'm missing something?
I noticed this while packaging 3.8 for deadsnakes
https://github.com/deadsnakes/python3.8
I've created a minimal reproduction:
$ git
Anthony Sottile added the comment:
Should this also produce warnings for `list` / `dict` / `set` literals?
```
$ python3.8
Python 3.8.0a3 (default, Mar 27 2019, 03:46:44)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for m
Anthony Sottile added the comment:
It's a rather oldish gcc in this case. (4.8.4 + whatever ubuntu patches).
Here's a full (successful) build log (including the combinations of flags)
after patching:
https://launchpadlibrarian.net/416985438/buildlog_ubuntu-trusty-amd64.python3.5_3.5.7-1
Anthony Sottile added the comment:
Here's an example in the wild which still reproduces with python3.8a3:
https://github.com/SecureAuthCorp/impacket/blob/194b22ed2fc85c4f241375fb7ebe4e0d89626c8c/impacket/examples/remcomsvc.py#L1669
This was reported as a bug on flake8:
https://gitlab.com
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +12556
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36478>
___
_
New submission from Anthony Sottile :
While building python 3.5.7 for https://github.com/deadsnakes
../Modules/_pickle.c: In function 'PyMemoTable_Copy':
../Modules/_pickle.c:677:5: error: 'for' loop initial declarations are only
allowed in C99 mode
for (size_t i = 0; i < s
Anthony Sottile added the comment:
> Modifying this value could have a real impact on the rest of the process, so
> we should be very careful to undo it regardless of test result. (Modifying
> HOME is not a as big a deal since, as you point out, it's not "real" ;) )
Agre
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +12262
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36264>
___
_
New submission from Anthony Sottile :
The current code for `os.path.expanduser` in `ntpath` uses `HOME` in preference
to `USERPROFILE` / `HOMEDRIVE\\HOMEPATH`
I can't find any documentation of `HOME` being relevant on windows (only on
posix). For example, wikipedia only mentions
Anthony Sottile added the comment:
>>> I should have to start that package somehow.
>>
>> `pip install` is a pretty good opt-in already imo
>
> Except that it conflates responsibilities. I may not want to opt into
> coverage even being loaded in my applicatio
Anthony Sottile added the comment:
> What I'm dismissing is that "pip install some-package" can define a global
> startup task for your interpreter. I shouldn't get debugging or code coverage
> enabled every time I run "python" just because I installed some packa
Anthony Sottile added the comment:
I think nearly all of the use cases in the packages are valid (except
module-layout) -- or at least if this feature were removed without having a
startup-time site-packages code execution feature there would be no possible
replacement. I'll elaborate
Anthony Sottile added the comment:
> Doesn’t that kind of prove my point? :)
It's not any worse than gevent ~breaking~ monkeypatching almost the entire
standard library. And to be fair to the author, it was created well before
(2013-06-21) python3.5's `run` api existed (2015-04-14)
I
Anthony Sottile added the comment:
> > There was a single .pth file that I deemed "malicious" since it
completely breaks the `subprocess` module (`subprocess-run`)
>
> It only seems to set an attribute. What's wrong with that? Does the early
import of subprocess cause
Anthony Sottile added the comment:
I did my best to classify those on pypi that were using `.pth` files. My
initial search had quite a few false positives (and now that I look at it,
completely missed `.zip`-based source distributions so there's likely some
false negatives as well)
Here's
Anthony Sottile added the comment:
I don't have time to look through the data today but I wrote a script to
collect the usages of `.pth` from pypi. I realized after I ran it that I
skipped source distributions with `.zip` extension but otherwise it's pretty
complete:
https://github.com
Anthony Sottile added the comment:
> What I think Anthony is looking for are ways to register “start up functions”
> that get executed automatically when the Python interpreter starts up
yes, this is what I want to still exist :)
my hope is that there's a clear standards-track repla
Anthony Sottile added the comment:
> contain features we all want to get rid of
I don't think even this is unanimous. Things like registering codecs,
instrumenting coverage in subprocesses, etc. all seem like legitimate uses of
the arbitrary code execution feat
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +12088
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36130>
___
_
New submission from Anthony Sottile :
Here's the simplest example I could come up with -- hit this while debugging
pytest (which uses attrs which uses similar code to this to make classes)
import pdb; pdb.Pdb(skip=['django.*']).set_trace()
eval(compile("1", "", &q
Change by Anthony Sottile :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35802>
___
___
Pyth
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +11917
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36007>
___
_
New submission from Anthony Sottile :
doctest `:skipif:` was added in https://github.com/sphinx-doc/sphinx/issues/5273
Used here:
https://github.com/python/cpython/blame/36433221f06d649dbd7e13f5fec948be8ffb90af/Doc/library/turtle.rst#L252-L253
Sphinx minimum version configured here:
https
Anthony Sottile added the comment:
I believe this also closes https://bugs.python.org/issue31940 and
https://bugs.python.org/issue28627
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue34
Change by Anthony Sottile :
--
keywords: +patch, patch
pull_requests: +11529, 11530
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
keywords: +patch, patch, patch
pull_requests: +11529, 11530, 11531
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +11529
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35843>
___
_
Anthony Sottile added the comment:
Hmmm, it appears this was changed in python3.7 to have `None` for the origin
instead of `'namespace'` -- however the `submodule_search_locations` is still
not indexable:
>>> importlib.util.find_spec('a')
ModuleSpec(name='a', lo
New submission from Anthony Sottile :
For instance:
# `a` is an empty directory, a PEP 420 namespace package
>>> import importlib.util
>>> importlib.util.find_spec('a')
ModuleSpec(name='a', loader=None, origin='namespace',
submodule_search_locations=_NamespacePath(['/t
Anthony Sottile added the comment:
yep! did my due diligence there, you can check my work on
https://github.com/python/cpython/pull/11643
all platforms have these functions since `posixmodule.c` is always compiled and
the functions in question are not guarded by preprocessor directives
Change by Anthony Sottile :
--
keywords: +patch, patch
pull_requests: +11424, 11425
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
keywords: +patch, patch, patch
pull_requests: +11424, 11425, 11426
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +11424
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35803>
___
_
New submission from Anthony Sottile :
This appears to be true in 3.6+ -- I'd like to add a test and documentation
ensuring that going forward.
Related: https://github.com/python/typeshed/issues/2749
--
assignee: docs@python
components: Documentation, Tests
messages: 334188
nosy
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +11422
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35802>
___
_
Change by Anthony Sottile :
--
keywords: +patch, patch
pull_requests: +11422, 11423
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Anthony Sottile added the comment:
looks true for os.chmod as well:
https://github.com/python/cpython/blob/7a2368063f25746d4008a74aca0dc0b82f86ff7b/Modules/clinic/posixmodule.c.h#L327-L328
--
___
Python tracker
<https://bugs.python.org/issue35
New submission from Anthony Sottile :
Unless I'm reading incorrectly:
https://github.com/python/cpython/blob/7a2368063f25746d4008a74aca0dc0b82f86ff7b/Modules/clinic/posixmodule.c.h#L30-L31
https://github.com/python/cpython/blob/7a2368063f25746d4008a74aca0dc0b82f86ff7b/Modules/clinic
Anthony Sottile added the comment:
> You’d be surprised how tenacious old versions are.
heh that's true, at my last job we finally got rid of python2.6 in 2016 :'(
anyway -- I don't mean to discourage this, definitely seems valuable to the
maintenance of m
Anthony Sottile added the comment:
Can you provide a reproducer? I'm having difficulty reproducing with this
script:
import argparse
p = argparse.ArgumentParser()
p.add_argument('--foo', nargs=None)
args = p.parse_args()
$ python3.7 --version
Python 3.7.2
$ python3.7 t.py --foo
usage
Anthony Sottile added the comment:
Seems also related to https://bugs.python.org/issue24119
with python2 / python3.5 (hopefully) rapidly falling off in usage I would
assume the specialized treatment of `# type: ...` comments would become less
and less necessary
Though I guess there's still
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue35766>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Sottile added the comment:
yes, please do
--
___
Python tracker
<https://bugs.python.org/issue35507>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +11165
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35733>
___
_
Change by Anthony Sottile :
--
keywords: +patch, patch, patch
pull_requests: +11165, 11166, 11167
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
keywords: +patch, patch
pull_requests: +11165, 11166
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Anthony Sottile :
Noticing this in pyflakes
https://github.com/PyCQA/pyflakes/pull/408
--
messages: 333579
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: isinstance(ast.Constant(value=True), ast.Num) should be False
versions: Python 3.8
Anthony Sottile added the comment:
I agree -- probably safer to not backport to 3.7 in case someone is relying on
this behaviour.
--
___
Python tracker
<https://bugs.python.org/issue16
Anthony Sottile added the comment:
If you see the bottom of my issue, I've suggested (nearly) the same thing --
though I require python2.x compatibility so I'm using `contextlib.closing`
--
___
Python tracker
<https://bugs.python.org/issue35
Anthony Sottile added the comment:
Looks like this was merged and can be marked as resolved -- should this be
backported to 3.7?
--
___
Python tracker
<https://bugs.python.org/issue35
Anthony Sottile added the comment:
I also had to update the patch for sphinx.util.status_iterator which was also
introduced in sphinx 1.6
--
___
Python tracker
<https://bugs.python.org/issue35
Anthony Sottile added the comment:
hmmm probably nothing in that case -- didn't realize this also happened in the
cygwin shell.
insanity.
feel free to close! thanks!
--
___
Python tracker
<https://bugs.python.org/issue35
Anthony Sottile added the comment:
ah yes, I should include more version information
IEUser@IE11WIN7 ~
$ python --version
Python 2.7.14
IEUser@IE11WIN7 ~
$ python3 --version --version
Python 3.6.4 (default, Jan 7 2018, 17:45:56)
[GCC 6.4.0]
IEUser@IE11WIN7 ~
$ uname -a
CYGWIN_NT-6.1
New submission from Anthony Sottile :
>>> with open('f.exe', 'w') as f:
... f.write('hi')
...
>>> with open('f') as f:
... print(f.read())
...
hi
`os.path.exists(...)` and others treat them as the same file as well. It seems
the only reliable way to write both f
New submission from Anthony Sottile :
This simple program causes a hang / leaked processes (easiest to run in an
interactive shell):
import multiprocessing
tuple(multiprocessing.Pool(4).imap(print, (1, 2, 3)))
$ python3.6
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Change by Anthony Sottile :
--
keywords: +patch, patch, patch
pull_requests: +10704, 10705, 10706
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
keywords: +patch, patch
pull_requests: +10704, 10705
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
201 - 300 of 403 matches
Mail list logo