[issue31264] Import Package/Module through HTTP/S repository

2017-08-23 Thread R. David Murray
R. David Murray added the comment: Indeed, I personally can't imagine a circumstance in which I'd want to use this feature. Even inside an org. It also has security implications, which would also make it a harder sell. -- ___ Python tracker <

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread R. David Murray
R. David Murray added the comment: Sometimes it does, sometimes we make the change in a feature release, often after a deprecation period. But in this case there is doubt that the behavior is incorrect in the first place. This discussion should move to the python-ideas mailing list. I'm

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread R. David Murray
R. David Murray added the comment: If you would disallow "a = [0]; [5, a][1][:] = [3]", then your proposal will not be accepted, for backward compatibility reasons if nothing else. -- versions: +Python 3.7 -Python 3.5, Python 3.6 ___ Pyth

[issue31264] Import Package/Module through HTTP/S repository

2017-08-23 Thread R. David Murray
R. David Murray added the comment: This kind of proposal should start with a discussion on the python-ideas mailing list. You can reopen the issue if there is a consensus for moving forward...but I wouldn't be surprised if this was considered to be a PEP level proposal. -- nosy

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread R. David Murray
R. David Murray added the comment: I'm don't have a lot of experience with parsers, but I suspect that we consider the cost of making the grammar more complex to be more significant than the benefit we'd get from catching these at compile time. And as Vedran says, defining what can be caught

[issue31262] Documentation Error

2017-08-22 Thread R. David Murray
R. David Murray added the comment: No, that sentence is telling you what the *Python*'s behavior is, using C++ terminology. Unlike C++, where class members are private by default, the Python equivalent of class members are public by default. If you can figure out a clearer way to phrase

[issue31261] unittest fails to properly destruct objects created during setUp if a test fails

2017-08-22 Thread R. David Murray
R. David Murray added the comment: GC cleanup is not guaranteed to be synchronous. You are observing normal Python behavior here. Cleanup does not happen until the TestCase instance is finalized (thus eliminating the self.dummy reference to your DummyClass). In the case of passing tests

[issue31253] Python fails to parse triple quoted (commented out) code

2017-08-22 Thread R. David Murray
R. David Murray added the comment: And being "accepted" does not change the fact that one needs to be aware of the fact that syntactically they are string literals and not syntactic comments. Which was your point. -- ___ Python tr

[issue31253] Python fails to parse triple quoted (commented out) code

2017-08-22 Thread R. David Murray
R. David Murray added the comment: Just FYI, Vedran, almost everyone gets this one wrong :) I too once thought that triple quoted text used as comments was bad style, but in fact I learned they are an accepted way in Python to do multiline comments. Accepted by Guido, at least: https

[issue31251] Diameter protocol in Python

2017-08-21 Thread R. David Murray
R. David Murray added the comment: This isn't a help forum, it is a place for reporting bugs in Python. The kind of question you are asking is best asked on the python-list mailing list (see mail.python.org). -- nosy: +r.david.murray resolution: -> not a bug stage: -> re

[issue31239] namedtuple comparison ignores types

2017-08-19 Thread R. David Murray
R. David Murray added the comment: This is by design: namedtuples are tuples in which you can access the elements by name. If you have a tuple with the same elements, but no name access, they should compare equal, because they are fundamentally tuples. The names are just a convenience

[issue31231] Travis CI mac test broken: ./python: is a directory

2017-08-18 Thread R. David Murray
R. David Murray added the comment: Ah, this is probably the issue: https://github.com/python/cpython/pull/3134 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31231] Travis CI mac test broken: ./python: is a directory

2017-08-18 Thread R. David Murray
R. David Murray added the comment: Heh. I saw the PR but didn't realize it was attached to this issue :) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31231] Travis CI mac test broken: ./python: is a directory

2017-08-18 Thread R. David Murray
R. David Murray added the comment: The docs you point to are correct (they mention python.exe). The Travis log also shows it using python.exe. So the error message about the directory must be about some other operation than just running the python command. -- components: +macOS nosy

[issue31222] datetime.py implementation of .replace inconsistent with C implementation

2017-08-16 Thread R. David Murray
R. David Murray added the comment: See also issue 20371. -- nosy: +r.david.murray ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31210] Can not import modules if sys.prefix contains DELIM

