[issue39601] brace escapes are not working in formatted string literal format specifications

2020-02-10 Thread Chris Wilcox
Chris Wilcox added the comment: Double curly braces do not indicate to not process the inner content. They indicate to include a literal curly brace. That said, I think there may be something not quite correct. I came up with an example based on the example in the format specifiers section

[issue9305] Don't use east/west of UTC in date/time documentation

2020-02-10 Thread Chris Wilcox
Chris Wilcox added the comment: Are you still working on this Ajay Mahato? -- nosy: +crwilcox ___ Python tracker <https://bugs.python.org/issue9305> ___ ___

[issue14678] Update zipimport to support importlib.invalidate_caches()

2020-02-10 Thread Chris Wilcox
Chris Wilcox added the comment: What work remains to be done for this issue? -- nosy: +crwilcox ___ Python tracker <https://bugs.python.org/issue14678> ___ ___

[issue39601] brace escapes are not working in formatted string literal format specifications

2020-02-10 Thread Chris Wilcox
Chris Wilcox added the comment: The attached code implements `__format__` on the `Collections` class. In case 1, the template passed to `__format__` is "{v.name}: {v.email}|". In case 2, a name error will occur while processing the f string and v will not be found as no object

[issue39551] mock patch should match behavior of import from when module isn't present in sys.modules

2020-02-09 Thread Chris Withers
Chris Withers added the comment: Hmm, the more we get into this, the less comfortable I am of the patch in the PR. Instead of copying and pasting more code that's likely to get out of sync, could you change the PR to just replace _importer with the correct parts of importlib to support

[issue39551] mock patch should match behavior of import from when module isn't present in sys.modules

2020-02-06 Thread Chris Withers
Chris Withers added the comment: Apologies, but I'm still not sure what "the modules are published" means? "publish "x" as a child onto the package" also doesn't mean much to me, I'm afraid. Are you aware of any importlib docs or some such which might be able

[issue39551] mock patch should match behavior of import from when module isn't present in sys.modules

2020-02-04 Thread Chris Withers
Chris Withers added the comment: I'm afraid I don't understand "immutable package which doesn't allow it's children to be published on it", can you give an example? -- ___ Python tracker <https://bugs.python.o

[issue39551] mock patch should match behavior of import from when module isn't present in sys.modules

2020-02-04 Thread Chris Withers
Chris Withers added the comment: What's the real world use case for this? -- nosy: +cjw296 ___ Python tracker <https://bugs.python.org/issue39551> ___ ___ Pytho

[issue31826] Misleading __version__ attribute of modules in standard library

2020-02-04 Thread Chris Withers
Change by Chris Withers : -- keywords: +patch pull_requests: +17717 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17977 ___ Python tracker <https://bugs.python.org/issu

[issue39450] unittest TestCase shortDescription does not strip whitespace

2020-02-03 Thread Chris Withers
Chris Withers added the comment: New changeset 02395fad8e3a35ef00fa31c308693844013a1dd4 by Miss Islington (bot) in branch '3.8': bpo-39450 Stripped whitespace before parsing the docstring in TestCase.shortDescription (GH-18175) (#18323) https://github.com/python/cpython/commit

[issue39450] unittest TestCase shortDescription does not strip whitespace

2020-02-02 Thread Chris Withers
Chris Withers added the comment: New changeset 7561e7a83f5118fda6c62fe9c8c3458f8cfd by Miss Islington (bot) in branch '3.7': bpo-39450 Stripped whitespace before parsing the docstring in TestCase.shortDescription (GH-18321) https://github.com/python/cpython/commit

[issue39450] unittest TestCase shortDescription does not strip whitespace

2020-02-02 Thread Chris Withers
Chris Withers added the comment: New changeset 032de7324e30c6b44ef272cea3be205a3d768759 by Steve Cirelli in branch 'master': bpo-39450 Stripped whitespace before parsing the docstring in TestCase.shortDescription (GH-18175) https://github.com/python/cpython/commit

[issue37972] unittest.mock.call does not chain __getitem__ to another _Call object

2020-01-29 Thread Chris Withers
Chris Withers added the comment: New changeset db5e86adbce12350c26e7ffc2c6673369971a2dc by Chris Withers in branch 'master': Get mock coverage back to 100% (GH-18228) https://github.com/python/cpython/commit/db5e86adbce12350c26e7ffc2c6673369971a2dc

[issue39485] Bug in mock running on PyPy3

2020-01-29 Thread Chris Withers
Chris Withers added the comment: Thank you very much for this, that was a really good catch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39485] Bug in mock running on PyPy3

