[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-04 Thread R. David Murray
Change by R. David Murray : -- versions: +Python 3.7 ___ Python tracker <https://bugs.python.org/issue32215> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32217] freeze.py fails to work.

2017-12-04 Thread R. David Murray
R. David Murray added the comment: Does the 3.6.0 freeze fail under 3.6.0, or the 3.6.3 freeze fail under 3.6.3? If not, there's no bug to report. -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.org/is

[issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew'

2017-12-05 Thread R. David Murray
R. David Murray added the comment: Huh, I thought I had closed it. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue22589] mimetypes uses image/x-ms-bmp as the type for bmp files

2017-12-05 Thread R. David Murray
R. David Murray added the comment: If image/bmp is now[*] the official IANA type, mimetypes should use that. However, because this is a change with possible backward compatibility issues, it should probably only go into 3.7, but I'm open to arguments about that. [*] The mimetypes modu

[issue22589] mimetypes uses image/x-ms-bmp as the type for bmp files

2017-12-05 Thread R. David Murray
R. David Murray added the comment: That's the basis, but its a bit more complicated than that (NEWS item, putting bpo-22589 in the issue title, the question of signing a CLA, though a CLA doesn't really matter for this kind of change IMO). If you can't do it one of our

[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-05 Thread R. David Murray
R. David Murray added the comment: It disappears for me running it on linux with the blank added. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32229] Simplify hiding developer warnings in user facing applications

2017-12-06 Thread R. David Murray
R. David Murray added the comment: I haven't been following that discussion, and isolated from that that discussion the title of this issue and this proposal make no sense to me. Warnings are off by default, so you don't need to hide them. In what context does this get used?

[issue32229] Simplify hiding developer warnings in user facing applications

2017-12-06 Thread R. David Murray
R. David Murray added the comment: Ah, OK, that makes more sense. I don't run into warnings other than DeprecationWarnings in practice, so I tend to forget about them :) I think specifying warnings filters is pretty inscrutable, in ge

[issue32212] few discrepancy between source and docs in logging

2017-12-06 Thread R. David Murray
R. David Murray added the comment: It does matter, though, because in Python you can specify a positional argument as if it were a keyword argument if you use the name from the source rather than the documented name. We have made other doc corrections along these lines. We've even do

[issue22589] mimetypes uses image/x-ms-bmp as the type for bmp files