2017-08-16 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- title: Can not import site from sys.prefix containing DELIM -> Can not import modules if sys.prefix contains DELIM ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-16 Thread R. David Murray
R. David Murray added the comment: All right. So the challenge here for windows is: if python is installed on a path that has a semicolon in one of the directory names, is it even possible to populate sys.path such that modules can be imported from the lib directory that is under that path

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-16 Thread R. David Murray
R. David Murray added the comment: Is this post wrong then?: https://superuser.com/questions/584870/how-can-i-add-a-folder-containing-a-semicolon-to-the-windows-path ("I noticed that the semicolon ; is a valid character for Windows (NTFS) file and directory

[issue31218] del expects __delitem__ if __setitem__ is defined

2017-08-16 Thread R. David Murray
R. David Murray added the comment: I'm not sure we would consider this a bug (the message is accurate), but I wouldn't object to fixing it, since that would indeed seem more consistent with how __delitem__ and del are defined in the language reference. -- nosy: +r.david.murray

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2017-08-16 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- versions: +Python 3.7 -Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2017-08-16 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- nosy: +qingyunha ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27413> ___

[issue31216] Add ensure_ascii argument to json.tool

2017-08-16 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 27413. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add an option to json.tool to bypass non-ASCII characters. __

[issue31214] os.walk has a bug on Windows

2017-08-15 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
R. David Murray added the comment: OK, that seems reasonable to me. I'll reopen the issue. Assuming other developers agree that this should be changed, I'm not sure if it will qualify as a bug or an enhancement, so I'm leaving versions unselected for now :) -- resolution: not a bug

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
R. David Murray added the comment: You mean to create the entries on sys.path that do not come from the PYTHONPATH? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31194] Inconsistent __repr__s for _collections objects

2017-08-15 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 27541. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Repr of collection's subclasses ___ Python

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
R. David Murray added the comment: I'm not sure there is anything we should do here, then, because we are conforming to the posix parsing for PATH in our PYTHONPATH implementation. I think if you want to pursue this further you should take it to the python-ideas mailing list. I'm going

[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray
R. David Murray added the comment: By DELIM, you mean the shell ':'? As far as I've been able to determine there is no way defined in posix to escape that character. If you can find one, please let us know. (I think the same is true for the Windows semicolon but I'm not sure

[issue30824] Add mimetype for extension .json

2017-08-14 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- stage: needs patch -> backport needed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue30824] Add mimetype for extension .json

