[issue31398] TypeError: gdbm key must be string, not unicode

2017-09-09 Thread R. David Murray
R. David Murray added the comment: In python3, u"a" and "a" are the same thing. The equivalent in python3 would bee b"a" vs "a", but I have no idea if we even support bytes keys in python3 gdbm. In 2.7 does has_key(u"x") work if x

[issue31401] Dynamic compilation that uses function in comprehension fails when compiled inside function

2017-09-09 Thread R. David Murray
R. David Murray added the comment: Could you please post the examples instead of a zip file? Zip files are hard to read on a mobile browser :) -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.org/issue31

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-09-09 Thread R. David Murray
R. David Murray added the comment: Users on linux can and do screw this up too. I believe we also had a case where a distro screwed up the defaults for, I think, the reverse resolve? Not sure which test that was, and the test may since been fixed to not depend on that. The point is this

[issue31401] Dynamic compilation that uses function in comprehension fails when compiled inside function

2017-09-09 Thread R. David Murray
R. David Murray added the comment: This is indeed not a bug, it it a consequence of the scoping rules. What surprises me is that it works without passing in an explicit scope in in 3.7. I'm not sure what we changed that makes that

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

2017-09-09 Thread R. David Murray
R. David Murray added the comment: I managed to finish the rewrite, and it does fix this issue. I'll probably post the PR tomorrow. -- ___ Python tracker <https://bugs.python.org/is

[issue30788] email.policy.SMTP.fold() issue for long filenames with spaces

2017-09-09 Thread R. David Murray
R. David Murray added the comment: Thanks for the PR, but I've managd to finish my rewrite of the folder so that it not only doesn't traceback on this, but correctly folds it. I'll probably post the PR tomorrow. -- ___ Python

[issue30788] email.policy.SMTP.fold() issue for long filenames with spaces

2017-09-10 Thread R. David Murray
Changes by R. David Murray : -- keywords: +patch pull_requests: +3479 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue30788> ___ ___ Py

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

2017-09-10 Thread R. David Murray
Changes by R. David Murray : -- keywords: +patch pull_requests: +3478 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread R. David Murray
R. David Murray added the comment: Thanks for wanting to improve Python, but we don't usually accept refactoring requests like this. We "fix" such issues when the code is touched for other reasons. We'll see what other developers think, though. -- n

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread R. David Murray
R. David Murray added the comment: Anyone who uses stdlib code as examples of best practice doesn't understand the history of stdlib code. Generally, we consider the danger of introducing bugs to be more significant than the benefit of the "cleanup" changes. The fact that you

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-09-11 Thread R. David Murray
R. David Murray added the comment: Seems like it ought to be possible to use the same hooks that venv uses to make this work, but I haven't looked at the details of how those work. -- nosy: +r.david.murray ___ Python tracker &

[issue31417] Use the enumerate function where appropriate

2017-09-11 Thread R. David Murray
R. David Murray added the comment: Mark: Yeah, I think my comment was directed more to haypo than you :) -- ___ Python tracker <https://bugs.python.org/issue31

[issue31401] Dynamic compilation that uses function in comprehension fails when compiled inside function

2017-09-12 Thread R. David Murray
R. David Murray added the comment: Hmm. I must have made a mistake when I ran (jpc's) test on 3.7. It is failing with the NameError for me when I try it again. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: compile err

[issue31370] Remove support for threads-less builds

2017-09-12 Thread R. David Murray
R. David Murray added the comment: dummy_threading should definitely not have been removed, and like all the other APIs should not be removed until 2.7 is dead. Deprecating it is of course fine :) -- nosy: +r.david.murray ___ Python tracker

[issue31370] Remove support for threads-less builds

2017-09-12 Thread R. David Murray
R. David Murray added the comment: And actually, I wouldn't be surprised if eventlet depended on the *functionality* in _dummy_threading, so you probably need to restore that, too. -- ___ Python tracker <https://bugs.python.org/is

[issue31435] Addition giving incorrect result in certain circumstances