2017-12-08 Thread R. David Murray
R. David Murray added the comment: New changeset ede157331b4f9e550334900b3b4de1c8590688de by R. David Murray (Nitish Chandra) in branch 'master': bpo-22589 Changed MIME type of .bmp to "image/bmp" (#4756) https://github.com/python/cpython/commit/ede157331b4f9e550334

[issue22589] mimetypes uses image/x-ms-bmp as the type for bmp files

2017-12-08 Thread R. David Murray
R. David Murray added the comment: Thanks, nitishch. As I said, I'm not going to backport this unless someone advances an argument in favor that discusses the possible backward compatibility issue. (I'm not sure there are any significant ones, but someone needs to research it a

[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'

2017-12-10 Thread R. David Murray
R. David Murray added the comment: The second case is indeed the bug, as can be seen by running the examples against python2.7. It looks like this was probably broken by 7901b48a1f89 from issue 23171. -- components: +Library (Lib) -IO nosy: +r.david.murray stage: patch review

[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'

2017-12-10 Thread R. David Murray
R. David Murray added the comment: Serhiy, since it was your patch that probably introduced this bug, can you take a look? Obviously it isn't a very high priority bug, since no one has reported a problem (even this issue isn't reporting the change in behavior as a

[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-10 Thread R. David Murray
R. David Murray added the comment: > How about "[TYPE] object is not iterable/unpackable" I just grepped the docs, and the term 'unpackable' does not appear anywhere in them. I don't think this would be an improvement. As for the earlier suggestion of adding &q

[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-10 Thread R. David Murray
R. David Murray added the comment: I shouldn't have searched the docs for 'unpackable', I should have searched for 'unpack'. Doing that reveals that the term 'unpack' is used for other concepts, whereas the term 'iterable' is precise. So I think

[issue32267] strptime misparses offsets with microsecond format

2017-12-10 Thread R. David Murray
Change by R. David Murray : -- nosy: +belopolsky ___ Python tracker <https://bugs.python.org/issue32267> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-10 Thread R. David Murray
R. David Murray added the comment: Right, this is not a bug, it is working as documented. You could submit an enhancement request, but I'm surprised to find that anyone is actually using that module :) We unfortunately have multiple implementations of quoted printable handling in

[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread R. David Murray
Change by R. David Murray : -- nosy: +erik.bray ___ Python tracker <https://bugs.python.org/issue32287> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread R. David Murray
R. David Murray added the comment: It actually makes sense that a slice assignment with a different length replacement list with a step of 1 works but any other step doesn't. Logically you can see that you can cut out a chunk and replace it with a different sized chunk, but you can

[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-12 Thread R. David Murray
R. David Murray added the comment: We generally don't do advance type checking (look before you leap) in Python. This allows a type the programmer hadn't planned for to be used as long as it "quacks like" the expected type (this is called duck typing). So the error w

[issue32298] Email.quopriprime over-encodes characters

2017-12-12 Thread R. David Murray
R. David Murray added the comment: >From RFC 2047: (3) As a replacement for a 'word' entity within a 'phrase', for example, one that precedes an address in a From, To, or Cc header. The ABNF definition for 'phrase' from RFC 822 thus becomes:

[issue32298] Email.quopriprime over-encodes characters

2017-12-12 Thread R. David Murray
R. David Murray added the comment: And of course tools can grep for "f...@bar.com": you can't use encoded words in an address, only in the display name. However, it occurs to me that in fact the restriction applies only to phrases, so one could use a less restrictive char

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-13 Thread R. David Murray
R. David Murray added the comment: This is a consequence of the repr used by KeysView, which it inherits from MappingView. I agree that the result is surprising, but there may not be a generic fix. It's not entirely clear what KeysView should do here, but presumably we could at least

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-13 Thread R. David Murray
Change by R. David Murray : -- nosy: +csabella ___ Python tracker <https://bugs.python.org/issue32300> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-13 Thread R. David Murray
R. David Murray added the comment: Agreed about the other classes if we change this. Your solution looks reasonable to me. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-13 Thread R. David Murray
R. David Murray added the comment: Well, from our point of view it isn't a bad assumption, it's that muslc needs to be added to the list of exceptions. (I know almost nothing about this...I assume there is some reason we can't determine the stack size programatically?) Wo

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread R. David Murray
R. David Murray added the comment: I think we need people who do a lot of work at the C level to evaluate this, so I've added a couple to the nosy list :) -- nosy: +serhiy.storchaka, vstinner ___ Python tracker <https://bugs.python.org/is

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-14 Thread R. David Murray
R. David Murray added the comment: In quick search the only RFC reference to this I found was https://tools.ietf.org/id/draft-sweet-uri-zoneid-01.html, which doesn't match what you are requesting (not that urlsplit's current behavior matches that either). Do you have RFC

[issue32330] Email parser creates a message object that can't be flattened

2017-12-14 Thread R. David Murray
R. David Murray added the comment: What would you like to see happen in that situation? Should we use errors=replace like we do for headers? (That seems reasonable to me.) Note that it can be re-serialized as binary. -- ___ Python tracker

[issue32330] Email parser creates a message object that can't be flattened

2017-12-15 Thread R. David Murray
R. David Murray added the comment: I do wonder where you are using the string version of messages :) I actually thought I'd already done this (errors=replace), but obviously not. I don't have time now to work on a patch for this, and the patch in the other issue hasn't be upd

[issue32340] ValueError: time data 'N/A' does not match format '%Y%m%d'

2017-12-15 Thread R. David Murray
R. David Murray added the comment: This is not a bug in python. If it is your code contact the pyhon-list mailing for help. If you got whatsapp_xtract from somewhere else, contact that community with your questions. -- nosy: +r.david.murray resolution: -> third party st

[issue32276] there is no way to make tempfile reproducible (i.e. seed the used RNG)

2017-12-18 Thread R. David Murray
R. David Murray added the comment: IMO it is better to have an API that can be used when, for example, writing tests, than to monkey patch. On the other hand, I've never had an occasion when I cared about the names of tempfiles (or directories) in my test code, and it is hard to imag

[issue32361] global / nonlocal interference : is this a bug, a feature or a design hole ?

2017-12-18 Thread R. David Murray
Change by R. David Murray : -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.org/issue32361> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32366] suggestion:html.escape(s, quote=True) escape \n to

2017-12-18 Thread R. David Murray
R. David Murray added the comment: The point of html.escape is to sanitize a string that contains html such that *it does not get interpreted as html*. So adding html markup would go against its purpose. Further, including in an attribute value (which is the purpose of quote=True) would

[issue32361] global / nonlocal interference : is this a bug, a feature or a design hole ?

2017-12-18 Thread R. David Murray
R. David Murray added the comment: What is happening here is that what nonlocal does is give the function containing the nonlocal statement access to the "cell" in the parent function that holds the local variable of that function. When you use a global statement, the name instead

[issue32361] global / nonlocal interference : is this a bug, a feature or a design hole ?

2017-12-19 Thread R. David Murray
R. David Murray added the comment: Right, it was indeed "designed that way" in the sense that nolocal was only ever intended to access variables from the surrounding local scope, *not* the global scope. If you put a variable name in the global scope, nonlocal was not intended to

[issue32361] global / nonlocal interference : is this a bug, a feature or a design hole ?

2017-12-19 Thread R. David Murray
R. David Murray added the comment: When I said "the only thing keeping this issue open" is the message, I should acknowledge that you mentioned clarifying the documentation, but as I pointed out the documentation is already clear: it says nonlocal does not access variables in

[issue32361] global / nonlocal interference : is this a bug, a feature or a design hole ?

2017-12-19 Thread R. David Murray
R. David Murray added the comment: Hmm. I suppose that could be clarified in the docs. I would find it very counter-intuitive for the grandparent 'a' to be accessible, which is probably why I did not consider that an issue. -- ___ Pyth

[issue32376] Unusable syntax error reported when Python keyword in a f-string

2017-12-19 Thread R. David Murray
R. David Murray added the comment: The existing issue is #29051. -- nosy: +r.david.murray resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Improve error reporting involving f-stri

[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-19 Thread R. David Murray
R. David Murray added the comment: That's type checking. Not type checking is to call the method that writes the data, expecting the object to handle the bytes it is passed, and then that object raises an error to indicate that it cannot. There is no protocol that can be checke

[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-19 Thread R. David Murray
R. David Murray added the comment: Yes, if that protocol existed the errors would be clearer. But it doesn't, for historical reasons, and that is unlikely to change. You are welcome to submit an enhancement request to make quopri accept string as an argument when decoding. But

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2017-12-20 Thread R. David Murray
Change by R. David Murray : -- keywords: +3.6regression ___ Python tracker <https://bugs.python.org/issue32381> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32384] Generator tests is broken in non-CPython implementation

2017-12-20 Thread R. David Murray
Change by R. David Murray : -- nosy: +yselivanov type: enhancement -> behavior ___ Python tracker <https://bugs.python.org/issue32384> ___ ___ Python-bugs-lis

[issue32389] urllib3 wrong computation of 'Content-Length' for file upload

2017-12-20 Thread R. David Murray
R. David Murray added the comment: Yes, this would appear to be both 3rd party and a support request rather than a bug report. Gianguido: please work with the urllib3 community, or post to the python-list mailing list. If you identify an actual bug in Python itself, you can come back here

[issue32323] urllib.parse.urlsplit() must not lowercase() IPv6 scope value

2017-12-21 Thread R. David Murray
R. David Murray added the comment: I don't think a zone id in that form is actually valid in a URI, but I agree that not messing with whatever is there is probably the best policy as long as we aren't directly supporting whatever

[issue32398] GDAL compilation error

2017-12-21 Thread R. David Murray
R. David Murray added the comment: Please describe the problem and your proposed solution in more detail and in terms of CPython, so that it can be discussed by the relevant experts. GDAL is a third party product and only relevant as an example, so it would also be good to come up with a

[issue32398] OSX C++ linking workaround in distutils breaks other packages

2017-12-21 Thread R. David Murray
R. David Murray added the comment: I doubt we can make the change this way for backward compatibility reasons. That doesn't mean the situation can't be improved, though. -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Pyth

[issue32405] clr: AttributeError: 'module' object has no attribute 'AddReference'

2017-12-21 Thread R. David Murray
R. David Murray added the comment: Whatever clr is, it doesn't look like it is part of the Python standard library. Please contact the clr community for support on this package, or post to the python-list mailing list. -- nosy: +r.david.murray resolution: -> third par

[issue32407] lib2to3 doesn't work when zipped

2017-12-22 Thread R. David Murray
R. David Murray added the comment: Duplicate of issue 24960. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Can't use lib2to3 with embeddable zip file. ___ Pytho

[issue32407] lib2to3 doesn't work when zipped

2017-12-22 Thread R. David Murray
R. David Murray added the comment: Funny, you are already nosy on that issue. Does this one have a different goal, or did you just forget about that one? -- ___ Python tracker <https://bugs.python.org/issue32

[issue32412] help() of bitwise operators should mention sets as well

2017-12-23 Thread R. David Murray
R. David Murray added the comment: Which help are you talking about? The Operator Precedence table that you get if you do, eg: help('&')? I don't think it would be appropriate to mention specialized uses of the operators there, although perhaps we could add a general

[issue32419] Add unittest support for pyc projects

2017-12-24 Thread R. David Murray
R. David Murray added the comment: Éric: in python3 if no .py is found but a .pyc is found where the .py is expected, it will be imported and run. This supports sourceless package distributions, which is something we only sorta-support :) The change looks simple enough that it might be

[issue32419] Add unittest support for pyc projects

2017-12-25 Thread R. David Murray
R. David Murray added the comment: There may be now, but I don't think there was when unittest was written. Also, if someone decided to use namespace packages for tests for some reason, the current check would also probably fail, so it may be worth looking for (or creating if need

[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-12-27 Thread R. David Murray
R. David Murray added the comment: I don't think the PR as it stands is a good idea. These classes are designed to be composable, so it should be up to the library user whether or not to use threads. However it would be perfectly reasonable to choose to use threads in the 'test

[issue32431] Two bytes objects of zero length don't compare equal

2017-12-27 Thread R. David Murray
R. David Murray added the comment: My suspicion is that this behavior/code is left over from when the code was handling strings in python2, where strings were always null terminated and so the equal-bytes test would always pass. I don't think this is appropriate for bytes objects,

[issue32431] Two bytes objects of zero length don't compare equal

2017-12-27 Thread R. David Murray
R. David Murray added the comment: I think what Py_SIZE "means" depends on the object type in the general case, not just this one, so documenting that it is mucking with the internal representation is probably the way to go. -- ___ Pyth

[issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation

2017-12-28 Thread R. David Murray
R. David Murray added the comment: Paul Ganssle: Even if Andrew were not suggesting adding copy to the C implementation (I have no opinion on that currently), it would still be correct to maintain backward compatibility in the python version in the standard library. We do not consider the

[issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation

2017-12-28 Thread R. David Murray
R. David Murray added the comment: Yes, that's why I said "from our point of view" :) I know there is usually a fork in the practical sense, but we want to make it as easy as practical to sync that fork, which includes not breaking things in the python versions with

[issue32420] LookupError : unknown encoding : [0x7FF092395AD0] ANOMALY

2017-12-28 Thread R. David Murray
R. David Murray added the comment: Well, it's not obvious that it has anything to do with CPython itself. You should probably work with the community responsible for tensorflow, whatever that is, and if they find a bug in CPython you can come back here with a report. Given the

[issue32444] python -m venv has incongruous behavor creating binaries

2017-12-29 Thread R. David Murray
R. David Murray added the comment: This is a feature that actually supports your use case, as well as the use cases of those who *don't* want to strap the python version: you get what you ask for. If you call venv with 'python3', you get a venv that will use your new python

[issue32444] python -m venv symlink dependency on how python binary is called is not documented

2017-12-29 Thread R. David Murray
R. David Murray added the comment: Actually, I'm going to reopen this as a doc issue because this behavior is not discussed by the docs that I can see, and it is important to know about when creating a venv. -- assignee: -> docs@python components: +Documentation -Library (L

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-29 Thread R. David Murray
R. David Murray added the comment: Correct, a new feature should always get a what's new entry. You could submit a PR for it :) -- ___ Python tracker <https://bugs.python.org/is

[issue32448] subscriptable

2017-12-29 Thread R. David Murray
R. David Murray added the comment: At the point at which that error is raised, Python doesn't know the name of the attribute, nor is attribute access the only place where that particular error report is triggered (it's in a generic subscript-this-object call). So I doubt doing thi

[issue32449] MappingView must inherit from Collection instead of Sized

2017-12-29 Thread R. David Murray
R. David Murray added the comment: Well, it would be a backward compatibility problem at a minimum. Obviously things were designed this way. Have you found out why? Is there a consensus on python-ideas that this should be changed? If so, please link to the thread. -- nosy

[issue32451] python -m venv activation issue when using cygwin on windows

2017-12-30 Thread R. David Murray
R. David Murray added the comment: cygwin in not currently fully supported (there are people working on it, though). Can you determine if this is a bug in cygwin's bash support, or something else? It certainly works with bash shell on unix. I would presume that from cygwin one would

[issue32452] Brackets and Parentheses used in an ambiguous way

2017-12-30 Thread R. David Murray
R. David Murray added the comment: "round brackets" would require just as much thought (if not more...it's not a thing at all in American typographical language) for an American to understand as the unadorned bracket does for the rest of you, so the best compromise is "pa

[issue32448] subscriptable

2017-12-30 Thread R. David Murray
R. David Murray added the comment: Well, in that case having 'organizer' in the error message wouldn't help you untangle your code ;) -- ___ Python tracker <https://bugs.pyt

[issue32462] mimetypes.guess_type() returns incorrectly formatted type

2017-12-31 Thread R. David Murray
R. David Murray added the comment: You can get the same "bad" behavior on a posix system by having a mimetypes file with an incorrect entry in it. That would be a system misconfiguration, as is your Windows registry case, and is outside of Python's control. I suppose w

[issue32474] argparse nargs should support string wrapped integers too

2017-12-31 Thread R. David Murray
R. David Murray added the comment: Why? What's the motivation for supporting this? There's no reason that I can think of, so I'm curious what your use case is. -- nosy: +r.david.murray ___ Python tracker <https://bugs.pyt

[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-01 Thread R. David Murray
R. David Murray added the comment: New changeset f190eb59e60e2ae7a7cbd396458389a7a076e0d3 by R. David Murray (Emily Morehouse) in branch 'master': bpo-32452: clarify term 'brackets' in generator tutorial (#5079) https://github.com/python/cpython/commit/f190eb59e60e2ae7a7cb

[issue32474] argparse nargs should support string wrapped integers too

2018-01-01 Thread R. David Murray
R. David Murray added the comment: Agreed. I don't think there is sufficient motivation for doing this, and there are downsides as Eric has pointed out. Rejecting. -- resolution: -> rejected stage: patch review -> resolved status: ope

[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread R. David Murray
R. David Murray added the comment: New changeset f24c1857a8a1ba3efb3f957d43371bc9499e3c86 by R. David Murray (Miss Islington (bot)) in branch '3.6': bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5081) https://github.com/p

[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread R. David Murray
R. David Murray added the comment: It looks like the docs job hung on the 2.7 backport, but I don't see how to restart it. -- ___ Python tracker <https://bugs.python.org/is

[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread R. David Murray
R. David Murray added the comment: New changeset 0e0d1017a4c8ad6f77ee42d7b640463058037f62 by R. David Murray (Miss Islington (bot)) in branch '2.7': bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082) https://github.com/p

[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread R. David Murray
R. David Murray added the comment: Thanks, Mariatta. I did click on the details link, so either the restart link isn't obvious or I don't have the correct permissions to do a restart :) And thanks Emily for doing the PR. -- resolution: -> fixed stage: patch revie

[issue32487] assertRaises should return the "captured" exception

2018-01-03 Thread R. David Murray
R. David Murray added the comment: This has been proposed and rejected before, for example in issue 28135. If you want to pursue it you'll need to start a thread on python-ideas. -- nosy: +r.david.murray resolution: -> duplicate stage: needs patch -> resolved status: ope

[issue32488] Fatal error using pydoc

2018-01-03 Thread R. David Murray
Change by R. David Murray : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker <https://bugs.python.org/issue32488> ___ ___ Python-bug

[issue32491] base64.decode: linebreaks are not ignored

2018-01-03 Thread R. David Murray
R. David Murray added the comment: This reduces to the following: >>> from binascii import a2b_base64 as f >>> f(b'MTIzND\nU2Nzg5\n') b'123456789' >>> f(b'MTIzND\n') Traceback (most recent call last): File "", line 1, in b

[issue17972] inspect module docs omits many functions

2018-01-04 Thread R. David Murray
R. David Murray added the comment: I think adding an __all__ in 3.7 would be reasonable. You are right that we can't simply rename them for backward compatibility reasons. We could rename them, and leave a stub function (that calls the renamed function) but issues a deprecation wa

[issue17972] inspect module docs omits many functions

2018-01-05 Thread R. David Murray
R. David Murray added the comment: Just warnings, no docs. We've done this before for other helper functions, but it is always a judgement call whether it is worth the churn. I defer to those people who have actually done work on the module for the answer to that que

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-05 Thread R. David Murray
R. David Murray added the comment: If you read the traceback the message is "correct" for some definition of correct: the right hand side controls the type of the expression, so it is objecting to trying to look for the string '%' in a bytes object. There are probabl

[issue32501] Documentation for dir([object])

2018-01-06 Thread R. David Murray
R. David Murray added the comment: This is a general property of dunder methods in python3, and I think we have chosen not to change the wording when this has come up in other contexts. I'm not sure, though. -- nosy: +r.david.murray ___ P

[issue32501] Documentation for dir([object])

2018-01-06 Thread R. David Murray
R. David Murray added the comment: I'm not sure, but the discussion I remember was that it would require changes to an awful lot of places in the docs that would make the docs harder to read. It is very seldom in normal Python coding that an object has a method that it does *not* get

[issue32509] doctest syntax ambiguity between continuation line and ellipsis

2018-01-06 Thread R. David Murray
R. David Murray added the comment: What happens if you print a placeholder line first, before your test output? I'm not sure it will work, I seem to remember something about an ellipses starting a line just not being supported, but it was a long time ago... So, that doesn't work

[issue32509] doctest syntax ambiguity between continuation line and ellipsis

2018-01-06 Thread R. David Murray
R. David Murray added the comment: Ah, I see my answer crossed with your post :) -- ___ Python tracker <https://bugs.python.org/issue32509> ___ ___ Python-bug

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-07 Thread R. David Murray
R. David Murray added the comment: We generally don't do type checking (see discussions of "duck typing"). We generally do just let the implementation detail bubble up. I don't think the encoding suggestion works, since we can't know what encoding the byte string i

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-07 Thread R. David Murray
R. David Murray added the comment: I think Nick was the last one who touched the byte/string issues in urllib, so I've nosied him. We'll see what he thinks (but this tracker accepts enhancement proposals as long as they are smallish ones). -- nosy:

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-08 Thread R. David Murray
R. David Murray added the comment: Yes, I would say it is. Note that this isn't going to get "fixed" in 2.7, because 2.7 doesn't get new features, and the proposed change to the CLI is a new feature. As noted in that issue discussion we aren't going to change the

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-09 Thread R. David Murray
R. David Murray added the comment: In particular, if we don't already have an example of using the threading mixin we should, so a doc RFE to add that would be nice. -- ___ Python tracker <https://bugs.python.org/is

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-09 Thread R. David Murray
R. David Murray added the comment: Well, it does support a persistent connection, but that connection lasts until it is shut down from the other side. Documentation improvement suggestions are welcome. -- ___ Python tracker <ht

[issue33547] Relative imports do not replace local variables

2018-05-16 Thread R. David Murray
R. David Murray added the comment: It's importing 'a' from '.', which I guess in this context means from the current namespace (__main__), and a is 7. You'll note that 'b' did get repointed, but it got repointed to what 'a' points to, in

[issue33547] Relative imports do not replace local variables

2018-05-18 Thread R. David Murray
R. David Murray added the comment: It's the same answer. __init__ *is* the package namespace, so you are setting the value of 'func' in the package (.) namespace, and what import is doing is correct. I know this is confusing. I banged my head against it while debugging

[issue33547] Relative imports do not replace local variables

2018-05-18 Thread R. David Murray
R. David Murray added the comment: Yes, you are substantially correct. A subtlety that may enhance your understanding (if it doesn't instead totally confuse you :) is that __init__ is simply the most straightforward way to affect the module namespace. You would see the same phenomen

[issue33581] Document "optional components that are commonly included in Python distributions."

2018-05-21 Thread R. David Murray
R. David Murray added the comment: As I understand it, we don't control or know what that list is, it depends on each distribution's policies. -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.o

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-05-21 Thread R. David Murray
R. David Murray added the comment: I'm fairly certain (though not 100%, obviously :) that coercing first and then sorting would be accepted if someone wants to create a PR for this. -- nosy: +r.david.murray versions: +Python 3.8 ___ Python tr

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-05-21 Thread R. David Murray
R. David Murray added the comment: json keys *are* strings, so the fact that we support other object types as keys and coerce them to strings is an "extra feature" of python, and is actually a somewhat questionable feature. The reproducible use case is solved by the fact that dic

[issue33590] sched.enter priority has no impact on execution

2018-05-21 Thread R. David Murray
R. David Murray added the comment: I think Ronald is correct. The priority argument for enter would apply if you called enter twice with two different delays, but they happen to end up pointing to the same moment in time from the scheduler's point of view. How would the computer know

[issue33633] smtplib msg['To] = appends instead of assigning

2018-05-24 Thread R. David Murray
R. David Murray added the comment: smtplib doesn't define any behavior for messages. I presume you are talking about the email library? Vis the print behavior, dict-style lookup is defined to return the first matching header. If you want to see all of them, you can use get_all.

[issue33636] Unexpected behavior with * and arrays

2018-05-24 Thread R. David Murray
R. David Murray added the comment: I wrote up a response before Mark closed the issue, so despite his excellent no discussion suggestion I'm going to post it for the edification of anyone reading the issue later rather than waste the work :) Nathan: this is *long* established behavi

[issue33647] Make string.replace accept a dict instead of two arguments

2018-05-25 Thread R. David Murray
R. David Murray added the comment: That is not kwargs, that's a passing a dict. Which is what you would want, since the strings you want to replace might not be valid identifiers, and so couldn't be passed as keyword arguments. I think I'm -0.5 on this. I don't think

<    53   54   55   56   57   58   59   60   61   62   >