New submission from Chris Rebert :
The Glossary should include an entry for "annotation" and/or "function
annotation" regarding the language feature introduced by PEP 3107.
--
assignee: docs@python
components: Documentation
messages: 154852
nosy: cvrebert, docs@pyt
Chris Rebert added the comment:
The Design and History FAQ (will) need a minor corresponding update:
http://docs.python.org/dev/faq/design.html#how-are-dictionaries-implemented
--
___
Python tracker
<http://bugs.python.org/issue13
Chris Rebert added the comment:
My suggestion was a seealso to parallel those in the "The with Statement" and
"Class definitions" sections of the same page.
--
___
Python tracker
<http://bug
Chris Rebert added the comment:
Well, I thought the Glossary was a somewhat useful document in and of itself
("What's conceptual term 'X' mean? Hmm... I'll check the Glossary!") and so
should include all terms which aren't module-specific.
But I won'
Chris Rebert added the comment:
Also, it would be a nice place to point out for those coming from Java or
similar that the Java-esque concept of annotations has little to do with
Python's function annotations, and that in Python their uses are typically
served using decorators in
Chris Rebert added the comment:
Strawman entry wording:
An annotation is an arbitrary metadata value associated with a function
parameter or return value. The syntax for function annotations is explained in
[Function
definitions][http://docs.python.org/dev/reference/compound_stmts.html
New submission from Chris Rebert :
The entry for "dictionary" reads in part:
[...] The keys can be any object with __hash__() function and __eq__()
methods. [...]
__hash__() is a method, not a function (well, it's a "hash function" in the
computer science sense,
Chris Rebert added the comment:
I regret to inform you that those changes made the sentence in question
ungrammatical. Removing the word "method" will make it grammatical again (as
originally suggested).
--
resolution: fixed ->
status: c
New submission from Chris Rebert :
The randomization introduced by the fix for issue 13703 means that the example
string hash values given in
http://docs.python.org/dev/faq/design.html#how-are-dictionaries-implemented are
liable to become more difficult to reproduce (in fact, the example
Chris Rebert added the comment:
Links to the "rambling Unicode thread"s for posterity and convenience:
Gets into several issues, among them, Unicode:
http://mail.python.org/pipermail/python-ideas/2012-February/013665.html
Unicode-specific offshoot of the above:
http://mail.
Chris Rebert added the comment:
> The alternative is to call Popen(['xdg-open', etc.]) and check if we get
> ENOENT, but I don’t know if this would be non-ambiguous (for example, do we
> get ENOENT if xdg-open exists but not the file?).
It's unambiguous. Python itsel
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue7839>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Rebert added the comment:
>> (2) Target file doesn't exist
>> (4) No application is associated with the file type in question
> I think that instead of mapping error codes to custom exceptions, which is
> fragile and not trivial to maintain, we should just
Chris Rebert added the comment:
> The reason I'm not a fan is the fact that, with "shell=True", you can use the
> *executable* argument to Popen to select a non-default shell. At that point,
> passing a list can make sense, even if it isn't useful for the defau
New submission from Chris Rebert :
The final line under "17.1.4.2. Replacing shell pipeline"
(http://docs.python.org/dev/library/subprocess.html#replacing-shell-pipeline )
isn't formatted as code (e.g. monospaced); it should be.
--
assignee: docs@python
components
New submission from Chris Jerdonek :
While converting code from Python 2 to Python 3, I came across the "gotcha"
that strings implement __iter__ in Python 3 but not in Python 2.
Looking through the documentation, I don't seem to see anything like this
mentioned in the lib
Chris Jerdonek added the comment:
It is not "so important." I just feel that the change should be acknowledged
somewhere -- insofar as the existing user documentation on iterator types
already discusses __iter__(). As it stands now, the Python 2 documentation is
a bit misleading
Chris Jerdonek added the comment:
Okay, then that also might be worth mentioning. As it stands now, the emphasis
in the section on iterator types is on __iter__() (e.g. it is the main focus of
the introduction), whereas iter() is barely mentioned (only in the sections on
dicts and file
Chris Jerdonek added the comment:
Is there a mechanism for suggesting improvements to the documentation (e.g. for
pedagogical reasons)? I tried to classify this as an enhancement request
rather than as a bug.
--
___
Python tracker
<h
New submission from Chris Jerdonek :
The Python documentation says that the html module (defining html.escape()) is
new in Python 3.2:
http://docs.python.org/dev/library/html.html
However, it's importable in Python 3.1, but without the escape() function.
See below for evidence.
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14544>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Ezio, I appreciate the suggestion/tip. Thanks.
Regarding Georg's clarification that '"html" is a package,' I don't know if
that was intended to correct my comment, Ezio's comment, the docs, or all of
the above. In
New submission from Chris Hargreaves :
This is similar to: https://bugs.python.org/issue28190
Not cross-compiling, but using a different ncurses version than is provided
under /usr/include/ncursesw
Specifying CPPFLAGS to have "-I/path/to/ncurses/include" does not override the
&qu
New submission from Chris Withers :
$ python3.7 -m ensurepip --upgrade
Looking in links: /var/folders/m6/tsd59qsj7pd_lldh4mhwh6khgn/T/tmpqk_vncev
Requirement already up-to-date: setuptools in
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
(39.0.1
Chris Withers added the comment:
I don't suppose there's any chance we can treat the misnaming of these options
as the bugs they feel like, so so fix them for 3.7+, rather than having people
battle on with the confusion for another 3+ years until 3.9 is
Chris Withers added the comment:
New changeset 7397cda99795a4a8d96193d710105e77a07b7411 by Chris Withers
(Xtreak) in branch 'master':
bpo-21478: Record calls to parent when autospecced objects are used as child
with attach_mock (GH 14688)
https://github.com/python/cpyt
Chris Withers added the comment:
New changeset 22fd679dc363bfcbda336775da16aff4d6fcb33f by Chris Withers (Miss
Islington (bot)) in branch '3.8':
bpo-21478: Record calls to parent when autospecced objects are used as child
with attach_mock (GH 14688) (GH-14902)
https://github.
Chris Withers added the comment:
New changeset e9b187a2bfbb0586fc5d554ce745b7fe04e0b9a8 by Chris Withers (Miss
Islington (bot)) in branch '3.7':
bpo-21478: Record calls to parent when autospecced objects are used as child
with attach_mock (GH 14688) (GH-14903)
https://github.
Chris Jerdonek added the comment:
This issue is being filed after coming up in pip's tracker here (in a comment
by Guido): https://github.com/pypa/pip/issues/5306#issuecomment-383355379
--
nosy: +chris.jerdonek
___
Python tracker
&
Changes by Chris Barth :
--
nosy: +Chris Barth
___
Python tracker
<http://bugs.python.org/issue28603>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Barth added the comment:
There are now several patches for this problem, which also affects me. What are
the next steps to get this resolved?
--
___
Python tracker
<http://bugs.python.org/issue28
Changes by Chris Fiege :
--
nosy: +cfi
___
Python tracker
<http://bugs.python.org/issue30665>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Chris Jerdonek added the comment:
Note that the example can be further simplified by replacing user() with:
async def send_hello(g):
print("sending: hello")
await g.asend("hello")
Then the output is:
sending: hello
received hello
sending: hello
sending:
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue29930>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Jerdonek:
Currently, the Python asyncio.get_event_loop() docs don't say that
get_event_loop() returns the currently running event loop when it is called
from a coroutine:
https://docs.python.org/3/library/asyncio-eventloops.html#asyncio.get_event_loop
Changes by Chris Jerdonek :
--
title: document the new behavior of get_event_loop() Python 3.6 -> document the
new behavior of get_event_loop() in Python 3.6
___
Python tracker
<http://bugs.python.org/issu
Changes by Chris Jerdonek :
--
components: +asyncio
nosy: +yselivanov
___
Python tracker
<http://bugs.python.org/issue30935>
___
___
Python-bugs-list mailin
New submission from Chris White:
When trying to validate the Python 3.6.1 tgz using the ASC file, I can't import
all the keys due to the following error:
```
gpg: Note: signatures using the MD5 algorithm are rejected
gpg: key ED9D77D5: no valid user IDs
gpg: this may be caused by a mi
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue28777>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
> there's no way to end the loop on the producing side.
I might be missing something, but can't something similar be said of
queue.get()?
--
___
Python tracker
<http://bugs.pytho
Changes by Chris Jerdonek :
--
title: asyncio: Optimize loop.call_soon -> shutdown_asyncgens
___
Python tracker
<http://bugs.python.org/issue28600>
___
___
Py
Changes by Chris Jerdonek :
--
title: shutdown_asyncgens -> asyncio: Optimize loop.call_soon
___
Python tracker
<http://bugs.python.org/issue28600>
___
___
Py
Chris Wilcox added the comment:
I was reviewing the docs for the os module and cpu_count should always return
the number of cpus on the system, not the usable CPUs. GetMaximumProcessorCount
returns a simulated count in WoW64. I have reached back out to the Windows API
dev and will see if
New submission from Chris Jerdonek:
In Python 3.6.1, if asyncio.wait_for() times out with a TimeoutError, the
traceback doesn't show what line the code was waiting on when the timeout
occurred. This makes it more difficult to diagnose the cause of a timeout.
To reproduce, you can us
Chris Jerdonek added the comment:
I noticed that the future defined by asyncio.gather(sleep) is in a "pending"
state immediately after the asyncio.TimeoutError.
One workaround is to wait for the cancellation to finish:
@asyncio.coroutine
def main():
sleep = asyncio
Chris Jerdonek added the comment:
By the way, I see this exact issue was also raised and discussed here, with a
couple responses by Guido, too:
https://github.com/python/asyncio/issues/253
--
___
Python tracker
<http://bugs.python.org/issue29
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue31033>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
A couple thoughts on this issue:
First, I think the OP's original issue could perhaps largely be addressed
without having to change cancel()'s signature. Namely, simply passing a
hard-coded string to CancelledError in the couple spots that Cancell
New submission from chris.259263:
Trying to run a script with a bug in a formated string literal (in the example
the ":" is missing) throws an "invalid syntax" error at the first expression of
the script.
Example:
import math
a = "a"
b = f"{a>2s}&
chris.259263 added the comment:
Hi Eric,
running the script from the terminal on my system (macOS, Python 3.6.2) gives
the same ErrorMessage as you stated.
The problem is the output "line 1".
Running the script from IDLE (3.6.2), the error points to the first line. And
in IDLE
Changes by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<http://bugs.python.org/issue30491>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Lovett:
When I walk a directory recursively, it is tacking on an additional
non-existant file from one of the subdirectories. Here's the code:
def copy_dir(self, src, dest):
result = sftp.mkdir(dest)
for dirname, dirnames, filenames in os.wal
Chris Lovett added the comment:
Oh, my bad then. Apologies for the noise in your system.
--
___
Python tracker
<http://bugs.python.org/issue31214>
___
___
Pytho
Changes by Chris Wilcox :
--
pull_requests: +3312
___
Python tracker
<http://bugs.python.org/issue30581>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Wilcox added the comment:
I may be wrong, but this seems like it could be an issue with NumPy. There are
similar issues on their GitHub around crashes on astype. It probably wouldn't
hurt to file this over there as well.
https://github.com/numpy/numpy/issues
--
nosy: +crw
Chris Withers added the comment:
Éric, doesn't look like I can add labels, what needs to happen for me to do so?
(I was/am a core developer, just an extremely inactive one ;-), but happy to
jump through whatever hoops necessary... )
--
___
P
New submission from Chris Withers :
While working on https://bugs.python.org/issue35226, I stumbled upon this:
>>> from unittest.mock import call
>>> call.parent()
Traceback (most recent call last):
File "", line 1, in
TypeError: 'NoneType' object
Chris Withers added the comment:
New changeset c667b094ae37799a7e42ba5cd2ad501cc7920888 by Chris Withers
(Xtreak) in branch 'master':
bpo-32153: Add unit test for create_autospec with partial function returned in
getattr (#10398)
https://github.com/python/cpyt
Chris Withers added the comment:
New changeset 1ef06c62d3c05cbba6448c56af30a09c551c9ec2 by Chris Withers (Miss
Islington (bot)) in branch '3.7':
bpo-32153: Add unit test for create_autospec with partial function returned in
getattr (GH-10398) (#10855)
https://github.com/pyth
Chris Withers added the comment:
Go for it! :-)
--
___
Python tracker
<https://bugs.python.org/issue35357>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Withers added the comment:
Not sure I follow the second option, I was thinking of just _mock_parent and
_mock_name when I logged this.
Happy to see a PR for either though!
--
___
Python tracker
<https://bugs.python.org/issue35
Chris Withers added the comment:
New changeset 8ca0fa9d2f4de6e69f0902790432e0ab2f37ba68 by Chris Withers in
branch 'master':
bpo-35226: Fix equality for nested unittest.mock.call objects. (#10555)
https://github.com/python/cpython/commit/8ca0fa9d2f4de6e69f0902790432e0
Chris Withers added the comment:
New changeset 67e6136a6d5c07141d4dba820c450a70db7aedd5 by Chris Withers (Miss
Islington (bot)) in branch '3.6':
bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555)
https://github.com/python/cpyt
Chris Withers added the comment:
New changeset e8f9e4785caeef8a68bb7859280e91a4cb424b79 by Chris Withers (Miss
Islington (bot)) in branch '3.7':
bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555)
https://github.com/python/cpyt
Change by Chris Withers :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35226>
___
___
Pyth
Chris Withers added the comment:
xtreak - great to see action on this! First step would be to add a unit test
for the failure case I reported. I like the tests you have too, but would be
good to see the specific failure case covered too.
Beyond that, if we can get all the the new tests
Chris Withers added the comment:
New changeset e63e617ebbe481c498bdf037a62e09f4f9f3963f by Chris Withers (Andrew
Dunai) in branch 'master':
bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of
_Call/_MagicProxy. (#10873)
https://github.com/python/cpyt
Chris Withers added the comment:
New changeset 12735c14134082584b899308af8dd8fcc9f15696 by Chris Withers (Miss
Islington (bot)) in branch '3.7':
bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of
_Call/_MagicProxy. (GH-10873) (#10887)
https://github.com/pyth
Change by Chris Withers :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35357>
___
___
Pyth
Chris Withers added the comment:
New changeset 70ca3fce9fe2bdd7bf97d5fe1299cfa5e32b3ad4 by Chris Withers (Miss
Islington (bot)) in branch '3.6':
bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of
_Call/_MagicProxy. (GH-10873)
https://github.com/python/cpyt
Chris Withers added the comment:
New changeset f05df0a4b679d0acfd0b1fe6187ba2d553b37afa by Chris Withers (Mario
Corchero) in branch 'master':
bpo-35330: Don't call the wrapped object if `side_effect` is set (GH10973)
https://github.com/python
Chris Withers added the comment:
New changeset 12b9fb603eea9298c835bae5b8742db4fa52892e by Chris Withers (Miss
Islington (bot)) in branch '3.6':
bpo-35330: Don't call the wrapped object if `side_effect` is set (GH11034)
https://github.com/python
Chris Withers added the comment:
New changeset ee2c5a8e2dcf662048dbcf4e49af9b4aaf81f7d3 by Chris Withers (Miss
Islington (bot)) in branch '3.7':
bpo-35330: Don't call the wrapped object if `side_effect` is set (GH11035)
https://github.com/python
Change by Chris Withers :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Chris Withers added the comment:
Before we get too far: what's the use case for this double patching?
--
___
Python tracker
<https://bugs.python.org/is
Chris Withers added the comment:
This is a tricky one as there's plenty of prior art, with pytest's assertion
rewriting [1], testfixtures compare [2] and the stuff that unittest already
does [3].
I don't think any solution should rely on a TestCase being used as pytest,
wh
Chris Withers added the comment:
More tests are generally a good thing, so go for it :-)
--
___
Python tracker
<https://bugs.python.org/issue24928>
___
___
Pytho
Chris Withers added the comment:
Ah, yeah, I can see the blanket patch and a more local patch in a monorepo
being a thing, cool, let's have a look!
--
___
Python tracker
<https://bugs.python.org/is
Chris Withers added the comment:
New changeset f7fa62ef4422c9deee050a794fd8504640d9f8f4 by Chris Withers
(Xtreak) in branch 'master':
bpo-17185: Add __signature__ to mock that can be used by inspect for signature
(GH11048)
https://github.com/python/cpyt
Change by Chris Withers :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Chris Withers added the comment:
Yep! Good catch :-)
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Chris Withers added the comment:
New changeset 6a12931c9cb5d472fe6370dbcd2bde72f34dddb4 by Chris Withers (Miss
Islington (bot)) in branch '3.7':
bpo-17185: Add __signature__ to mock that can be used by inspect for signature
(GH11125)
https://github.com/python/cpyt
Change by Chris Withers :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Chris Withers :
--
Removed message: https://bugs.python.org/msg332462
___
Python tracker
<https://bugs.python.org/issue35500>
___
___
Python-bugs-list m
Change by Chris Withers :
--
Removed message: https://bugs.python.org/msg332464
___
Python tracker
<https://bugs.python.org/issue35500>
___
___
Python-bugs-list m
Chris Billington added the comment:
I develop analysis software for physics research, in which the user analyses
their data using Python that they write themselves (my application functions as
a kind of scheduler for when the analysis scripts should run and with what
input). This software
Chris Jerdonek added the comment:
When I first created the issue, the title I chose was about unittest ("unittest
assertEqual difference output foiled by newlines"), but someone else changed it
for some reason. You're welcome to change it back to something more lik
Chris Billington added the comment:
coverage.py's documentation mentions:
> The sitecustomize.py technique is cleaner, but may involve modifying an
> existing sitecustomize.py, since there can be only one. If there is no
> sitecustomize.py already, you can create it in any di
Chris Billington added the comment:
> Linux distros approach to handling this is terrible because they dump all
> their system packages into a single global site-packages, leading to the
> every growing sys.path problem that Barry is concerned about.
> However, that's enti
Chris Markiewicz added the comment:
Just a bump to note that the PR (10441) is ready for another round of review.
--
nosy: +cjmarkie
___
Python tracker
<https://bugs.python.org/issue22
Chris Withers added the comment:
New changeset 222d303ade8aadf0adcae5190fac603bdcafe3f0 by Chris Withers (Pablo
Galindo) in branch 'master':
bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (#11057)
https://github.com/python/cpyt
Chris Withers added the comment:
New changeset d358a8cda75446a8e0b5d99149f709395d5eae19 by Chris Withers (Miss
Islington (bot)) in branch '3.7':
bpo-20239: Allow repeated deletion of unittest.mock.Mock attributes (GH-11629)
https://github.com/python/cpyt
New submission from Chris Jerdonek :
Currently, the logging docs are a bit ambiguous or at least not completely
clear as to when events are propagated when Logger.propagate is true. The docs
currently say [1]--
"If [the `propagate`] attribute evaluates to true, events logged to this l
Chris Jerdonek added the comment:
Also, does "logged to this logger" include events propagated to it from a child
logger? For example, if an event is logged to logger "A.B.C" and propagated to
"A.B", will the propagate attribute of the latter effect whether logg
Chris Jerdonek added the comment:
Thanks for the diagram. How about the following as a replacement?
"If this attribute is true and the event isn't rejected by the logger's level
and filters, an event passed to this logger will recursively be passed to its
parent logger and
Chris Jerdonek added the comment:
I'm not sure which part of what I wrote you think is inaccurate. All of what
you wrote matches what I was trying to convey.
For example, my saying "pass to the parent logger" corresponds to the "set
current logger to parent" b
Chris Langton added the comment:
@pitrou I am interested in a fix for Python 2.7 because in Python 3.x the
manner in which arithmetic is output is not arbitrary precise.
So I will continue using Python 2.7 until another language I am familiar with
that has superior arbitrary precise
Chris Langton added the comment:
interestingly, while it is expected Process or Queue would actually close
resource file descriptors and doesn't because a dev decided they prefer to
defer to the user how to manage gc themselves, the interesting thing is if you
'upgrade' you
New submission from Chris Billington :
I'm experiencing that the following short program:
import threading
event = threading.Event()
event.wait()
Cannot be interrupted with Ctrl-C on Python 2.7.15 or 3.7.1 on Windows 10
(using the Anaconda Python distribution).
However, if the wait is
Chris Billington added the comment:
If I add:
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
before the wait() call, then the call is interruptible on both Python versions
without needing to add a timeout.
--
___
Python tracker
601 - 700 of 2758 matches
Mail list logo