[issue14187] add "annotation" entry to Glossary

2012-03-03 Thread Chris Rebert
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

[issue13703] Hash collision security issue

2012-03-03 Thread Chris Rebert
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

[issue14186] Link to PEP 3107 in "def" part of Language Reference

2012-03-09 Thread Chris Rebert
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

[issue14187] add "annotation" entry to Glossary

2012-03-11 Thread Chris Rebert
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'

[issue14187] add "annotation" entry to Glossary

2012-03-11 Thread Chris Rebert
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

[issue14187] add "annotation" entry to Glossary

2012-03-11 Thread Chris Rebert
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

[issue14257] minor error in glossary wording regarding __hash__

2012-03-11 Thread Chris Rebert
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,

[issue14257] minor error in glossary wording regarding __hash__

2012-03-12 Thread Chris Rebert
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

[issue14298] account for dict randomization in Design & History FAQ

2012-03-13 Thread Chris Rebert
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

[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2012-03-31 Thread Chris Rebert
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.

[issue3177] Add shutil.open

2012-03-31 Thread Chris Rebert
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

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-03-31 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker <http://bugs.python.org/issue7839> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3177] Add shutil.open

2012-03-31 Thread Chris Rebert
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

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-03-31 Thread Chris Rebert
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

[issue14481] trivial formatting error in subprocess docs

2012-04-03 Thread Chris Rebert
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

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Chris Jerdonek
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

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Chris Jerdonek
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

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Chris Jerdonek
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

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Chris Jerdonek
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

[issue14545] html module should not be available in Python 3.1

2012-04-10 Thread Chris Jerdonek
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.

[issue14544] Limit "global" keyword name conflicts in language spec to those enforced by CPython

2012-04-10 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker <http://bugs.python.org/issue14544> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14545] html module should not be available in Python 3.1

2012-04-11 Thread Chris Jerdonek
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

[issue36979] ncurses extension uses wrong include path

2019-05-20 Thread Chris Hargreaves
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

[issue37107] ensurepip --upgrade doesn't change the version of pip used by venv

2019-05-30 Thread Chris Withers
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

[issue37107] ensurepip --upgrade doesn't change the version of pip used by venv

2019-06-09 Thread Chris Withers
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

[issue21478] mock calls don't propagate to parent (autospec)

2019-07-22 Thread Chris Withers
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

[issue21478] mock calls don't propagate to parent (autospec)

2019-07-22 Thread Chris Withers
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.

[issue21478] mock calls don't propagate to parent (autospec)

2019-07-22 Thread Chris Withers
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.

[issue37700] shutil.copyfile does not raise SpecialFileError for socket files

2019-07-29 Thread Chris Jerdonek
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 &

[issue28603] traceback module can't format/print unhashable exceptions

2017-06-14 Thread Chris Barth
Changes by Chris Barth : -- nosy: +Chris Barth ___ Python tracker <http://bugs.python.org/issue28603> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28603] traceback module can't format/print unhashable exceptions

2017-06-14 Thread Chris Barth
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

[issue30665] pass big values for arg to fcntl.ioctl

2017-06-17 Thread Chris Fiege
Changes by Chris Fiege : -- nosy: +cfi ___ Python tracker <http://bugs.python.org/issue30665> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue30773] async generator receives wrong value when shared between coroutines

2017-06-27 Thread Chris Jerdonek
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:

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2017-07-10 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <http://bugs.python.org/issue29930> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30935] document the new behavior of get_event_loop() Python 3.6

2017-07-14 Thread Chris Jerdonek
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

[issue30935] document the new behavior of get_event_loop() in Python 3.6

2017-07-14 Thread Chris Jerdonek
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

[issue30935] document the new behavior of get_event_loop() in Python 3.6

2017-07-14 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- components: +asyncio nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue30935> ___ ___ Python-bugs-list mailin

[issue30992] Invalid PGP Key Prevents Archive Validation

2017-07-22 Thread Chris White
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

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2017-07-25 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <http://bugs.python.org/issue28777> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2017-07-25 Thread Chris Jerdonek
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

[issue28600] shutdown_asyncgens

2017-07-27 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- title: asyncio: Optimize loop.call_soon -> shutdown_asyncgens ___ Python tracker <http://bugs.python.org/issue28600> ___ ___ Py

[issue28600] asyncio: Optimize loop.call_soon

2017-07-27 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- title: shutdown_asyncgens -> asyncio: Optimize loop.call_soon ___ Python tracker <http://bugs.python.org/issue28600> ___ ___ Py

[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-07-29 Thread Chris Wilcox
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

[issue31131] asyncio.wait_for() TimeoutError doesn't provide full traceback

2017-08-07 Thread Chris Jerdonek
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

[issue29432] wait_for(gather(...)) logs weird error message

2017-08-07 Thread Chris Jerdonek
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

[issue29432] wait_for(gather(...)) logs weird error message

2017-08-07 Thread Chris Jerdonek
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

[issue31033] Add argument to .cancel() of Task and Future

2017-08-07 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <http://bugs.python.org/issue31033> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31033] Add argument to .cancel() of Task and Future

2017-08-07 Thread Chris Jerdonek
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

[issue31140] Insufficient error message with incorrect formated string literal

2017-08-08 Thread chris.259263
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}&

[issue31140] Insufficient error message with incorrect formated string literal

2017-08-08 Thread chris.259263
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

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2017-08-09 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <http://bugs.python.org/issue30491> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31214] os.walk has a bug on Windows

2017-08-15 Thread Chris Lovett
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

[issue31214] os.walk has a bug on Windows

2017-08-15 Thread Chris Lovett
Chris Lovett added the comment: Oh, my bad then. Apologies for the noise in your system. -- ___ Python tracker <http://bugs.python.org/issue31214> ___ ___ Pytho

[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

2017-09-01 Thread Chris Wilcox
Changes by Chris Wilcox : -- pull_requests: +3312 ___ Python tracker <http://bugs.python.org/issue30581> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31298] Error when calling numpy.astype

2017-09-06 Thread Chris Wilcox
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

[issue35226] mock.call equality surprisingly broken

2018-11-27 Thread Chris Withers
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

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-11-29 Thread Chris Withers
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

[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-02 Thread Chris Withers
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

[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-03 Thread Chris Withers
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

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-03 Thread Chris Withers
Chris Withers added the comment: Go for it! :-) -- ___ Python tracker <https://bugs.python.org/issue35357> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-03 Thread Chris Withers
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

[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers
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

[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers
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

[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers
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

[issue35226] mock.call equality surprisingly broken

2018-12-03 Thread Chris Withers
Change by Chris Withers : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35226> ___ ___ Pyth

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-03 Thread Chris Withers
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

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers
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

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers
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

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers
Change by Chris Withers : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35357> ___ ___ Pyth

[issue35357] unittest.mock.call can't represent calls to a method called 'parent'

2018-12-04 Thread Chris Withers
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

[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers
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

[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers
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

[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers
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

[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-12-08 Thread Chris Withers
Change by Chris Withers : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Chris Withers
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

[issue28054] Diff for visually comparing actual with expected in mock.assert_called_with.

2018-12-10 Thread Chris Withers
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

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2018-12-10 Thread Chris Withers
Chris Withers added the comment: More tests are generally a good thing, so go for it :-) -- ___ Python tracker <https://bugs.python.org/issue24928> ___ ___ Pytho

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Chris Withers
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

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-11 Thread Chris Withers
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

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-11 Thread Chris Withers
Change by Chris Withers : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-12-12 Thread Chris Withers
Chris Withers added the comment: Yep! Good catch :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue17185] unittest mock create_autospec doesn't correctly replace mocksignature

2018-12-12 Thread Chris Withers
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

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-12 Thread Chris Withers
Change by Chris Withers : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35500] Align expected and actual calls on mock.assert_called_with error message

2018-12-24 Thread Chris Withers
Change by Chris Withers : -- Removed message: https://bugs.python.org/msg332462 ___ Python tracker <https://bugs.python.org/issue35500> ___ ___ Python-bugs-list m

[issue35500] Align expected and actual calls on mock.assert_called_with error message

2018-12-24 Thread Chris Withers
Change by Chris Withers : -- Removed message: https://bugs.python.org/msg332464 ___ Python tracker <https://bugs.python.org/issue35500> ___ ___ Python-bugs-list m

[issue33944] Deprecate and remove pth files

2019-01-08 Thread Chris Billington
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

[issue24780] difflib.ndiff produces unreadable output when input missing trailing newline

2019-01-08 Thread Chris Jerdonek
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

[issue33944] Deprecate and remove pth files

2019-01-13 Thread Chris Billington
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

[issue33944] Deprecate and remove pth files

2019-01-15 Thread Chris Billington
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

[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

2019-01-17 Thread Chris Markiewicz
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

[issue20239] Allow repeated deletion of unittest.mock.Mock attributes

2019-01-21 Thread Chris Withers
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

[issue20239] Allow repeated deletion of unittest.mock.Mock attributes

2019-01-21 Thread Chris Withers
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

[issue35821] Clarify when logging events are propagated when propagate is true

2019-01-24 Thread Chris Jerdonek
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

[issue35821] Clarify when logging events are propagated when propagate is true

2019-01-24 Thread Chris Jerdonek
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

[issue35821] Clarify when logging events are propagated when propagate is true

2019-01-24 Thread Chris Jerdonek
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

[issue35821] Clarify when logging events are propagated when propagate is true

2019-01-25 Thread Chris Jerdonek
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

[issue33081] multiprocessing Queue leaks a file descriptor associated with the pipe writer

2019-01-31 Thread Chris Langton
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

[issue33081] multiprocessing Queue leaks a file descriptor associated with the pipe writer

2019-01-31 Thread Chris Langton
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

[issue35935] threading.Event().wait() not interruptable with Ctrl-C on Windows

2019-02-07 Thread Chris Billington
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

[issue35935] threading.Event().wait() not interruptable with Ctrl-C on Windows

2019-02-07 Thread Chris Billington
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

<    2   3   4   5   6   7   8   9   10   11   >