Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue45902>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
> "Ultimately, the loader set the values of __file__ and/or __cached__"
Change it to "sets" and +1 from me!
--
___
Python tracker
<https://
Change by Brett Cannon :
--
assignee: -> brett.cannon
___
Python tracker
<https://bugs.python.org/issue21762>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Brett Cannon :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Brett Cannon added the comment:
I would like to bring this issue back on topic as this about how to expose PEP
523 support in Python 3.8, not whether Fabio should be using a different
approach when he has been something sanctioned in an accepted PEP and was
previously doable that was
Brett Cannon added the comment:
Adding Lisa to potentially add the PR from Ilya.
--
assignee: -> lisroach
___
Python tracker
<https://bugs.python.org/issu
New submission from Brett Cannon :
Now that typing.Protocol exists we should convert the ABCs in importlib over to
protocols as the import system functions off of structural typing and not
nominal typing.
--
components: Library (Lib)
messages: 356501
nosy: brett.cannon
priority: low
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue38793>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Just an FYI a raised exception isn't considered a crash. For us a crash is a
C-level crash like a segfault.
--
nosy: +brett.cannon
type: crash -> behavior
___
Python tracker
<https://bugs.python.org
Brett Cannon added the comment:
3.6 and 3.5 are in security mode, so unless there's a security risk due to this
bug the fix will not be backported to those older versions
(https://devguide.python.org/#status-of-python-branches).
--
___
P
Brett Cannon added the comment:
I think bpo-38500 needs to get resolved first before this as that will affect
whether this is acceptable or not as an API-breaking change.
--
___
Python tracker
<https://bugs.python.org/issue38
Brett Cannon added the comment:
I've assigned this to Joannah to decide if she wants to backport this.
--
assignee: -> nanjekyejoannah
nosy: +nanjekyejoannah
___
Python tracker
<https://bugs.python.org
Brett Cannon added the comment:
I think the real question is whether this is part of the CPython public API or
the CPython internal API.
@Fabio how burdensome would it be if we placed this in the internal API that
you can get access to but we don't make backwards-compatibility guara
Change by Brett Cannon :
--
title: Some unused functions in test suite -> Fix some unused functions in test
suite
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
New changeset 892221bfa04a41cf581f988ba19dc263f557e157 by Brett Cannon (Adam
Johnson) in branch 'master':
bpo-38839: Fix some unused functions in tests (GH-17189)
https://github.com/python/cpython/commit/892221bfa04a41cf581f988ba19dc2
Change by Brett Cannon :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue38839>
___
Brett Cannon added the comment:
OK, then my vote is to provide getter and setter methods that are
underscore-prefixed to mark them as "internal" with clear comments specifying
that they are part of PEP 523 and thus should not be needlessly broken in a
bugf
Brett Cannon added the comment:
It's also possible the leading underscore was used to prevent name collisions.
Unfortunately I don't know the history of _attributes, so without someone
digging through the git history or personally knowing the reason behind it I
don't know wh
Brett Cannon added the comment:
I'm not in a good position to review distutils stuff.
--
___
Python tracker
<https://bugs.python.org/issue38021>
___
___
Brett Cannon added the comment:
I can't reproduce in Python 3.8.0:
>>> import os
>>> class A(os.PathLike): pass
...
>>> class B:
... def __fspath__(self): pass
...
>>> issubclass(B, A)
True
Did you check against an older version of Python?
-
New submission from Brett Cannon :
Since os.PathLike explicitly defines a a protocol, it would make sense to have
it inherit from typing.Protocol instead of abc.ABC.
--
components: Library (Lib)
messages: 357206
nosy: brett.cannon
priority: normal
severity: normal
status: open
title
Brett Cannon added the comment:
Closing as importing 'typing' in 'os' is probably too much and would impact
start-up time.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python trac
Brett Cannon added the comment:
@Mark
> PEP 523 makes no mention of adding a getter or setter.
> Adding them is a big change to Python semantics and shouldn't, IMO, be done
> without a PEP that explicit states they are going to be added.
Adding getters or setters for some
Brett Cannon added the comment:
Posted
https://mail.python.org/archives/list/python-...@python.org/thread/4UZJYAZL3NHRAGN5WAMJC4IHAHEXF3QF/
to see if anyone else wants to weigh in.
--
___
Python tracker
<https://bugs.python.org/issue38
Change by Brett Cannon :
--
nosy: +brett.cannon, eric.snow, ncoghlan
___
Python tracker
<https://bugs.python.org/issue38884>
___
___
Python-bugs-list mailin
Brett Cannon added the comment:
Ah, your `assert` call threw me since it does succeed so it isn't acting as a
test case.
--
resolution: not a bug ->
status: closed -> open
___
Python tracker
<https://bugs.python.
Brett Cannon added the comment:
Can you test this with a package that isn't tensorflow (e.g. something else in
the stdlib or something created manually; basically a smaller reproducer)? It's
hard to diagnose if this is really Python or not without a smaller reproducer
as tensorflo
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue38870>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue38883>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
@greg I hope this goes into 3.8.1 since it was a breaking change.
@victor if we are going to ask folks to start using a setter and getter I say
we might as well get it right the first time and start taking the tstate now
Brett Cannon added the comment:
I just realized one problem with this is it explicitly requires subclassing the
ABC while os.PathLike is supposed to represent a protocol (before
typing.Protocol was a thing).
So why is it bad that in the example class B is considered a "subclas
New submission from Brett Cannon :
https://fishshell.com/docs/current/commands.html#source
--
assignee: brett.cannon
components: Documentation
messages: 357346
nosy: brett.cannon
priority: low
severity: normal
status: open
title: Document that virtual environment activation for fish
Change by Brett Cannon :
--
keywords: +patch
pull_requests: +16844
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17359
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
Is this best served in the stdlib or in an external tool like how
virtualenvwrapper is separate from virtualenv? While I get the convenience of
not having to install another tool to do this, it does bring in some complexity
that does not directly tie into the
Change by Brett Cannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Brett Cannon :
I did a Twitter poll to see if there was consistent naming of the directory
people created a virtual environment into when done locally to code (the answer
is no). But a common theme was people not liking that the prompt defaults to
the name of the
Brett Cannon added the comment:
@Vinay you got exactly what I mean. I had to actually teach a ton of people
that shell trick with basename and pwd on Twitter, that trick doesn't seem to
be something people know about, and yet a ton of people seem to be creating
virtual environments
Brett Cannon added the comment:
New changeset f8a6316778faff3991144c3aec4fa92d7b30a72b by Brett Cannon (Sanchit
Khurana) in branch 'master':
bpo-21063: Improve module synopsis for distutils (GH-17363)
https://github.com/python/cpython/commit/f8a6316778faff3991144c3aec4fa9
Change by Brett Cannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Brett Cannon added the comment:
If it was documented as deprecated and raising a deprecation warning then 3.2
is definitely far enough back to warrant removing it.
--
___
Python tracker
<https://bugs.python.org/issue38
Brett Cannon added the comment:
Although I will admit we have not had a discussion on python-dev about removing
stuff that was left for Python 2.7 compatibility, so that discussion should
probably occur first before we go ripping stuff out
Brett Cannon added the comment:
New changeset 2f2489310d89f589a091aa09ac1eb973d9a383d8 by Brett Cannon (Miss
Islington (bot)) in branch '3.7':
bpo-21063: Improve module synopsis for distutils (GH-17363) (#17381)
https://github.com/python/cpyt
Brett Cannon added the comment:
Do note that Path inherits from PurePath, so providing a normalize() method on
the latter means it will end up on the former.
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue38
Change by Brett Cannon :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue38927>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue38928>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue38931>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
versions: +Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue35003>
___
___
Python-bugs-list mailing list
Unsub
Change by Brett Cannon :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue35003>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
> there's no harm to keeping it (it's not broken)
... for now. :) There's always the risk that will change if we keep the code
around.
> The other deprecation in the array module says, "Deprecated since version
> 3.3, w
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue38021>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue38649>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue32856>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue38593>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue38569>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue34309>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
As per Paul's suggestion, closing as "won't fix" as this only pertains to
Python 2.7 and it will not be changing.
--
resolution: -> wont fix
stage: needs patch -> resolved
status: open -> closed
_
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue11664>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue16079>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue38079>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
> How about note it in the documentation and logging rather than removing them?
Yep, docs and raising DeprecationWarning should be good.
--
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
I've personally never come across Scripts in any other situation than virtual
environments, but that isn't saying much about my Windows exposure either. :)
Basically activation is the biggest stumbling block I find with new users when
it comes to
Brett Cannon added the comment:
If you're using Python 2.7 then that would explain what you're seeing. You can
either upgrade to Python 3 or use `from __future__ import division` to get the
result you're after.
--
nosy: +brett.cannon
resolution: -> not a bug
s
Brett Cannon added the comment:
First off, thanks for the suggestion!
But there are two things to say about this. One, that isn't actually casting as
Python doesn't have the concept of casting like in statically typed languages
since everything is dynamically typed.
Two, the solu
Brett Cannon added the comment:
> Surely "on native Windows you run venv-path\Scripts\activate[.ps1], on POSIX
> you use source venv-path/bin/activate" isn't *that* hard for new users to
> grok, and would cover the vast majority of users?
Sure, but how many times d
Brett Cannon added the comment:
> From my experience in the past the intention has been to keep the API minimal
Correct, all of os.path and shutils does not need to end up in pathlib. :)
Hence why the request to add things is always tough as we have to try and
strike a balance of useful
Brett Cannon added the comment:
> If venv is run in a child process of the shell, how does it set those
> variables in the parent shell?
You can't. Tools like `pipenv shell` and `conda shell` end up with a new shell
running instead of changing the current she
Brett Cannon added the comment:
I'm going with Serhiy's recommendation and closing this. Sorry, IonuČ›.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs
Brett Cannon added the comment:
> Are you proposing to bring that functionality, which these third-party tools
> perform currently, into the stdlib?
I was hoping to, but it turns out you can't make this work under Windows
without inspecting the parent process (PowerShell and Com
Brett Cannon added the comment:
While I understand you're disappointed, do realize that the tone of your
response isn't necessary. I'm going to assume you didn't mean for it to come
off as confrontational and still provide a reply.
> you do realise there are no
New submission from Brett Cannon :
It would probably be good to add a note in the venv docs about execution
policies, why it needs to change for environment activation, and how to do it
-- especially now that we sign Activate.ps1 -- so there's less of a chance of
people being caugh
Change by Brett Cannon :
--
title: using filedialog.askopenfilename() freezes python 3.8 -> using
tkinter.filedialog.askopenfilename() freezes python 3.8
___
Python tracker
<https://bugs.python.org/issu
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue38878>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
And where this has come up as an issue:
https://github.com/microsoft/vscode-python/issues/2559.
--
___
Python tracker
<https://bugs.python.org/issue38
Change by Brett Cannon :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue38544>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
If it were `.` would we then always check if the prompt was a folder and then
use the folder's name in that case? Or would it only apply to `.`?
As for `__curdir__`, it could work, but I don't know how easy would that be to
remember or explain to
Brett Cannon added the comment:
Thanks for the report, Brittany, but I'm closing as "won't fix" as the only way
to make this happen is to import genericpath directly which one shouldn't do
(it's undocumented on purpose); always get a hold of this module vi
Brett Cannon added the comment:
> Any reason to keep imp there?
Nope, not anymore.
--
___
Python tracker
<https://bugs.python.org/issue25160>
___
___
Python-
Brett Cannon added the comment:
@Gery please do open a documentation PR! :)
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.org/issue39
Brett Cannon added the comment:
New changeset 8289e27393395ee903bd096d42e07c112d7f15c6 by Brett Cannon (Xtreak)
in branch 'master':
bpo-36406: Handle namespace packages in doctest (GH-12520)
https://github.com/python/cpython/commit/8289e27393395ee903bd096d42e07c112d7f15c6
-
Brett Cannon added the comment:
New changeset d3212036aa2510b9e133ba4bfaf1262d6bcbe7f0 by Brett Cannon (Miss
Islington (bot)) in branch '3.7':
bpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17592)
https://github.com/python/cpyt
Brett Cannon added the comment:
New changeset aa74a53ad61134911ac7904f24fd2630aeaa8ac8 by Brett Cannon (Miss
Islington (bot)) in branch '3.8':
bpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17591)
https://github.com/python/cpyt
Brett Cannon added the comment:
Karthikeyan is right and this is working as expected. If you want the semantics
you're after you can either implement __fspath__ as was suggested or get the
'value' attribute of the enum when constructing your path.
--
nosy: +brett.ca
New submission from Brett Cannon :
The question on how best to get an absolute path from a pathlib.Path object
keeps coming up (see https://bugs.python.org/issue29688,
https://discuss.python.org/t/add-absolute-name-to-pathlib-path/2882/, and
https://discuss.python.org/t/pathlib-absolute-vs
Brett Cannon added the comment:
I have opened https://bugs.python.org/issue39090 to track updating the pathlib
docs to have a section on getting the absolute path in various ways along with
what the trade-offs are for each approach.
--
___
Python
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue900092>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue1116520>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue1298835>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
Due note, though, that there's a difference in the implementation of strftime
versus strptime, as the former (at least the last time I looked ages ago) uses
the libc version of the function and thus probably doesn't try to smooth out
differences
Brett Cannon added the comment:
This is because your class implicitly inherits from object and object.__eq__()
is implemented and does not return NotImplemented.
--
nosy: +brett.cannon
resolution: -> not a bug
stage: -> resolved
status: open -&g
Brett Cannon added the comment:
And to be more specific, == is guaranteed to work by falling back to
object.__eq__() which falls back to object identity if the object doesn't have
a custom __eq__() method.
--
___
Python tracker
&
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue39111>
___
___
Python-bugs-list mailing list
Unsubscribe:
Brett Cannon added the comment:
So if you were to insert '.' via PYTHONPATH it would be made absolute as the
site module makes all entries in sys.path absolute during startup.
And changing this to have to check every time import runs if an entry in
sys.path is absolute would
Brett Cannon added the comment:
RE: "This could be done when inserting something into `sys.path` maybe then
only?" That would require a custom object instead of a standard list for
sys.path which could detect insertion and then do the automatic absolute path
resolution which as y
Brett Cannon added the comment:
Yep, it looks like this is fixed, Batuhan. Thanks for letting us know!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Brett Cannon added the comment:
When have you seen this work previously? On my Windows 10 machine there is no
Scripts\libs directory for Python 3.7, let alone a python37.lib file in any
directory that I can find.
--
nosy: +brett.cannon, vinay.sajip
Brett Cannon added the comment:
I agree with Eric that this is the realm of linters as there are legitimate
reasons sometimes to mask and redefine built-ins.
Thanks for the idea, Reuven, but I'm closing the issue.
--
nosy: +brett.cannon
resolution: -> rejected
stage: -&g
Brett Cannon added the comment:
I think a bigger thing is to simply get type annotations to be used in the
stdlib first, then we can worry about documenting them as part of the API. :)
--
nosy: +brett.cannon
___
Python tracker
<ht
Brett Cannon added the comment:
I agree with Inada-san that pointing out how to get the file path on a module
is a better solution then explaining directory layouts which are borderline
implementation details.
--
___
Python tracker
<ht
New submission from Brett Cannon :
In a discussion on Twitter, the idea of having venv lay down a .gitignore file
in a newly created virtual environment that consisted of nothing but `*` came
up (https://twitter.com/codewithanthony/status/1213680829530099713). The
purpose would be to help
Change by Brett Cannon :
--
title: Adding a .gitignore file to virtual environments -> [venv] Adding a
.gitignore file to virtual environments
___
Python tracker
<https://bugs.python.org/issu
1501 - 1600 of 5934 matches
Mail list logo