2017-09-12 Thread R. David Murray
R. David Murray added the comment: https://docs.python.org/3/tutorial/floatingpoint.html -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.org/issue31

[issue31438] IDLE 3 crashes and quits when caret character typed

2017-09-12 Thread R. David Murray
R. David Murray added the comment: Have you followed the instructions on this page?: https://www.python.org/download/mac/tcltk/ -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.org/issue31

[issue31441] Descriptor example in documentation is confusing, possibly wrong

2017-09-13 Thread R. David Murray
R. David Murray added the comment: Here is a not-much-more-complicated version that solves the problem. It is probably worth changing as the revised example makes clear the difference between self and obj, which is an important distinction. class RevealAccess(object

[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-13 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.org/issue31447> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31449] Potential DoS Attack when Parsing Email with Huge Number of MIME Parts

2017-09-13 Thread R. David Murray
R. David Murray added the comment: 10 million mime parts? That sounds like the kind of thing rfc 1870 was designed to address in a more general fashion (ie: the SMTP server should be enforcing maximum message size if you are worried about DOS attacks). 1 million = 3 seconds, 10 million

[issue31454] Include "import as" in documentation

2017-09-13 Thread R. David Murray
R. David Murray added the comment: Where do you find that it is not documented that you would expect it to be? Because 'import' 'as' is certainly documented. -- nosy: +r.david.murray ___ Python tracker <https://bug

[issue31353] Implement PEP 553 - built-in debug()

2017-09-13 Thread R. David Murray
R. David Murray added the comment: It is a new feature, so no it would not be backported. -- nosy: +r.david.murray type: -> enhancement ___ Python tracker <https://bugs.python.org/issu

[issue31469] Running inside docker container from non-root user

2017-09-14 Thread R. David Murray
R. David Murray added the comment: It sounds like docker is just broken (I would expect unix tools to work in a docker container). That however is beside the point. I believe this is a duplicate of issue 10496, but I don't know why it hasn't been fixed. -- nosy: +r.da

[issue31469] Running inside docker container from non-root user

2017-09-14 Thread R. David Murray
Changes by R. David Murray : -- superseder: -> Python startup should not require passwd entry ___ Python tracker <https://bugs.python.org/issue31469> ___ _

[issue10496] Python startup should not require passwd entry

2017-09-14 Thread R. David Murray
R. David Murray added the comment: Unless I'm mistaken, this has come up again in issue 31469. -- nosy: +cinerar, r.david.murray ___ Python tracker <https://bugs.python.org/is

[issue31454] Include "import as" in tutorial

2017-09-14 Thread R. David Murray
R. David Murray added the comment: I agree that it would seem reasonable to add this to section 6.1 of the tutorial, since it mentions both import statement variants and the modules "global symbol table", which are the two concepts involved in import as. Would you like to pr

[issue31454] Include "import as" in tutorial

2017-09-14 Thread R. David Murray
Changes by R. David Murray : -- versions: +Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue31454> ___ ___ Python-bugs-list mailin

[issue31475] Bug in argparse - not supporting utf8

2017-09-14 Thread R. David Murray
R. David Murray added the comment: As I requested in the PR, please provide a way to reproduce the bug you are reporting. -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.org/issue31

[issue31475] Bug in argparse - not supporting utf8

2017-09-14 Thread R. David Murray
R. David Murray added the comment: Note that as far as I know without a reproducer, it is confusing to me to talk about argparse supporting or not supporting utf8. It deals only with text strings, which are unicode. Or is this a 2.7 only bug report? (Although even there it would be a

[issue31454] Include "import as" in tutorial

2017-09-14 Thread R. David Murray
R. David Murray added the comment: Well, this is all volunteer work. Maybe someone else will feel like doing it :) -- ___ Python tracker <https://bugs.python.org/issue31

[issue10496] Python startup should not require passwd entry

2017-09-16 Thread R. David Murray
R. David Murray added the comment: Dmitriy: you will note from the discussion on this issue that your "simple patch" was not considered sufficient. There were additional concerns voiced about haypo's patch, which is why I guess it didn't get applied. However, can you rev

[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__

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

[issue31021] Clarify programming faq.

2017-09-18 Thread R. David Murray
R. David Murray added the comment: I think there is nothing to do here unless Mark likes my suggestion and/or someone comes up with an even better improvement. -- ___ Python tracker <https://bugs.python.org/issue31

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2017-09-18 Thread R. David Murray
R. David Murray added the comment: You have to remember that the most useful way to think about python slice indexes is that they point between characters. Consider, for example, that you have a starting index of something, and you are looking backward in the string for a trailing delimiter

[issue31507] email.utils.parseaddr has no docstring

2017-09-18 Thread R. David Murray
R. David Murray added the comment: Mark: re your training course...if you aren't trying to stay compatible with python2, note that python3 has a much more sophisticated address parser now, that gets called automatically if you use the new policies. -- components: +email nosy: +

[issue31498] Default values for zero in time.strftime()

2017-09-18 Thread R. David Murray
R. David Murray added the comment: Generally we're just reporting whatever the platform strftime does. Is that what happens in this case? -- nosy: +belopolsky, r.david.murray ___ Python tracker <https://bugs.python.org/is

[issue31513] Document structure of memo dictionary to enable more advanced __deepcopy__ uses

2017-09-18 Thread R. David Murray
R. David Murray added the comment: Unless I'm mistaken (and someone will correct me and reopen the issue if I am :) it is intentionally undocumented. A proposal for a documented protocol of some sort is certainly a possibility, but is something that should start with a discussion o

[issue24243] behavior for finding an empty string is inconsistent with documentation

2017-09-18 Thread R. David Murray
R. David Murray added the comment: I'm not Raymond, but he is correct. This is an example of "taking advantage of the corner cases", and is something Python does a lot of, especially around strings and slices. The current behavior was carefully considered and has us

[issue31498] Default values for zero in time.strftime()

2017-09-19 Thread R. David Murray
R. David Murray added the comment: Well, the first question that needs to be answered is: if you call the C strftime with the same arguments, what result do you get? Because if it is the C strftime doing this, then it is not a bug in Python, whether it is correct behavior or not

[issue31519] Negative number raised to even power is negative (-1 ** even = negative)

2017-09-19 Thread R. David Murray
R. David Murray added the comment: You are being tripped up by operator precedence: >>> -1**2 -1 >>> (-1)**2 1 -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracke

[issue31519] Negative number raised to even power is negative (-1 ** even = negative)

2017-09-19 Thread R. David Murray
R. David Murray added the comment: It's a FAQ, but it was faster for me to just cut and paste than it was to look up the FAQ link :) -- ___ Python tracker <https://bugs.python.org/is

[issue31498] Default values for zero in time.strftime()

2017-09-19 Thread R. David Murray
R. David Murray added the comment: Yes, I think we can "fix" some things. I don't know if this falls into the class of things we should fix. I'll leave that decision to people with more experience with time stuff. -- ___ Py

[issue31507] email.utils.parseaddr has no docstring

2017-09-19 Thread R. David Murray
R. David Murray added the comment: New changeset 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2 by R. David Murray (Rohit Balasubramanian) in branch 'master': bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (gh-3647) https://github.com/python/cpyt

[issue31524] mailbox._mboxMMDF.get_message throws away From envelope

2017-09-19 Thread R. David Murray
R. David Murray added the comment: It looks like it is saving it (the set_from line). Do you have a test that proves otherwise? -- ___ Python tracker <https://bugs.python.org/issue31

[issue31524] mailbox._mboxMMDF.get_message throws away From envelope

2017-09-19 Thread R. David Murray
R. David Murray added the comment: It just needs to call set_unixfrom as well as set_from. I don't know why the MMDFMessage tracks it separately, but I'm sure the author had a reason that seemed good at the time :) -- ___ Python track

[issue31443] Possibly out of date C extension documentation

2017-09-20 Thread R. David Murray
R. David Murray added the comment: We do not currently officially support cygwin. There are people working on getting it working again (and having a buildbot) so we can support it, so cygwin support is a goal, but not currently a requirement. I've nosied Erik Brey, who is one of the

[issue31539] asyncio.sleep may sleep less time then it should

2017-09-21 Thread R. David Murray
R. David Murray added the comment: I can't reproduce this on a linux VM with 3.7 tip. I don't currently have a windows instance to test against. -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.o

[issue24925] Allow doctest to find line number of __test__ strings if formatted as a triple quoted string.

2018-11-26 Thread R. David Murray
R. David Murray added the comment: Without looking at doctest.py, yes. I believe the doctests in that file should be already plugged in to the unittest framework, so adding new testcase containing a non-doctest unit test should work fine

[issue35342] email "default" policy raises exception iterating over unparseable date headers

2018-11-28 Thread R. David Murray
R. David Murray added the comment: This is effectively a duplicate of #30681, which has a solution, although it is not yet in final form per the last couple of comments on the issue and the PR. -- resolution: -> duplicate stage: -> resolved supe

[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2018-11-28 Thread R. David Murray
R. David Murray added the comment: Reported again in issue #35342. The existing PR is close to complete, but needs adjusted for the fact that we want (and want to document) that the utility raises errors (ie: catch the error in the header parser rather than having the utility return None

[issue31715] Add mimetype for extension .mjs

2018-12-05 Thread R. David Murray
R. David Murray added the comment: We have generally made an exception to the "new feature" rule for mimetypes. That is, we don't really consider a mimetype addition to be a new feature in the sense that our backward compatibility rules mean. It is true that an applicatio

[issue25545] email parsing docs: clarify that only ASCII strings are supported

2018-12-05 Thread R. David Murray
R. David Murray added the comment: The problem comes from thinking you can parse an arbitrary email message if it is in unicode form. *YOU CANNOT DO THAT* in the general case (ie: non-ascii attachments). That said, the new email package API is designed to facilitate "off label"

[issue35403] support application/wasm in mimetypes and http.server

2018-12-10 Thread R. David Murray
R. David Murray added the comment: We don't generally add a mime type until it is a de-jure or de-facto standard. If it is still in testing it is probably too soon to add it. For testing, you can always add it yourself in your code via the api that mimetypes pro

[issue35547] email.parser / email.policy does not correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers

2018-12-22 Thread R. David Murray
R. David Murray added the comment: Here's a patch that makes the example work correctly. This is not a fix, a real fix will be more complicated. This just demonstrates the kind of thing that needs fixing and where. The existing parser produces a sub-optimal parse tree as its result.

[issue35625] Comprehension doc doesn't mention buggy class scope behavior

2019-01-06 Thread R. David Murray
Change by R. David Murray : -- components: -email nosy: -barry, r.david.murray type: security -> behavior ___ Python tracker <https://bugs.python.org/issu

[issue35625] Comprehension doc doesn't mention buggy class scope behavior

2019-01-06 Thread R. David Murray
Change by R. David Murray : Removed file: https://bugs.python.org/file48026/keyfile.png ___ Python tracker <https://bugs.python.org/issue35625> ___ ___ Python-bugs-list m

[issue4696] email module does not unfold headers

2019-01-06 Thread R. David Murray
R. David Murray added the comment: The new email API is no longer provisional. It isn't the *default* yet, but it isn't provisional. So yes, this is resolved. Cheryl, if you see places in the current docs that still say provisional, please open an issue to re

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-20 Thread R. David Murray
R. David Murray added the comment: Thanks for being willing to work on this, but smtpd is deprecated in favor of aiosmtpd (which is not part of the stdlib). smtpd should really only be used for internal stdlib testing, but it is retained for backward compatibility reasons. All of these

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-21 Thread R. David Murray
R. David Murray added the comment: It is documented as deprecated, but only in the 'seealso' note at the top. I think it would be reasonable to open an issue to add an actual 'deprecated' ReST tag to the docs. For your 1 and 2, the stdlib smtpd forwarding is also

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-21 Thread R. David Murray
R. David Murray added the comment: The mailman proxy has been abandoned for a long time now, so no fixes there. I have some sympathy to fixing PureProxy, but since the stdlib itself doesn't use it, not a lot :) At some point we will start cleaning up old code (probably a while after 2

[issue35788] smtpd.PureProxy and smtpd.MailmanProxy broken by extra kwargs, bytes and more

2019-01-21 Thread R. David Murray
R. David Murray added the comment: Actually, thinking about it some more, you are right. If PureProxy doesn't at least function according to the current docs it should either be fixed or we should deprecate-and-remove it in 3.8 or 3.9 (depending on how strongly people feel abou

[issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not

2019-01-22 Thread R. David Murray
R. David Murray added the comment: Yes, the correct solution would be to write an actual parser for headers containing message ids. All the pieces needed to do this already exist in _header_value_parser, it "just" needs a function that glues them together in the right order, and

[issue20911] urllib 'headers' is not a well defined data type

2019-01-23 Thread R. David Murray
R. David Murray added the comment: There has been considerable rewriting of the header handling code since I filed this. I would not be surprised if the issue is no longer valid. If you want to double check, look for the places that the headers attribute is created in the various handlers

[issue35799] fix or remove smtpd.PureProxy

2019-01-29 Thread R. David Murray
R. David Murray added the comment: I'm neutral on fixing versus removing philosophically. Since fixing is actually the least effort in this case, I think practically I favor fixing. -- ___ Python tracker <https://bugs.python.org/is

[issue35837] smtpd PureProxy breaks on mail_options keyword argument

2019-01-29 Thread R. David Murray
R. David Murray added the comment: I'm closing this in favor of #35799 because someone has to first make a remove-or-fix decision, which is mentioned there. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -&

[issue20767] Some python extensions can't be compiled with clang 3.4

2019-01-31 Thread R. David Murray
Change by R. David Murray : -- nosy: -r.david.murray ___ Python tracker <https://bugs.python.org/issue20767> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35863] email.headers wraps headers badly

2019-01-31 Thread R. David Murray
R. David Murray added the comment: That is correct folding. The word is too long to fit within the 78 character default if put on the same line as the label, but does fit on a line by itself. If Outlook can't understand such a header it is even more broken than I thought it was :( Yo

[issue35863] email.headers wraps headers badly

2019-01-31 Thread R. David Murray
R. David Murray added the comment: Also note that you might want to switch to the new API, the folder it uses is smarter, although in this case I think it will produce the same result because it is the "best" rendering of the header under the cir

[issue35863] email.headers wraps headers badly

2019-01-31 Thread R. David Murray
R. David Murray added the comment: The rules are: lines should be less than 78 characters; and that lines may be broken only at FWS (folding whitespace), not in the middle of words. Putting these rules together, you get the result that the email library produces. "Conservative in wha

[issue35863] email.headers wraps headers badly

2019-02-01 Thread R. David Murray
R. David Murray added the comment: Well, "display" in the context of email includes looking at the raw email serialized as a text file. This is something one can do in most mailers. I use nmh as my mailer, which only shows raw headers, so I myself would be personally affected

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-19 Thread R. David Murray
R. David Murray added the comment: Since Address itself renders it correctly (str(address)), the problem is going to take a bit of digging to find. I'm guessing the quoted_string atom is getting transformed incorrectly into something else at some point during the fo

[issue36041] email: folding of quoted string in display_name violates RFC

2019-02-20 Thread R. David Murray
R. David Murray added the comment: I'm afraid I don't have time to parse through the file you uploaded. Can you produce a pull request or a diff showing your fix? And ideally some added tests :) But whatever you can do is great, if you don't have time maybe someone else

[issue34464] There are inconsitencies in the treatment of True, False, None, and __debug__ keywords in the docs

2019-02-20 Thread R. David Murray
Change by R. David Murray : -- versions: -Python 3.6 ___ Python tracker <https://bugs.python.org/issue34464> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16355] inspect.getcomments() does not work in the interactive shell

2017-03-03 Thread R. David Murray
R. David Murray added the comment: Correct. Tests are good, it's the fix I was rejecting. -- ___ Python tracker <http://bugs.python.org/issue16355> ___ ___

[issue29713] String changes whether or not '\x81' is present

2017-03-03 Thread R. David Murray
R. David Murray added the comment: It works fine for me. If I write the data to a file (using print) and look at it with vi, I see your expected string with <81> on the end. It also works fine in my console (which otherwise produces mostly unknown character glyphs; I'm using a

[issue29715] Arparse improperly handles "-_"

2017-03-03 Thread R. David Murray
R. David Murray added the comment: Have you tried '-' plus any other character? argparse treats '-' and '--' specially, and this is a known issue. -- nosy: +r.david.murray ___ Python tracker <

[issue20774] collections.deque should ship with a stdlib json serializer

2017-03-05 Thread R. David Murray
R. David Murray added the comment: I disagree, I think a __json__ protocol is sensible. But this is why it needs to be discussed on python-dev or python-ideas first :) In the meantime adding deque support like we added enum support is reasonable, but IMO we shouldn't go to crazy a

[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread R. David Murray
R. David Murray added the comment: If Raymond is on the side of skipping the deprecation than I'm good with it. Like I said, this is a marginal case. -- ___ Python tracker <http://bugs.python.org/is

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread R. David Murray
R. David Murray added the comment: Thanks for the report and PR, but your fix is not obviously correct. In general exceptions are the way in Python that errors are reported, and asking for extra_info on a closed stream is an error. The exception raised is not clear, so perhaps the asyncio

[issue29747] unittest - assertDoesNotRaise

2017-03-07 Thread R. David Murray
R. David Murray added the comment: This has already been discussed and rejected (issue 14403). In practice the distinction between a failure and an error is not useful, and a comment in the test is IMO clearer than a no-op context manager: you can use a positive sentence instead of the

[issue29750] smtplib doesn't handle unicode passwords

2017-03-07 Thread R. David Murray
R. David Murray added the comment: See msg253287. Someone should check the RFC. It is not obvious that just encoding using utf8 is correct; fundamentally passwords are binary data. But the auth methods don't currently accept binary data. UTF8 is a reasonable default these days, I

[issue29771] An email and MIME handling package - Add support to send CC of email

2017-03-09 Thread R. David Murray
R. David Murray added the comment: If you use smtplib.send_message in python3, it will do what you want (including stripping BCC headers before sending the message). If someone wants to create a PR to add an example of what Eric is talking about (specifying additional senders in

[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-03-10 Thread R. David Murray
R. David Murray added the comment: Thanks for the PR. However, rereading this: since compat32 is providing backward compatibility with the behavior of the python 3.2 email package, we need to check what it would do in this situation before changing the behavior. What we may need instead is

[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-03-10 Thread R. David Murray
R. David Murray added the comment: So what happens when you do that same operation in 3.5/6 with your change in place? Does the behavior change? (I haven't looked back at the code to see if I think it will :) -- ___ Python tracker

[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-03-10 Thread R. David Murray
R. David Murray added the comment: OK. This looks good to me. I haven't figured out the new commit process, though (like how to do misc news and backports), so I'm not going to be the one to merge it, I'm afraid. At least not until I do fin

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread DAVID ALEJANDRO Pineda
DAVID ALEJANDRO Pineda added the comment: Hello Again. The problem can be replicated in the same structure when call the 'functools.partial' feature I wrote a simple example. It uses the asyncio and multiprocessing structure. https://github.com/dpineiden/async_multiprocessing

[issue29540] Add compact=True flag to json.dump/dumps

2017-03-14 Thread R. David Murray
R. David Murray added the comment: I don't see how adding a constant increases the complexity of the API. -- ___ Python tracker <http://bugs.python.org/is

[issue29812] test for token.py, and consistency tests for tokenize.py

2017-03-14 Thread R. David Murray
New submission from R. David Murray: http://bugs.python.org/issue24622 made reminded me that a while back we added tests for the keyword module that includes a test that if you run it, you get the result that is checked in. The same thing could be done for the token.py module. And then we

[issue29812] test for token.py, and consistency tests for tokenize.py

2017-03-15 Thread R. David Murray
R. David Murray added the comment: The cross check test itself doesn't depend on a regeneration, but it does depend on the information in token.h. Meanwhile the validity of *that* is checked by regeneration in your test_token tests. This is exactly what I had in mind :). So, I haven&#

[issue29636] Specifying indent in the json.tool command

2017-03-16 Thread R. David Murray
R. David Murray added the comment: Easier, but if we do it in the tool, then it is done for everyone and they don't *each* have to spend that "less time" writing their own script. And --indent and --compact are both useful for debugging/hand testing, since it allows you to gen

[issue29829] Documentation lacks clear warning of subprocess issue with pythonw

2017-03-16 Thread R. David Murray
R. David Murray added the comment: A warning is not appropriate (we reserve those for things that are security related, pretty much). A sentence might be, though. For example, we could change the initial discussion of the run function to say: This does not capture stdout or stderr by

[issue29848] Cannot use Decorators of the same class that requires an instance of itself to change variables in that class.

2017-03-18 Thread R. David Murray
R. David Murray added the comment: Decorators are called with the decorated *function* objection when the class is compiled. There can be no instance involved by their very nature, since the instance doesn't exist yet. So no, you can't have a decorator that affects instance att

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread R. David Murray
R. David Murray added the comment: It is interesting that in all the years smtplib has been in use, this is the first time (as far as I know) this has been reported as a problem. I don't see any reason to object to changing it to send the commands in upper case, but the server yo

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread R. David Murray
R. David Murray added the comment: On the other hand, the current mixed case sending found a bug in your code, so it has some value. I'm neither in favor nor in objection to the change, at this point. -- ___ Python tracker <http://bugs.py

[issue29896] ElementTree.fromstring raises undocumented UnicodeError

2017-03-24 Thread R. David Murray
R. David Murray added the comment: Agreed with Terry. The general policy in Python is that we let errors bubble up unless there is a good reason to do something else with them. And errors that bubble up are not, in general, documented. (In short, Python is not Java :) -- nosy

[issue29909] types.coroutine monkey patches original function

2017-03-26 Thread R. David Murray
R. David Murray added the comment: Yes, that looks wrong to me. IMO it should be returning a new function object, not updating the __code__ of the existing object. I couldn't figure when that is actually triggered, though. There are also some other oddnesses, given the definiti

[issue29909] types.coroutine monkey patches original function

2017-03-26 Thread R. David Murray
R. David Murray added the comment: Oops, I didn't meant to close this. -- resolution: not a bug -> stage: resolved -> status: closed -> open ___ Python tracker <http://bugs.pyth

[issue19824] string.Template: Rewrite docs to emphasize i18n use case

2017-03-26 Thread R. David Murray
R. David Murray added the comment: Let's retitle this, then. -- nosy: +r.david.murray title: string.Template: Add PHP-style variable expansion example -> string.Template: Rewrite docs to emphasize i18n use case ___ Python tracke

[issue29506] Incorrect documentation for the copy module

2017-03-27 Thread R. David Murray
R. David Murray added the comment: Looking over the PR, and especially in the context of Serhiy's point about this being about 'deep copy' and not 'deepcopy', I think this would be clearer if it were shortened even further, to just: "Because deep copy copies eve

[issue25538] Traceback from __exit__ method is misleading

2017-03-27 Thread R. David Murray
R. David Murray added the comment: See also issue 29922. -- nosy: +Tadhg McDonald-Jensen, yselivanov ___ Python tracker <http://bugs.python.org/issue25

<    48   49   50   51   52   53   54   55   56   57   >