2020-01-29 Thread Chris Withers
Chris Withers added the comment: New changeset 696d2324cf2a54e20e8d6a6739fa97ba815a8be9 by Miss Islington (bot) in branch '3.8': bpo-39485: fix corner-case in method-detection of mock (GH-18255) https://github.com/python/cpython/commit/696d2324cf2a54e20e8d6a6739fa97ba815a8be9

[issue39485] Bug in mock running on PyPy3

2020-01-29 Thread Chris Withers
Chris Withers added the comment: New changeset cf0645a17acbc0c4dbbf82434e37637965748bbb by Miss Islington (bot) in branch '3.7': bpo-39485: fix corner-case in method-detection of mock (GH-18256) https://github.com/python/cpython/commit/cf0645a17acbc0c4dbbf82434e37637965748bbb

[issue39485] Bug in mock running on PyPy3

2020-01-29 Thread Chris Withers
Chris Withers added the comment: New changeset a327677905956ae0b239ff430a1346dfe265709e by Carl Friedrich Bolz-Tereick in branch 'master': bpo-39485: fix corner-case in method-detection of mock (GH-18252) https://github.com/python/cpython/commit/a327677905956ae0b239ff430a1346dfe265709e

[issue39485] Bug in mock running on PyPy3

2020-01-29 Thread Chris Withers
Change by Chris Withers : -- assignee: -> cjw296 ___ Python tracker <https://bugs.python.org/issue39485> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39466] Great

2020-01-27 Thread chris
New submission from chris : How do I start creating my own code, is there tutorial for this? https://logingit.com/amazon-from-a-to-z-www-atoz-amazon-work/ -- messages: 360768 nosy: Nadas priority: normal severity: normal status: open title: Great

[issue37625] Class variable is still accessible after class instance has been overwritten out

2020-01-27 Thread chris
chris added the comment: Great and I look forward to getting more content. Incredibly great. https://logingit.com/dish-network-login/ -- ___ Python tracker <https://bugs.python.org/issue37

