[issue35909] Zip Slip Vulnerability

2019-02-06 Thread Jeff Knupp
Jeff Knupp added the comment: According to https://snyk.io/research/zip-slip-vulnerability (the source of the paper), Python hasn't been vulnerable since 2014. -- nosy: +jeffknupp ___ Python tracker <https://bugs.python.org/issue35

[issue29081] time.strptime() return wrong result

2017-01-07 Thread Jeff Knupp
Jeff Knupp added the comment: I believe this is working as intended. Remember, the '%w' directive instructs strptime to consider 0 to be Sunday, while tm_wday considers 0 Monday. In 2016, the %W directive means that the first week (week #1) starts on Monday, January 4th. If you go 52 weeks

[issue17483] In urlopen the check_hostname variable can never be False.

2013-03-19 Thread Jeff Knupp
Jeff Knupp added the comment: Was this discovered when you were trying to tell urlopen not to check the hostname for https connections? If so, that should be reflected in the title so others know what the observable effect is. Referencing specific variables is less useful both for searching

[issue17383] Error in documentation /2/tutorial/modules.html#more-on-modules

2013-03-08 Thread Jeff Knupp
Jeff Knupp added the comment: I think Piotr's point is the wording of the last sentence is ambiguous. The second statement reads It is customary *but not required* to place all import statements at the beginning of a module The third seems to state that regardless of whether or not you

[issue17383] Possibly ambiguous phrasing in tutorial/modules#more-on-modules

2013-03-08 Thread Jeff Knupp
Jeff Knupp added the comment: Of the two different things, the first (the scope of imported names) is never covered in the documentation. As a result, the text in question seems to imply an import statement can *only* be in module scope. From the reader's perspective: If I wanted to import

[issue16988] argparse: PARSER option for nargs not documented

2013-01-18 Thread Jeff Knupp
Jeff Knupp added the comment: This is not a bug. The 'PARSER' nargs choice is an implementation detail as a way to handle subparsers. The parser needs to know that the first value should be handled, but everything that follows will be handled by the subparser. By using a subparser, you're

[issue16977] argparse: mismatch between choices parsing and usage/error message

2013-01-18 Thread Jeff Knupp
Jeff Knupp added the comment: Attached a patch. Rather than altering choices or making a special check for string instances, I just changed the if statement to if action.choices is not None and value not in list(action.choices): from if action.choices is not None and value

[issue16989] allow distutils debug mode to be enabled more easily

2013-01-18 Thread Jeff Knupp
Jeff Knupp added the comment: Patch uploaded. Note that updating the test_distutils.core test revealed that the test was importing DEBUG from the wrong module (which only existed because distutils.core use the 'from ... import DEBUG' form). I've corrected the import and updated the test

[issue16977] argparse: mismatch between choices parsing and usage/error message

2013-01-18 Thread Jeff Knupp
Jeff Knupp added the comment: The only time this would be an issue is for infinite sequences via range or a generator, which doesn't work anyway. p = argparse.ArgumentParser() a = p.add_argument('a', choices=itertools.count(0), type=int) p.parse_args(['1']) ... hangs Are there any

[issue16687] Fix small gramatical error and add reference link in hashlib documentation

2012-12-20 Thread Jeff Knupp
Jeff Knupp added the comment: Previous patch had unintentional local changes. Uploaded correct patch. -- Added file: http://bugs.python.org/file28382/new_patch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16687

[issue16687] Fix small gramatical error and add reference link in hashlib documentation

2012-12-20 Thread Jeff Knupp
Changes by Jeff Knupp jkn...@gmail.com: Removed file: http://bugs.python.org/file28318/patch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16687

[issue16702] Force urllib2_localnet test not to use http proxies

2012-12-17 Thread Jeff Knupp
New submission from Jeff Knupp: test_urllib2_localnet is concerned with testing connections only using 'localhost' or '127.0.0.1' hosts. If a user has the http_proxy environment variable set, these test will likely fail as the proxy won't have any idea where to send a request for 'localhost

[issue16658] Missing return in HTTPConnection.send()

2012-12-17 Thread Jeff Knupp
Jeff Knupp added the comment: I'm assuming this is the patch you were looking for. However, there are a couple of unrelated issues with http.client.send that jumped out at me: 1. Encoding a file handed directly to send() seems wrong. If a client wants to send a file encoded using something

[issue16687] Fix small gramatical error and add reference link in hashlib documentation

2012-12-14 Thread Jeff Knupp
New submission from Jeff Knupp: Original text is: Feeding string objects is to update is not supported Should be ... objects in to update instead of is to Also, mark GIL as a :term: to provide a link to its definition, as it's used without much context in the following note: .. note

[issue15743] test_urllib2/test_urllib use deprecated urllib.Request methods

2012-12-14 Thread Jeff Knupp
Changes by Jeff Knupp jkn...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15743

[issue15316] runpy swallows ImportError information with relative imports

2012-08-22 Thread Jeff Knupp
Changes by Jeff Knupp jkn...@gmail.com: -- nosy: +Jeff.Knupp ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15316 ___ ___ Python-bugs-list mailing

[issue15752] change test_json's use of deprecated unittest function

2012-08-21 Thread Jeff Knupp
New submission from Jeff Knupp: patch to test_json to not use assert(Raises)Regexp, which has been deprecated in favor of assert(Raises)Regex. -- components: Tests files: json_deprecated.patch keywords: patch messages: 168750 nosy: Jeff.Knupp priority: normal severity: normal status

[issue15743] test_urllib2/test_urllib use deprecated urllib.Request methods

2012-08-20 Thread Jeff Knupp
New submission from Jeff Knupp: urllib was updated to deprecate a number of Request methods for 3.3. The test_urllib2 and test_urllib tests still use some of the deprecated methods. -- components: Tests messages: 168692 nosy: Jeff.Knupp priority: normal severity: normal status: open

[issue15743] test_urllib2/test_urllib use deprecated urllib.Request methods

2012-08-20 Thread Jeff Knupp
Jeff Knupp added the comment: Attaching patch. -- keywords: +patch Added file: http://bugs.python.org/file26935/test_urllib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15743

[issue15743] test_urllib2/test_urllib use deprecated urllib.Request methods

2012-08-20 Thread Jeff Knupp
Changes by Jeff Knupp jkn...@gmail.com: Removed file: http://bugs.python.org/file26935/test_urllib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15743

[issue15743] test_urllib2/test_urllib use deprecated urllib.Request methods

2012-08-20 Thread Jeff Knupp
Jeff Knupp added the comment: Updated with correct patch file. -- Added file: http://bugs.python.org/file26936/test_urllib.patch.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15743

[issue15743] test_urllib2/test_urllib use deprecated urllib.Request methods

2012-08-20 Thread Jeff Knupp
Jeff Knupp added the comment: Senthil, sorry, missed your comment and hadn't realized anyone had seen the patch yet. I replaced it with an updated version (had missed a few places deprecated functions were used). Could you review the new patch instead

[issue15743] test_urllib2/test_urllib use deprecated urllib.Request methods

2012-08-20 Thread Jeff Knupp
Jeff Knupp added the comment: Yes, that was part of the original patch which was incorrectly uploaded. The current patch (2) should be correct wrt get_method. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15743

[issue15702] Multiprocessing Pool deadlocks on join after empty map operation

2012-08-16 Thread Jeff Knupp
Jeff Knupp added the comment: This is a duplicate of http://bugs.python.org/issue12157, which was fixed. -- nosy: +Jeff.Knupp ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15702

[issue15033] Different exit status when using -m

2012-07-03 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: Fixed for 3.3. Does this need to be back ported as well? -- keywords: +patch nosy: +Jeff.Knupp Added file: http://bugs.python.org/file26244/exit_code.patch ___ Python tracker rep...@bugs.python.org http

[issue15033] Different exit status when using -m

2012-07-03 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: And by 'Fixed' I of course meant 'Patched, awaiting review'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15033

[issue15166] Implement imp.get_tag() using sys.implementation

2012-06-26 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: Adding patch. If I misunderstood the issue, let me know. -- keywords: +patch nosy: +Jeff.Knupp Added file: http://bugs.python.org/file26170/imp.patch ___ Python tracker rep...@bugs.python.org http

[issue14399] zipfile and creat/update comment

2012-03-26 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: I'm unable to reproduce on either 2.7 or 3.3. Running the following: from zipfile import ZipFile z=ZipFile('test.zip','a') z.comment='Create a new comment' z.close() produces the output: Archive: test.zip Create a new comment with the comment

[issue14421] Avoid ResourceWarnings in ccbench

2012-03-26 Thread Jeff Knupp
New submission from Jeff Knupp jkn...@gmail.com: ccbench.py warns about unclosed sockets in the bandwidth test. Fix to close socket properly at end of test. -- components: Demos and Tools files: ccbench.patch keywords: patch messages: 156891 nosy: Jeff.Knupp priority: normal severity

[issue14380] MIMEText should default to utf8 charset if input text contains non-ASCII

2012-03-22 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: Patch to default character set to utf8 if non-ascii characters are found in the input string. Please let me know if this is what you had in mind. -- nosy: +Jeff.Knupp ___ Python tracker rep

[issue14380] MIMEText should default to utf8 charset if input text contains non-ASCII

2012-03-22 Thread Jeff Knupp
Changes by Jeff Knupp jkn...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file24997/mailutf8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14380

[issue14380] MIMEText should default to utf8 charset if input text contains non-ASCII

2012-03-22 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: Understood. Please take a look at the updated patch. Also, removed the unrelated diffs that somehow were hanging around in my hg mq. -- Added file: http://bugs.python.org/file24999/mimeutf8.patch

[issue13922] argparse handling multiple -- in args improperly

2012-03-18 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: I don't know that this is a bug. Rather, the string '--' means different things to argparse and optparse. In argparse, '--' is a psuedo-argument taken to mean everything after this is a postional argument and not stop processing arguments, which

[issue13922] argparse handling multiple -- in args improperly

2012-03-18 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: In that case, wouldn't you use 'parse_known_args' instead of 'parse_args' and pass the remaining arguments to the next script? This case is explicitly mentioned in the argparse documentation. Again it seems to me that the meaning of '--' has changed

[issue13922] argparse handling multiple -- in args improperly

2012-03-18 Thread Jeff Knupp
Jeff Knupp jkn...@gmail.com added the comment: Added patch so that only the first '--' is removed by an argparse.PARSE or argparse.REMAINDER argument. Note that, as Steven said, argparse.REMAINDER should be used in the OP's issue (and the added test makes sure all remaining arguments