Jason R. Coombs added the comment:
The problem you've encountered is that previously the file was assumed to be
one encoding and would fail if it was not that encoding... so it was possible
to lazy-load the file and process each line.
In the new model, where you need to evaluate
Jason R. Coombs added the comment:
Also, I would argue that this is an enhancement request and not a bug - that
the prior expectation was that the .pth file is encoded in whatever encoding
the system expects by default, and that adding support for a standardized
encoding for .pth files
Jason R. Coombs added the comment:
I'm only aware of one tool that writes .pth files, and that's setuptools, and
it always writes ASCII (assuming package names are ASCII), so any encoding
handling should be fine there.
> We could add a handler for UnicodeDecodeError that falls back on ut
Jason R. Coombs added the comment:
Is it documented anywhere how to do a framework build of Python? When I try to
do a framework build by running `./configure --enable-framework` then `make`,
`./python.exe` emits the following:
dyld: Library not loaded:
/Library/Frameworks/Python.framework
Jason R. Coombs added the comment:
I went naively through the codebase and removed every reference to
PYVENV_LAUNCHER and submitted as PR 9498. Does the CI runner at
https://python.visualstudio.com/cpython/_build/results?buildId=31019=logs
use a framework build such that it's an adequate
Change by Jason R. Coombs :
--
pull_requests: +8905
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue22490>
___
___
Python-bugs-lis
Jason R. Coombs added the comment:
Nice!
Linking to issue25427.
--
___
Python tracker
<https://bugs.python.org/issue17480>
___
___
Python-bugs-list mailin
Jason R. Coombs added the comment:
In [setuptools 1453](https://github.com/pypa/setuptools/issues/1453), this
issue hit the project hard. Tox 3.2 changed the default invocation of pip from
the script-based invocation to the runpy based implementation (python -m pip),
which causes pip
Change by Jason R. Coombs :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
Slawomir, you're probably looking for issue34108.
--
___
Python tracker
<https://bugs.python.org/issue11594>
___
___
Pytho
Change by Jason R. Coombs :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jason R. Coombs added the comment:
New changeset cf21d0031dd84544d4108765553c2b03dfe726c5 by Jason R. Coombs (Miss
Islington (bot)) in branch '3.7':
bpo-34108: Fix double carriage return in 2to3 on Windows (GH-8271) (#8275)
https://github.com/python/cpython/commit
Jason R. Coombs added the comment:
New changeset cafaf0447b950fd4f59edd8cbde040c61ae528f8 by Jason R. Coombs in
branch 'master':
bpo-34108: Fix double carriage return in 2to3 on Windows (#8271)
https://github.com/python/cpython/commit/cafaf0447b950fd4f59edd8cbde040c61ae528f8
Jason R. Coombs added the comment:
The regression never got to 3.6, so this issue likely only affects 3.7+.
--
versions: -Python 3.6
___
Python tracker
<https://bugs.python.org/issue34
Change by Jason R. Coombs :
--
keywords: +patch
pull_requests: +7806
stage: commit review -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Jason R. Coombs :
In issue11594, we attempted to solve the newlines issue but inadvertently
introduced extraneous CR before CRLF newlines when running on Windows. See
https://github.com/python/cpython/pull/6483#issuecomment-401957049 for more
details.
--
assignee
Jason R. Coombs <jar...@jaraco.com> added the comment:
>From what I can tell, there's not currently any tests for the behavior of
>`http.server` as a script, and that sounds like a non-trivial behavior to
>test. I agree documentation updates for this change are essential, bu
Change by Jason R. Coombs <jar...@jaraco.com>:
--
nosy: +jason.coombs
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue24209>
___
_
Jason R. Coombs <jar...@jaraco.com> added the comment:
For those installing Python 2.7, I share here for others the [Powershell
module](https://www.dropbox.com/s/62m9easad0iakat/python.ps1?dl=0) I include in
my profile. With this module loaded, `get-python-ver 2.7.14` installs Python
Jason R. Coombs <jar...@jaraco.com> added the comment:
I believe I encountered this issue today on Python 2.7.14
(https://ci.appveyor.com/project/jaraco/jaraco-windows/build/31/job/lenh5l4dcmj137b9).
In this case, I have an iterable (in itertools.imap) that raises a TypeError
when eva
Jason R. Coombs <jar...@jaraco.com> added the comment:
I do still see the issue on Python 3.7b3:
$ python ~/Dropbox/bin/scripts/which-line-ending onefile.py
Line ending is '\n'
$ python ~/Dropbox/bin/scripts/which-line-ending otherfile.py
Line ending is '\r\n'
$ python -V
Python 3
Jason R. Coombs <jar...@jaraco.com> added the comment:
Kirill, see https://bugs.python.org/issue1692335#msg310951 in the related issue
for one possible way to work around the issue on Python 3.
--
___
Python tracker <rep...@bugs.python.or
New submission from Jason R. Coombs <jar...@jaraco.com>:
I propose the following expansion of the interface of contextlib.suppress.
Currently, when entering the context, suppress returns None. Instead, it could
return an object that provides some detail about the exception.
Inspi
Change by Jason R. Coombs <jar...@jaraco.com>:
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<https://bugs.
Jason R. Coombs <jar...@jaraco.com> added the comment:
New changeset 5a0c3987abd6a71b4fadeb525477eb5f560e8514 by Jason R. Coombs (Miss
Islington (bot)) in branch '3.7':
bpo-32991: Restore expectation that inspect.getfile raises TypeError on
namespace package (GH-5980) (GH-5997)
Jason R. Coombs <jar...@jaraco.com> added the comment:
New changeset b9650a04a81355c8a7dcd0464c28febfb4bfc0a9 by Jason R. Coombs in
branch 'master':
bpo-32991: Restore expectation that inspect.getfile raises TypeError on
namespace package (GH-5980)
https://github.com/python/cpython/
Change by Jason R. Coombs <jar...@jaraco.com>:
--
keywords: +patch
pull_requests: +5746
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Jason R. Coombs <jar...@jaraco.com> added the comment:
And [this patch](https://gist.github.com/7184fa32670f2c6377ddeb710676)
corrects the failure such that the test passes. It does so by restoring the
expectation that inspect.getfile will once again raise a TypeError for these
nam
Jason R. Coombs <jar...@jaraco.com> added the comment:
Okay. I've wired up some unittests in test_doctest, and with [this
patch](https://gist.github.com/jaraco/ea992719ac931fa761a6e9ef7a354542), it now
captures the failed expectation of this
Jason R. Coombs <jar...@jaraco.com> added the comment:
I tried creating a test, but I'm struggling. I added [this
patch](https://gist.github.com/e795a9a34594d202711aedf22c484af9), and tried to
run it, but it's not being run.
```
$ ./python.exe Tools/scripts/run_tests.py 'test_doctest'
Jason R. Coombs <jar...@jaraco.com> added the comment:
The main questions I have before proceeding with creating tests relate to what
interfaces Python wishes to support. Here's the decision tree I have in my head.
- Retain the change of adding a __file__ attribute to namespace pa
New submission from Jason R. Coombs <jar...@jaraco.com>:
In Python 3.6, one could find doctests on a namespace package:
```
$ mkdir foo
$ python3.6
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "
Jason R. Coombs <jar...@jaraco.com> added the comment:
I thought I saw the PR to the 3.6 branch. If that's not the case - a backport
to 3.7 would be much appreciated.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Jason R. Coombs <jar...@jaraco.com> added the comment:
@jtrouverie: Yes, please do. Thanks!
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Jason R. Coombs <jar...@jaraco.com> added the comment:
In [this question](https://stackoverflow.com/a/48710609/70170), I encounter
another case where a decorator would be useful. Without the decorator:
def is_docker():
path = '/proc/self/cgroup'
Jason R. Coombs <jar...@jaraco.com> added the comment:
In the backport, I found that `mod_spec.parent` seemed to be the right thing
(in at least a few cases). Might that be preferable to
`module_name.rpartition('.')[0]`?
--
___
Python tracke
Jason R. Coombs <jar...@jaraco.com> added the comment:
@slallum, That does seem to be a problem, though I do observe that the issue
reported by bdb with CalledProcessError is no longer an issue:
>>> import subprocess, pickle
>>> try:
... subprocess.check_call
Jason R. Coombs <jar...@jaraco.com> added the comment:
Adopting the backport, I believe I've found a defect. I filed the defect with
the backport as [backports.pdb
1](https://github.com/jaraco/backports.pdb/issues/1).
Essentially, the issue is that `__package__` gets set to the modul
Jason R. Coombs <jar...@jaraco.com> added the comment:
Thanks for creating this functionality. I'm so excited to use it that I've
published a backport [https://pypi.org/project/backports.pdb], which seems to
work for at least the basic use cases on Pyth
Change by Jason R. Coombs <jar...@jaraco.com>:
--
nosy: +jason.coombs
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32206>
___
_
New submission from Jason R. Coombs <jar...@jaraco.com>:
In the docs for the venv command, it states:
> Changed in version 3.4: In earlier versions, if the target directory already
> existed, an error was raised, unless the --clear or --upgrade option was
> provided. Now,
New submission from Jason R. Coombs <jar...@jaraco.com>:
In the API docs for EnvBuilder.symlinks, it states "Defaults to True on Linux
and Unix systems, but False on Windows." But in fact, the implementation takes
the value passed, which always defaults to False. It's only on
Jason R. Coombs <jar...@jaraco.com> added the comment:
Thank you Steven for creating a reproduction of the issue; I should have done
that in the first place. I have the +ELLIPSIS enabled elsewhere in the test
suite, which is why it didn't appear in my example.
I should clarify -
Jason R. Coombs <jar...@jaraco.com> added the comment:
I did find [this ugly
workaround](https://github.com/jaraco/jaraco.financial/commit/9b866ab7117d1cfc26d7cdcec10c63a608662b46):
>>> print('x' + res)
x...
--
___
New submission from Jason R. Coombs <jar...@jaraco.com>:
I'm trying to write a doctest that prints the hash and filename of a directory.
The input is the test dir, but due to the unordered nature of file systems, the
doctest checks for one known file:
def hash_file
Jason R. Coombs <jar...@jaraco.com> added the comment:
This issue affected me today. I'm editing a codebase that has mixed line
endings in different files. I'd like to patch for Python 3 support without
changing line endings. Even invoking a single fixer (print), the line endings
Jason R. Coombs <jar...@jaraco.com> added the comment:
Fair enough.
For an example, here's the case where I wanted to use the decorator to avoid
excess indentation and keep the most meaningful part of the function at the
base of the body:
@suppress(KeyError)
def v12_to_13(manager
New submission from Jason R. Coombs <jar...@jaraco.com>:
The contextlib docs explain why a decorator is nice:
> It makes it clear that the cm applies to the whole function, rather than just
> a piece of it (and saving an indentation level is nice, too).
However, the built-in cont
Change by Jason R. Coombs <jar...@jaraco.com>:
--
components: +Library (Lib)
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Change by Jason R. Coombs <jar...@jaraco.com>:
--
type: -> enhancement
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31874>
___
_
Jason R. Coombs <jar...@jaraco.com> added the comment:
At first, I didn't understand why one wouldn't simply omit sys.path[0], similar
to what scripts do, but then I realized that Nick was aware of a common
use-case that I was overlooking - that `python -m` may be used to launch
be
Jason R. Coombs <jar...@jaraco.com> added the comment:
I've filed a separate request here for the sys.path[0] aspect:
https://bugs.python.org/issue31874
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
New submission from Jason R. Coombs <jar...@jaraco.com>:
In [this comment](https://bugs.python.org/issue16737#msg282872) I describe an
issue whereby launching an application via runpy.run_module (aka python -m)
produces different and unexpected behavior than running the same app via an
Jason R. Coombs <jar...@jaraco.com> added the comment:
The other major difference and the only one that's affected me is the presence
of sys.path[0] == ''.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Jason R. Coombs <jar...@jaraco.com> added the comment:
> All of the differences in semantics make total sense when you realize `-m
> pkg` is really conceptually shorthand for `import pkg.__main__` (w/ the
> appropriate __name__ flourishes).
> So instead of selling `-m` as a w
New submission from Jason R. Coombs:
Similar to #16180 and possible a duplicate of #14743, if the script being run
under pdb becomes invalid such as through a chdir operation, pdb will get
trapped in a loop, catching its own exception.
$ mkdir foo
$ cat > foo/script.py
import os
os.chdir('
Jason R. Coombs added the comment:
Given that it's a change in behavior and not a bugfix, I don't see how this
change could go into anything but the next release.
--
versions: -Python 2.7, Python 3.5, Python 3.6
___
Python tracker <
Jason R. Coombs added the comment:
Ack. The interpolation behavior was also present in Python 2.7. I missed that
when I found this ticket and assumed it was similar to issue 20120. In this
ticket, the user is requesting that distutils actually change the behavior from
performing interpolation
Jason R. Coombs added the comment:
While investigating https://github.com/pypa/setuptools/issues/1062, I
discovered that the implementation in the attached patch is insufficient. The
'parse_config_files' calls ConfigParser.__init__ in two places, before the for
loop and at the end of each
New submission from Jason R. Coombs:
Consider this script, which runs successfully on Python 3:
import cgitb
import sys
def fiter():
assert False
yield 1, 1
yield 2, 2
yield 3, 3
try:
x = set(id_ for id_, _ in fiter())
except:
print cgitb.html(sys.exc_info())
Run
Jason R. Coombs added the comment:
One consequence of this change is that now any string that has a backslash
needs to be escaped or raw, leading to changes like this on
(https://github.com/cherrypy/cherrypy/pull/1610/commits/1d8c03ea8c5fe90f29bbea267300b97c78391c24#diff
Jason R. Coombs added the comment:
As a workaround, I wrapped BytesIO thus and it works for our needs.
class LenientIO(io.BytesIO):
"""
A version of BytesIO that can accept unicode or
bytes. See http://bugs.python.org/issue29809
""&q
Changes by Jason R. Coombs <jar...@jaraco.com>:
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Jason R. Coombs added the comment:
> How you got a Unicode source line in SyntaxError?
Good question. Took me a while to replicate the exact conditions, but here's an
example:
#coding: utf-8
from __future__ import unicode_literals
import tokenize
import io
code = """
Jason R. Coombs added the comment:
A complimentary error will occur on Python 3 if a bytes member exists in the
SyntaxError, though I suspect that would be an invalid usage.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
New submission from Jason R. Coombs:
I'm writing a routine that captures exceptions and logs them to a database. In
doing so, I encountered a situation that when parsing a Unicode file that has
an IndentationError (SyntaxError), print_exc will fail when it tries to render
the unicode line
Jason R. Coombs added the comment:
Aah, yes. I see now. Ensure_pip uses _PROJECTS for three purposes: for defining
additional_projects, extracting those packages to the tmpdir, and for declaring
the installation of those projects. Only that last declaration is unnecessary.
This patch looks
Jason R. Coombs added the comment:
For convenience, here's a link to the rendered changelog in the docs, which
provides hyperlinks to the relevant issues [0].
[0] https://setuptools.readthedocs.io/en/latest/history.html#v34-0-0
--
___
Python
Jason R. Coombs added the comment:
This approach, bundling the necessary dependencies to install setuptools, seems
like exactly the right thing to do, assuming that ensurepip should install
setuptools at all, and I don't want to challenge that assumption here.
Looking at the patch
Jason R. Coombs added the comment:
That also looks good.
$ head -n1 ~/.envs/issue22490/bin/cherryd
#!/Users/jaraco/.envs/issue22490/bin/python
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jason R. Coombs added the comment:
On Python 3.6, I made the edit. I actually used the one-liner `
os.environ.pop('__PYVENV_LAUNCHER__', None)`. I then created a venv and
installed a package and successfully ran a module in that package:
$ python -m venv ~/.envs/issue22490-test
$ ~/.envs
Jason R. Coombs added the comment:
In https://github.com/pypa/setuptools/issues/706, I've addressed this
additional concern.
--
resolution: -> wont fix
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://
Jason R. Coombs added the comment:
I'm afraid I need to re-open this issue.
Although passing unicode names to rmtree fixes the issue on Windows systems, it
causes problems on Linux systems where LC_ALL=C. Consider this script:
#
# encoding: utf-8
from
Jason R. Coombs added the comment:
Throughout the week, I've not experienced this issue again. Perhaps the
reinstall of Dropbox corrected some transient condition. Or perhaps my system
was in some environment where it was particularly sensitive on Monday but has
since returned to the status
Jason R. Coombs added the comment:
I've created a backport implementation in
https://github.com/pypa/setuptools/issues/889.
All that remains then is to have a test for Python, which can probably borrow
from the fix for issue20120. I'll leave it to others to draft the patch for the
test
Jason R. Coombs added the comment:
I paused the Dropbox sync and ran the `rm -R .tox; tox` routine many times
without incident, which strongly implicates Dropbox. I'm going to now re-enable
Dropbox sync and see if I can trigger the behavior.
Now even with Dropbox updated back to the latest
Jason R. Coombs added the comment:
I reviewed the docs for configparser, and I agree - using
ConfigParser(interpolation=None) is preferable to the "legacy" RawConfigParser.
--
___
Python tracker <rep...@bugs.python.org>
<htt
Changes by Jason R. Coombs <jar...@jaraco.com>:
--
nosy: -ned.deily
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28949>
___
_
Jason R. Coombs added the comment:
> virtualenvs and not venvs?
Correct.
> In any case, at this point it seems pretty clear that we're not dealing with
> a problem with Python 3.6.0 nor with the python.org installer, no?
Also correct.
If you don't mind, I'd like to continue to
Changes by Jason R. Coombs <jar...@jaraco.com>:
--
versions: -Python 3.6
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28949>
___
Jason R. Coombs added the comment:
This morning, I noticed my Mercurial install isn't working either - failing
with this error message:
$ hg pull
abort: couldn't find mercurial libraries in
[/usr/local/Cellar/mercurial/4.0.1/lib/python2.7/site-packages
/usr/local/Cellar/mercurial/4.0.1/bin
Jason R. Coombs added the comment:
I'm getting good at reinstalling Python, though. Now I'm invoking it with this
single command-line:
sudo installer -verboseR -pkg ~/Downloads/python-3.6.0rc1-macosx10.6.pkg
-target /
--
___
Python tracker <
Jason R. Coombs added the comment:
Downgrading Dropbox did not help. This morning I woke up to `importlib.abc`
missing.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jason R. Coombs added the comment:
I forget if there was a reason for choosing RawConfigParser over ConfigParaer
with interpolation=None. I'd like to know that before choosing the latter. I'd
also like to see if appropriate the implementation patched in Setuptools,
providing compatibility
Jason R. Coombs added the comment:
I've reinstalled Dropbox, downgrading to 15.4.22. I'll see if that helps.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jason R. Coombs added the comment:
I don't think hard links are involved. I see symlinks in the .tox/python
virutalenv, and virtualenv defaults to creating symlinks
(https://github.com/pypa/virtualenv/blob/master/virtualenv.py#L565-L570) and
falls back to copying files rather than hard
Jason R. Coombs added the comment:
I've just encountered what appears to be a different manifestation of the same
issue. I unlinked the .tox directory and that rendered importlib broken.
$ pwd
/Users/jaraco/yg/queso
$ rm -R .tox
$ python
Python 3.6.0rc1 (v3.6.0rc1:29a273eee9a5, Dec 6 2016, 16
Jason R. Coombs added the comment:
Before disabling SIP, I found I could use fs_usage to get some visibility into
fs changes:
sudo fs_usage -w -f filesys | grep aliases.py
To test my understanding of fs_usage, I deleted aliases.py (also confirming
that triggers the error). When I did so, I
Jason R. Coombs added the comment:
Looks like I can [disable
SIP](http://internals.exposed/blog/dtrace-vs-sip.html) and dtrace will be
viable.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jason R. Coombs added the comment:
I thought I was on to something when I found this technique for using dtrace to
detect a file deletion:
https://blogs.oracle.com/zoneszone/entry/who_keeps_removing_that_file
However, I don't seem to have privilege to run it.
$ cat trap-aliases-delete
Jason R. Coombs added the comment:
I am using the python.org rc1 installer, confirmed to match the public md5 sum:
$ md5 ~/Downloads/python-3.6.0rc1-macosx10.6.pkg
MD5 (/Users/jaraco/Downloads/python-3.6.0rc1-macosx10.6.pkg) =
404c390ae27f067aaab34f168cf913eb
I downloaded ClamXav and had
Jason R. Coombs added the comment:
Hmm. Looks like I may [have a trojan](http://stackoverflow.com/a/4707258).
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jason R. Coombs added the comment:
Indeed it seems that aliases.py is missing.
$ ls
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/a*
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py
Jason R. Coombs added the comment:
Spontaneously, this issue has arisen again. Without a system restart or any
system-level configuration changes, launching the interpreter is once again
causing crashes. In addition to the crash log I pasted earlier, I see this in
the console when launching
Jason R. Coombs added the comment:
A simple re-install corrected the issue and survived a restart. I suspect one
or more components weren't properly upgraded or were corrupted for unrelated
reasons. I suspect that it was an environmental issue and not an issue with the
package itself
New submission from Jason R. Coombs:
I recently upgraded Python 3.6.0rc1 over 3.6.0b4. Python would invoke just fine
after the update, but following a system restart, I'm experiencing crashes on
any invocation of Python. I suspect it's just a bad/corrupted install. I will
do more
Jason R. Coombs added the comment:
Looking more closely now and as a result of the report in issue28935, I see
that this issue is another separate manifestation of the issue addressed in
issue20120.
--
resolution: out of date ->
status: closed -> open
title: distutils shou
Jason R. Coombs added the comment:
This looks to be another manifestation of issue20120 and is a duplicate of
issue20754.
--
resolution: -> duplicate
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://
Jason R. Coombs added the comment:
I've found some other inconsistencies with the use of python -m. One is the
surprising behavior when running pip:
$ touch logging.py
$ pip --help > /dev/null
$ python -m pip --help > /dev/null
Traceback (most recent call last):
File
"/Library
Jason R. Coombs added the comment:
Thanks all! So pleased to see this fixed.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
801 - 900 of 1492 matches
Mail list logo