[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2020-01-26 Thread Chris Withers
Chris Withers added the comment: New changeset 72b1004657e60c900e4cd031b2635b587f4b280e by Chris Withers (Karthikeyan Singaravelan) in branch 'master': bpo-25597: Ensure wraps' return value is used for magic methods in MagicMock (#16029) https://github.com/python/cpython/commit

[issue37625] Class variable is still accessible after class instance has been overwritten out

2020-01-26 Thread chris
chris added the comment: Great content and outstanding, How can I start getting your https://logingit.com/www-txsurchargeonline-com-login-tx-surcharge-pay/;>newsletters in my email to enable keep track of your future content? Thank for this great piece. -- nosy: +Na

[issue38971] codecs.open leaks file descriptor when invalid encoding is passed

2020-01-26 Thread Chris Aporta
Chris Aporta added the comment: Just quickly pinging the thread as a friendly reminder that PR 17666 is open and potentially close to mergeable, as it's been through two review cycles already (thanks Serhiy). If someone has the bandwidth to take another look, it would be greatly appreciated

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-26 Thread Chris Withers
Chris Withers added the comment: New changeset 19be85c76503535c101b38194d282187de0ff631 by Chris Withers (Matthew Kokotovich) in branch '3.8': [3.8] bpo-39082: Allow AsyncMock to correctly patch static/class methods (GH-18190) https://github.com/python/cpython/commit

[issue38932] unittest.mock.Mock.reset_mocks does not pass all arguments to its children

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

[issue38932] unittest.mock.Mock.reset_mocks does not pass all arguments to its children

2020-01-25 Thread Chris Withers
Chris Withers added the comment: New changeset aef7dc89879d099dc704bd8037b8a7686fb72838 by Chris Withers (Vegard Stikbakke) in branch 'master': bpo-38932: Mock fully resets child objects on reset_mock(). (GH-17409) https://github.com/python/cpython/commit

[issue37955] mock.patch incorrect reference to Mock

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

[issue37955] mock.patch incorrect reference to Mock

2020-01-25 Thread Chris Withers
Chris Withers added the comment: New changeset 40c080934b3d49311209b1cb690c2ea1e04df7e7 by Chris Withers (Paulo Henrique Silva) in branch 'master': bpo-37955: correct mock.patch docs with respect to the returned type (GH-15521) https://github.com/python/cpython/commit

[issue39082] AsyncMock is unable to correctly patch static or class methods

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

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-25 Thread Chris Withers
Chris Withers added the comment: New changeset 62865f4532094017a9b780b704686ca9734bc329 by Chris Withers (Matthew Kokotovich) in branch 'master': bpo-39082: Allow AsyncMock to correctly patch static/class methods (GH-18116) https://github.com/python/cpython/commit

[issue38473] AttributeError on asserting autospecced mock object added using attach_mock

2020-01-24 Thread Chris Withers
Chris Withers added the comment: New changeset 66b00a9d3aacf6ed49412f48743e4913104a2bb3 by Chris Withers (Karthikeyan Singaravelan) in branch 'master': bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784) https://github.com/python/cpython/commit

[issue21600] mock.patch.stopall doesn't work with patch.dict

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

[issue37669] Make mock_open return per-file content

2020-01-24 Thread Chris Withers
Chris Withers added the comment: Closing in favour of issue38157. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37669] Make mock_open return per-file content

2020-01-24 Thread Chris Withers
Chris Withers added the comment: I'm not sure I like the API feel after this change: two parameters that can't be used at the same time. As Karthikeyan points out, this can be achieved using side_effect. Personally, I'd prefer a PR that adds a unit test showing that this approach works

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

2020-01-24 Thread Chris Withers
Chris Withers added the comment: New changeset 1d0c5e16eab29d55773cc4196bb90d2bf12e09dd by Chris Withers (Emmanuel Arias) in branch 'master': bpo-24928: Add test case for patch.dict using OrderedDict (GH -11437) https://github.com/python/cpython/commit

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

2020-01-24 Thread Chris Withers
Chris Withers added the comment: As I said before, I can't see an additional test like this hurting, especially if it highlights problems with earlier python versions when it's backported. -- ___ Python tracker <https://bugs.python.org/issue24

[issue27657] urlparse fails if the path is numeric

2020-01-17 Thread Chris Dent
Chris Dent added the comment: Just to add to the list of places this is causing a regression. This has broken the target host determination routines in gabbi: https://github.com/cdent/gabbi/issues/277 While the original fix may have been strictly correct in some ways, it results

[issue39342] Expose X509_V_FLAG_ALLOW_PROXY_CERTS in ssl

2020-01-15 Thread Chris Burr
Change by Chris Burr : -- keywords: +patch pull_requests: +17410 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18011 ___ Python tracker <https://bugs.python.org/issu

[issue39342] Expose X509_V_FLAG_ALLOW_PROXY_CERTS in ssl

2020-01-15 Thread Chris Burr
Change by Chris Burr : -- assignee: -> christian.heimes components: +SSL -Library (Lib) nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issu

[issue39342] Expose X509_V_FLAG_ALLOW_PROXY_CERTS in ssl

2020-01-15 Thread Chris Burr
New submission from Chris Burr : Enabling proxy certificate validation requires X509_V_FLAG_ALLOW_PROXY_CERTS to be included in the verify flags.[1] This should be exposed as ssl.VERIFY_ALLOW_PROXY_CERTS to match with the other X509_V_FLAG_* variables. https://www.openssl.org/docs/man1.1.1