2017-08-14 Thread R. David Murray
R. David Murray added the comment: New changeset 8204b903683f9e0f037ccfaa87622716019914d7 by R. David Murray (Nate Tangsurat) in branch 'master': bpo-30824: Add mimetype for .json (#3048) https://github.com/python/cpython/commit/8204b903683f9e0f037ccfaa87622716019914d7

[issue31193] re.IGNORECASE strips combining character from lower case of LATIN CAPITAL LETTER I WITH DOT ABOVE

2017-08-14 Thread David MacIver
David MacIver added the comment: Sure, but 'i' is a single code point. The bug is that the regex matches 'i', not that it doesn't match the actual two codepoint lower case of the string. -- ___ Python tracker <rep...@bugs.python.org>

[issue31201] module test that failed doesn't exist

2017-08-14 Thread R. David Murray
R. David Murray added the comment: Yep, I figured that. That's why I suggested the clarification to the README, if someone wants to generate a PR for it. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31199] configure checks fail confusingly under --with-address-sanitizer if libasan is missing

2017-08-14 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- title: !HAVE_CLOCK_GETTIME causes problems with _PyTime_FromTimespec -> configure checks fail confusingly under --with-address-sanitizer if libasan is missing ___ Python tra

[issue31201] module test that failed doesn't exist

2017-08-14 Thread R. David Murray
R. David Murray added the comment: Replace "test_that_failed" with the name of the test that failed. The README could be improved by saying: If any tests fail, you can re-run the failing test(s) in verbose mode. For example if, 'test_os' and 'test_gdb' failed, you can run::

[issue31193] re.IGNORECASE strips combining character from lower case of LATIN CAPITAL LETTER I WITH DOT ABOVE

2017-08-13 Thread David MacIver
New submission from David MacIver: chr(304).lower() is a two character string - a lower case i followed by a combining chr(775) ('COMBINING DOT ABOVE'). The re module seems not to understand the combining character and a regex compiled with IGNORECASE will erroneously match a single lower

[issue31184] Fix data descriptor detection in inspect.getattr_static

2017-08-11 Thread David Halter
New submission from David Halter: inspect.getattr_static is currently not identifying data descriptors the right way. Data descriptors are defined by having a __get__ attribute and at least one of the __set__ and __delete__ attributes. Implementation detail: Both __delete__ and __get__ set

[issue31148] Can we get an MSI installer for something past 3.4.4?

2017-08-10 Thread R. David Murray
R. David Murray added the comment: Steve, when we changed installers was that when we also fixed the security/permissions problems with the install dir? If permissions are the issue the OP's problem may have nothing to do with it not being msi

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-08-10 Thread David K. Hess
David K. Hess added the comment: FYI, PR opened: https://github.com/python/cpython/pull/3062 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-08-10 Thread David K. Hess
Changes by David K. Hess <david_k_h...@mac.com>: -- pull_requests: +3096 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4963> ___

[issue31167] timedelta produced by datetime.__sub__ does not take Daylight Savings Time into account

2017-08-09 Thread R. David Murray
R. David Murray added the comment: It is by design. Read the footnote associated with the subtraction opertion on datetimes: after subtraction date2 + timedelta = date1, which implies that the subtraction ignores daylight savings transitions, since the addition does ("Note that no time

[issue31163] Return destination path in Path.rename and Path.replace

2017-08-09 Thread R. David Murray
R. David Murray added the comment: I agree. The normal python convention is that an immutable object returns the new value when an operation "changes" it, while a mutable object returns None. It seems like replace and rename should follow this convention (and that it

[issue31162] urllib.request.urlopen error

2017-08-09 Thread R. David Murray
R. David Murray added the comment: What makes you think this is a python bug rather than exactly what it says: a cert verification error? -- nosy: +r.david.murray ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31156] Stopiteration terminates while-loop

2017-08-09 Thread R. David Murray
R. David Murray added the comment: >>> while True: ... raise StopIteration ... Traceback (most recent call last): File "", line 2, in StopIteration -- nosy: +r.david.murray ___ Python tracker <rep...@bugs.python.org>

[issue31154] Path.replace and Path.rename naming, behavior and documentation

2017-08-09 Thread R. David Murray
R. David Murray added the comment: Both the replace and rename functions will remain in the API, as they mirror the os module, not the os itself. I agree that the naming is unfortunate, but it has the weight of history behind it, so we are stuck with it. Issue 24229 rejected adding a copy

[issue31148] Can we get an MSI installer for something past 3.4.4?

2017-08-08 Thread R. David Murray
R. David Murray added the comment: The short answer is no. We no longer use the MSI installer. Perhaps the windows experts will be interested in exploring why you can't use the current installers, since they work for most people. -- components: +Windows nosy: +paul.moore

[issue31143] lib2to3 requires source files for fixes

2017-08-08 Thread R. David Murray
R. David Murray added the comment: Ah, I see. We don't really support .pyc-only distribution, though we try not to break it. Do you want to propose a fix? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31143] lib2to3 requires source files for fixes

2017-08-08 Thread R. David Murray
R. David Murray added the comment: What are you reporting as the bug here? 2to3 obviously can't work without the source, so based just on what you have written here this sounds like an Azure bug. -- nosy: +r.david.murray ___ Python tracker <

[issue31136] raw strings cannot end with a backslash character r'\'

2017-08-08 Thread R. David Murray
R. David Murray added the comment: In fact, this ia a FAQ: https://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash -- nosy: +r.david.murray ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue31123] fnmatch does not follow Unix fnmatch functionality

2017-08-08 Thread R. David Murray
R. David Murray added the comment: That seems like a reasonable use case, but is fnmatch what git is using for this? If so, what is the feature set required? In any case, the existing functionality must remain as is for backward compatibility reasons, so this would either be a new function

[issue31129] RawConfigParser.items() is unusual in taking arguments

2017-08-06 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue31129] RawConfigParser.items() is unusual in taking arguments

2017-08-06 Thread R. David Murray
R. David Murray added the comment: For backward compatibility reasons this will not be changed. I don't know if the idea of adding a method and doing a documentation deprecation is worth it or not. -- nosy: +lukasz.langa, r.david.murray ___ Python

[issue5996] abstract class instantiable when subclassing dict

2017-08-06 Thread R. David Murray
R. David Murray added the comment: Closed issue 31127 as a duplicate of this one. -- nosy: +Kevin Shweh ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

[issue31127] Abstract classes derived from built-in classes don't block instance creation

2017-08-06 Thread R. David Murray
R. David Murray added the comment: This is a duplidate of issue 5996. It is not clear if we are going to treat it as a bug or a doc bug. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> abstract class insta

[issue31126] dict comprehension shouldn't raise UnboundLocalError

2017-08-06 Thread R. David Murray
R. David Murray added the comment: I wonder if that explanation should be added to the doc section to which I pointed. I thought I'd remembered something like that being in there, but it isn't. -- ___ Python tracker <rep...@bugs.python.org>

[issue29427] Option to skip padding for base64 urlsafe encoding/decoding

2017-08-06 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- nosy: +r.david.murray ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue31126] dict comprehension shouldn't raise UnboundLocalError

