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
Change by Brett Cannon :
--
title: Link to instructions to change PowerShell execution policy for venv
activation -> [venv] Link to instructions to change PowerShell execution policy
for venv activation
___
Python tracker
<https://bugs.pyth
Change by Brett Cannon :
--
title: Add a CLI flag to venv to use the pwd basename as the prompt -> [venv]
Add a CLI flag to venv to use the pwd basename as the prompt
___
Python tracker
<https://bugs.python.org/issu
Brett Cannon added the comment:
Any more feedback from anyone on the idea of using the basename of a directory
if specified for `--prompt`?
--
___
Python tracker
<https://bugs.python.org/issue38
Brett Cannon added the comment:
I think "Python learners deserve to know about "site-packages" and (optionally)
"dist-packages" " is a bit strong of a statement. I don't think the tutorial
covers how to install third-party package which is what goes into
Brett Cannon added the comment:
Pablo, is this still a thing to care about?
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue1531
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue1596321>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue1674555>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
nosy: -brett.cannon
___
Python tracker
<https://bugs.python.org/issue2636>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Brett Cannon :
--
resolution: wont fix ->
___
Python tracker
<https://bugs.python.org/issue4347>
___
___
Python-bugs-list mailing list
Unsubscrib
Brett Cannon added the comment:
Pablo, is this still an issue?
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue4347>
___
___
Python-bug
Brett Cannon added the comment:
Can I just say that "ulp" is totally non-obvious what that even means unless
you have a specific math background?
--
nosy: +brett.cannon
___
Python tracker
<https://bugs.python.o
Brett Cannon added the comment:
And sorry if that last response from me came off as grumpy; it wasn't meant to.
I just had no clue what you were adding based on the name.
--
___
Python tracker
<https://bugs.python.org/is
Brett Cannon added the comment:
Can this now be closed, Vinay?
--
___
Python tracker
<https://bugs.python.org/issue38901>
___
___
Python-bugs-list mailin
Brett Cannon added the comment:
So I think this is way too marginal a use-case to expand the API to let loaders
inject themselves into the semantics of it.
I assume going with option 1 but raising an ImportWarning would be too noisy
for your use-case? If not I'm totally fine with
Brett Cannon added the comment:
@valentyn just assume it's good enough unless some asks otherwise. People are
probably too busy right now to be looking at this and so you might be waiting a
while for a more definitive answer.
--
___
P
1501 - 1600 of 5894 matches
Mail list logo