[issue18233] SSLSocket.getpeercertchain()

2020-01-13 Thread Chris Burr
Change by Chris Burr : -- nosy: +chrisburr ___ Python tracker <https://bugs.python.org/issue18233> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39222] unittest.mock.Mock.parent is broken or undocumented

2020-01-12 Thread Chris Withers
Chris Withers added the comment: Ah right. Well, it's called `parent` in the __init__ as that's what the attribute used to be called. My suggestion would be to add `parent` to the docs @xtreak links to as a way to resolve this issue

[issue18233] SSLSocket.getpeercertchain()

2020-01-10 Thread Chris Burr
Change by Chris Burr : -- pull_requests: +17346 pull_request: https://github.com/python/cpython/pull/17938 ___ Python tracker <https://bugs.python.org/issue18

[issue39222] unittest.mock.Mock.parent is broken or undocumented

2020-01-10 Thread Chris Withers
Chris Withers added the comment: I thought we'd already changed this to _mock_parent in the last year or so? -- ___ Python tracker <https://bugs.python.org/issue39

[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2019-12-24 Thread Chris Barker
Chris Barker added the comment: Yes Please! I'd offer to help, but I really don't get the intricacies involved. I will offer to proofread and copy-edit though, if that's helpful. And I note that coincidentally, just in the last week, I needed to make an absolute path from a Path

[issue39032] wait_for and Condition.wait still not playing nicely

2019-12-12 Thread Chris
New submission from Chris : This is related to https://bugs.python.org/issue22970, https://bugs.python.org/issue33638, and https://bugs.python.org/issue32751. I've replicated the issue on Python 3.6.9, 3.7.4, and 3.8.0. Looking at the source, I'm fairly sure the bug is still in master right

[issue38669] patch.object should raise another error when first argument is a str

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

[issue38669] patch.object should raise another error when first argument is a str

2019-12-08 Thread Chris Withers
Chris Withers added the comment: New changeset 41973c99fdfdc78315e819661e279bdcc2f058b1 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-38669: patch.object now raises a helpful error (GH17511) https://github.com/python/cpython/commit/41973c99fdfdc78315e819661e279bdcc2f058b1

[issue38669] patch.object should raise another error when first argument is a str

2019-12-08 Thread Chris Withers
Chris Withers added the comment: New changeset 4594565b56e9c99d2d3fb7549041bbca5ecba8e2 by Chris Withers (Miss Islington (bot)) in branch '3.8': bpo-38669: patch.object now raises a helpful error (GH17510) https://github.com/python/cpython/commit/4594565b56e9c99d2d3fb7549041bbca5ecba8e2

[issue38669] patch.object should raise another error when first argument is a str

2019-12-08 Thread Chris Withers
Chris Withers added the comment: New changeset cd90a52983db34896a6335a572d55bdda274778f by Chris Withers (Elena Oat) in branch 'master': bpo-38669: patch.object now raises a helpful error (GH17034) https://github.com/python/cpython/commit/cd90a52983db34896a6335a572d55bdda274778f

[issue38937] NameError in list comprehension within .pth file

2019-11-29 Thread Chris Billington
Chris Billington added the comment: Sorry for the spamming, realised I misunderstood further. The original behaviour isn't because the exec'd code can't create new local variables - it can - it's because of the documented behaviour of exec when it gets different dicts for globals and locals

[issue38937] NameError in list comprehension within .pth file

2019-11-28 Thread Chris Billington
Chris Billington added the comment: I see. site.py calls exec() from within a function, and therefore the code is executed in the context of that function's locals and the site module globals. This means the code in .pth files can access (but not add new) local names from

[issue38937] NameError in list comprehension within .pth file

2019-11-28 Thread Chris Billington
New submission from Chris Billington : The following one-liner works fine in a regular Python interpreter: $ python -c 'import sys; x = 5; [print(x + i) for i in range(5)]' 5 6 7 8 9 But in a .pth file, it raises a NameError: $ echo 'import sys; x = 5; [print(x + i) for i in range(5

[issue30463] Add __slots__ to ABC convenience class

2019-11-15 Thread Chris Withers
Chris Withers added the comment: I will note that this means with: class BaseClass(ABC): pass class MyDerivedClass(BaseClass): def __init__(self, thing): self.thing = thing thing = MyDerivedClass() thing now has both __slots__ and, evidently, a dict. That's a bit weird

[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

2019-11-12 Thread Chris Withers
Change by Chris Withers : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38763> ___ ___

[issue38757] mocking an exception, arguments do not seem to be passed to the mock

2019-11-11 Thread Chris Withers
Chris Withers added the comment: Agreed. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38757] mocking an exception, arguments do not seem to be passed to the mock

2019-11-09 Thread Chris Withers
Chris Withers added the comment: Not sure this is correct, if an effect is an exception and requires args, then it should be passed as an instance, not a class: Mock(side_effect=MyException(‘foo’)) > On 10 Nov 2019, at 04:49, Karthikeyan Singaravelan > wrote: > > &

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-08-29 Thread Chris Withers
Chris Withers added the comment: New changeset 38d311d79e57479f7a684c2cd298293033dc4990 by Chris Withers (Miss Islington (bot)) in branch '3.8': bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH15578) https://github.com/python/cpython/commit

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-08-29 Thread Chris Withers
Chris Withers added the comment: New changeset be310e03d0b84ef56e9d35b0b1b21d685b7ea371 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH15577) https://github.com/python/cpython/commit