2017-08-06 Thread R. David Murray
R. David Murray added the comment: The behavior is consistent: >>> a = [1, 2] >>> b = [3, 4] >>> [(a, b) for a in a for b in b] Traceback (most recent call last): File "", line 1, in File "", line 1, in UnboundLocalError: local variable 'b'

[issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined"

2017-08-06 Thread R. David Murray
R. David Murray added the comment: By the way, if you want to open a doc issue with a suggestion of how to clarify this in the docs, that would be welcome. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined"

2017-08-06 Thread R. David Murray
R. David Murray added the comment: No, it should not. A DBM is not necessarily a single file. What you should be doing is creating a temporary *directory*, and opening your DB inside that. -- components: +Library (Lib) -IO nosy: +r.david.murray resolution: -> rejected st

[issue31123] fnmatch does not follow Unix fnmatch functionality

2017-08-04 Thread R. David Murray
R. David Murray added the comment: Looking at the fnmatch man page, it looks like there are option flags that some shells use that our fnmatch doesn't support. I'm not sure if supporting them is a good idea for us or not, but it is probably worth discussing. I suspect our fnmatch

[issue31123] fnmatch does not follow Unix fnmatch functionality

2017-08-04 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- type: behavior -> enhancement versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue31123] fnmatch does not follow Unix fnmatch functionality

2017-08-04 Thread R. David Murray
R. David Murray added the comment: I don't believe there is an equivalent unix command. Are you referring to the fnmatch glibc function? Can you demonstrate the differences? I doubt we will change the functionality, but that would be the minimum starting point for a discussion

[issue31117] Intersphinx file objects.inv missing 'list' from py:class