[issue36871] Misleading error from unittest.mock's assert_has_calls

2019-08-29 Thread Chris Withers
Chris Withers added the comment: New changeset c96127821ebda50760e788b1213975a0d5bea37f by Chris Withers (Xtreak) in branch 'master': bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH13261) https://github.com/python/cpython/commit

[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 <ht

[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.com/python

[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.com/python

[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/cpython/commit

[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 mainstream

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

2019-05-31 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

[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

[issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST

2019-05-13 Thread Chris Angelico
Change by Chris Angelico : -- pull_requests: +13196 ___ Python tracker <https://bugs.python.org/issue32893> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21820] unittest: unhelpful truncating of long strings.

2019-05-08 Thread Chris Withers
Change by Chris Withers : -- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.4 ___ Python tracker <https://bugs.python.org/issue21820> ___ ___ Python-bug

[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers
Chris Withers added the comment: We only attempt to set __signature__ on Mocks, so I don't think extensions will be a problem. I do think there's a bit of code smell on that method: it's called _check_* and then changes some attributes, that might be worth fixing

[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers
Chris Withers added the comment: I'm not sure we should try and work around this; hijacking __signature__ python-wide is going to cause a bunch of other problems. My vote would be to just open a bug on the pyside tracker (wherever that is) and close the issue and and on the backport

[issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable

2019-05-08 Thread Chris Withers
Chris Withers added the comment: Wow, is this just an issue that the pyside guys need to fix? -- ___ Python tracker <https://bugs.python.org/issue36848> ___ ___

[issue35224] PEP 572: Assignment Expressions

2019-05-07 Thread Chris Angelico
Change by Chris Angelico : -- pull_requests: +13077 ___ Python tracker <https://bugs.python.org/issue35224> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-05-07 Thread Chris Withers
Chris Withers added the comment: New changeset a6516f89aa0f416c7514ac364bb48ac7d1455487 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521) (#13152) https://github.com/python/cpython

[issue31855] mock_open is not compatible with read(n) (and pickle.load)

2019-05-07 Thread Chris Withers
Chris Withers added the comment: New changeset 11a8832c98b3db78727312154dd1d3ba76d639ec by Chris Withers (Rémi Lapeyre) in branch 'master': bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521) https://github.com/python/cpython/commit

[issue36596] tarfile module considers anything starting with 512 bytes of zero bytes to be a valid tar file

2019-04-10 Thread Chris Siebenmann
New submission from Chris Siebenmann : The easiest reproduction of this is: import tarfile tarfile.open("/dev/zero", "r:") (If you use plain "r" you get a hang in attempted lzma decoding.) I believe this is probably due to a missing 'elif self

[issue21269] Provide args and kwargs attributes on mock call objects

2019-03-22 Thread Chris Withers
Chris Withers added the comment: New changeset b0df45e55dc8304bac0e3cad0225472b84190964 by Chris Withers (Kumar Akshay) in branch 'master': bpo-21269: Provide args and kwargs attributes on mock call objects GH11807 https://github.com/python/cpython/commit

[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-25 Thread Chris Withers
Chris Withers added the comment: New changeset ea199b90bb61866cd3c2f154341d1eb0d5c4a710 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-35512: Resolve string target to patch.dict decorator during function call GHGH-12000 (#12021) https://github.com/python/cpython/commit

[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-24 Thread Chris Withers
Chris Withers added the comment: New changeset a875ea58b29fbf510f9790ae1653eeaa47dc0de8 by Chris Withers (Xtreak) in branch 'master': bpo-35512: Resolve string target to patch.dict decorator during function call GH#12000 https://github.com/python/cpython/commit

[issue32528] Change base class for futures.CancelledError

2019-02-19 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue32528> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: To stop the discussion from happening in two places (sorry, Yury), I started a broader discussion on Async-sig with thread starting here: https://mail.python.org/pipermail/async-sig/2019-February/000548.html

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Well, if you want to unconditionally end tasks you shouldn't write coroutines > that ignore CancelledErrors. Well, of course. But code can have bugs, and maybe you didn't write the coroutine because it's from a library that you don't control. In tha

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: > There's no clear reason to complicate the Task<->coroutine relationship by > allowing to inject arbitrary exceptions into running coroutines. My comment was more about CancelledError rather than arbitrary exceptions. You didn't reply to th

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: A second reason why Task.cancel() seems to be an incomplete replacement: Task.set_exception() and Task.set_result() both give you a way to unconditionally end a task. With cancel() though, the docs say, "Task.cancel() does not guarantee that the

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: Correction: that should have been bpo-31033. -- ___ Python tracker <https://bugs.python.org/issue32363> ___ ___ Python-bug

[issue32363] Deprecate task.set_result() and task.set_exception()

2019-02-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Use Task.cancel() or use a Queue to communicate with the task. One reason why Task.cancel() is an incomplete replacement for Task.set_exception() is that you don't have an easy way to communicate why the task was ended. With set_except

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-17 Thread Chris Jerdonek
Chris Jerdonek added the comment: > And since it seems that it can not be solved completely, You may be right only to document, but you didn't note any problems with the possibility I suggested. A cleanup pruning step could be done on failure that is similar to the cleanup pruning s

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2019-02-16 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue34028> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-12 Thread Chris Jerdonek
Chris Jerdonek added the comment: > As such the cleanup in case of failure should not be expected, Given that the documentation specifically calls out permissions errors as a cause of leaving the new directory in place, it wouldn't be unreasonable for someone to think the function d

[issue35955] difflib reports incorrect location of mismatch

2019-02-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Is this a duplicate of issue24780? -- nosy: +chris.jerdonek ___ Python tracker <https://bugs.python.org/issue35955> ___ ___

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: Lacking permissions seems very different to me from the source directory or file not existing. For example, in the example I provided, I did have the needed permissions. Incidentally (and this is a separate documentation issue), the note seems unclear

[issue35951] os.renames() creates directories if original name doesn't exist

2019-02-09 Thread Chris Jerdonek
New submission from Chris Jerdonek : os.renames() creates and leaves behind the intermediate directories if the original (source) path doesn't exist. >>> import os >>> os.mkdir('temp') >>> os.mkdir('temp/test') >>> os.renames('temp/not-exists', 'temp/test2/

[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

[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 given

[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' your code to use

[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

[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"

[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 ha

[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
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

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