2017-08-03 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Built-in list disappeared from Python 2.7 intersphinx inventory ___ Python tracker <r

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-02 Thread R. David Murray
R. David Murray added the comment: Yeah, different developers have different opinions. We discuss (I'd say argue, which is accurate, but has acquired negative connotations) until we reach a consensus. And if we don't reach a consensus we leave it alone ("status quo wins a stal

[issue31111] Python 3.6 has an inaccessible attribute on FileNotFoundError

2017-08-02 Thread R. David Murray
R. David Murray added the comment: It is intended. See issue 30554. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Inaccessible attribute characters_written on OSErr

[issue31099] Timer error pop from empty deque/list

2017-08-01 Thread R. David Murray
R. David Murray added the comment: Perhaps I'm missing something, but isn't this to be expected? Timer will run d.popleft() repeatedly until you get the error you see because the list is empty. Are you thinking that setup is run each time? That would defeat its purpose. -- nosy

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-01 Thread R. David Murray
R. David Murray added the comment: The specialized use case is wanting to autogenerate a name with no other information provided. You suggested csv as one example where this would be used, but even in that case I'd rather see something based on the filename than a mashup of field names. I

[issue31089] email.utils.parseaddr fails on odd double quotes in multiline header

2017-08-01 Thread R. David Murray
R. David Murray added the comment: Yes, that is mostly likely why parseaddr operates the way it does. The old email package does not do very much hand-holding, it expects you to understand the RFCs, which as you note is a rather daunting task. The new email package (the new policies

[issue31085] Add option for namedtuple to name its result type automatically

2017-08-01 Thread R. David Murray
R. David Murray added the comment: I think the "vaguely" pretty much says it, and you are the at least the first person who has *requested* it :) This is one of those cost-versus-benefit calculations. It is a specialized use case, and in other specialized use cases the &quo

[issue31089] email.utils.parseaddr fails on odd double quotes in multiline header

2017-07-31 Thread R. David Murray
R. David Murray added the comment: Ah, I take it back. With \n it retains the \n in the decoded name field. There is a bug of some sort here (\r\n should be treated the same as \n, I think, whatever way it is treated). I don't think this is worth addressing, given that the new policies

[issue31089] email.utils.parseaddr fails on odd double quotes in multiline header

2017-07-31 Thread R. David Murray
R. David Murray added the comment: parseaddr does what you expect if the message has been read using universal newline mode (ie: the linesep is \n): >>> parseaddr('"=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=\n >>> =?UTF-8?Q?omo=C5=9Bci?=" <anita.wiec

[issue31071] *args unpacking can mask TypeErrors

2017-07-28 Thread R. David Murray
R. David Murray added the comment: Thanks for the report. Retitling because this has nothing to do with map: >>> def foo(*args): ... raise TypeError('fake') ... yield 1 ... >>> foo(1, *foo()) Traceback (most recent call last): File "", line 1, in Typ

[issue31065] Documentation for Popen.poll is unclear

2017-07-28 Thread R. David Murray
R. David Murray added the comment: Agreed. Explicit is good. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31065> ___ ___ Pyth

[issue31065] Documentation for Popen.poll is unclear

2017-07-28 Thread R. David Murray
R. David Murray added the comment: Yes we can add "otherwise return None". However it is pretty clear as is, since "poll" implies an immediate return, and if there's no return code to return, the logical value in Python to get back is None :) -- n

[issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name

2017-07-28 Thread R. David Murray
R. David Murray added the comment: Boy, I wasn't thinking very clearly when I wrote that. As pointed out on the PR, tempfile.TemporaryDirectory of course returns a TemporaryDirectory object. That's in the nature of Python. I was reading so poorly that I didn't even notice

[issue31042] Inconsistency in documentation of operator.index

2017-07-27 Thread R. David Murray
R. David Murray added the comment: I agree with Raymond. I'm not sure that adding roughly is going to decrease the possibility of confusion, but I won't object to it. In a way, it's too bad we didn't make the attribute lookup machinery look up all dunder methods on the class, so

[issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source"

2017-07-27 Thread R. David Murray
R. David Murray added the comment: No, we understand the process, the problem is that except for the 'dev' docs, the link would be to a branch other than master. That's the problem that we're discussing. Maybe instead of an edit link on non-dev docs we could have a message saying

[issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name

2017-07-27 Thread R. David Murray
R. David Murray added the comment: It actually returns the path, since "name" often means the last component of the path. Just saying "path" might be confused with pathlib, though. So I guess we'd have to say "returning its path as a string", which sounds a

[issue27715] call-matcher breaks if a method is mocked with spec=True

2017-07-27 Thread David Hoyes
David Hoyes added the comment: I came across a different failing test case, which looks a lot like the same issue: ``` from unittest import mock class Foo(object): def __call__(self, x): return x m = mock.create_autospec(Foo, instance=True) m(7) m.assert_called_once_with(7

[issue31052] smtplib not honoring bcc header

2017-07-26 Thread R. David Murray
R. David Murray added the comment: smtplib in 2.7 doesn't know anything about RFC822 or any of the replacement RFCs. sendmail accepts a *string*, and doesn't understand or modify anything about that string except the newlines. It is your responsibility not to *add* the BCC header. What you

[issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data

2017-07-26 Thread R. David Murray
R. David Murray added the comment: So you are saying that BytesIO has code that checks that its argument only has a single reference and modifies the string in place when it can if so? You can't depend on that in any other implementation of Python, and shouldn't depend on it in CPython

[issue31021] Clarify programming faq.

2017-07-25 Thread R. David Murray
R. David Murray added the comment: I think Terry and his OP are reacting to the fact that "-190 % 12 == -10" looks like it is saying that that expression is True in Python, which it is not (and that's the point). IMO, another issue is that "and then compilers that trunc

[issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data

2017-07-25 Thread R. David Murray
R. David Murray added the comment: I'm confused, I don't see how there can be any difference between (1) and (2). -- nosy: +r.david.murray ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols()

2017-07-24 Thread R. David Murray
R. David Murray added the comment: Well, the reason one *might* consider a test failure as a release blocker (and I'm not saying you should, I'm just explaining the possible logic) is that distros would understandably like the test suite to pass before they include a release

[issue30974] Update os.samefile docstring to match documentation

2017-07-20 Thread R. David Murray
R. David Murray added the comment: I would take "actual file" as meaning the file the symlink points to, so I'd say the documentation matches the implementation according to your description of the two. The current docs actually say "refer to the same file or directory",

[issue30973] Regular expression "hangs" interpreter

2017-07-20 Thread R. David Murray
R. David Murray added the comment: Right. We don't try to fix handling these kinds of exponential expressions. This is a case of "don't do that" :) (I don't know if the regex module is better at "handling" this kind of regex bug.) -- nosy: +r.david.murray reso

[issue30971] Improve code readability of json.tool

2017-07-19 Thread R. David Murray
R. David Murray added the comment: However, our general policy is that we don't make such changes unless we are also touching the code for other reasons. So I think using this PR as a base for your feature PRs, and then committing everything together if they are accepted, would be the way

[issue30970] return-value of filecmp.dircmp.report_*

2017-07-19 Thread R. David Murray
R. David Murray added the comment: Thanks for wanting to improve Python. However, the purpose of those function is to *print* the result. They intentionally do not have return values. All of the values that you would have these functions return are accessible via attributes already

[issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__`

2017-07-19 Thread R. David Murray
R. David Murray added the comment: I think you change is appropriate given that the "equivalent to" for the built in iterators contains the 'is' expression. However, I also think we should drop that second whole paragraph, and in the previous paragraph say "...but are

[issue30576] http.server should support HTTP compression (gzip)

2017-07-19 Thread R. David Murray
R. David Murray added the comment: Getting input from python ideas is a great idea :) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30956] ftplib behaves oddly if socket timeout is greater than the default

2017-07-18 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- type: crash -> behavior versions: +Python 3.6, Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue30956] ftplib behaves oddly if socket timeout is greater than the default

2017-07-18 Thread R. David Murray
R. David Murray added the comment: I changed the title to reflect the problem, but note that I'm *assuming* it is "greater than the default" that is the issue, I haven't actually tested that theory. -- title: ftplib socket timeout can't be handled -> ftplib behaves od

[issue30956] ftplib socket timeout can't be handled

2017-07-18 Thread R. David Murray
R. David Murray added the comment: I would like to leave this issue open. It is clear that the behavior for long timeouts does not match the docs, and that should be investigated if someone has the motivation :) -- resolution: works for me -> stage: resolved -> status:

[issue30960] Python script is failing to run

2017-07-18 Thread R. David Murray
R. David Murray added the comment: This is a bug tracker for Python. 3.2 is out of maintenance, so such a question is not appropriate for this forum. In any case it is an issue with your install, not with Python itself, so again not appropriate for this forum. You should ask for help

[issue30940] Documentation for round() is incorrect.

2017-07-18 Thread R. David Murray
R. David Murray added the comment: We don't need to burden Mark with doing a PR for this (unless he wants to). This is a good new contributer practice issue :) -- nosy: +r.david.murray ___ Python tracker <rep...@bugs.python.org>

[issue30956] ftplib socket timeout can't be handled

2017-07-17 Thread R. David Murray
R. David Murray added the comment: Given: import socket from ftplib import FTP try: ftp = FTP('host.i.know.will.hang.com', timeout=4) except socket.timeout: print('caught') I see 'caught' printed on the console. However, if I increase the timeout to 400, then on both 3.5 tip and 3.6

[issue30954] backport unittest.TestCase.assertLogs to 2.7?

2017-07-17 Thread R. David Murray
R. David Murray added the comment: There is, however, unittest2 on pypi that has most of the python3 features backported. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30954] backport unittest.TestCase.assertLogs to 2.7?

2017-07-17 Thread R. David Murray
R. David Murray added the comment: No. 2.7 is in maintenance mode and gets no new features. -- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.pytho

[issue30952] include Math extension in SQlite

2017-07-17 Thread R. David Murray
Changes by R. David Murray <rdmur...@bitdance.com>: -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30576] http.server should support HTTP compression (gzip)

2017-07-17 Thread R. David Murray
R. David Murray added the comment: I do not have a strong opinion on this issue, but I share Martin's doubts that it should be added. It certainly should not be on by default if it is added. We should get input from other core devs. -- nosy: +r.david.murray

<    9   10   11   12   13   14   15   16   17   18   >