[issue39624] Trace greedy replaces $prefix and $exec_prefix

2020-02-13 Thread Ben Boeckel
Ben Boeckel added the comment: `\b` is a bit too loose. That example should *not* have it replaced because it is not a full path component. (Granted, any of these conflicting paths are "dumb" in general; I'm fine with just leaving this as a low priority, but if it does ge

[issue39624] Trace greedy replaces $prefix and $exec_prefix

2020-02-13 Thread Ben Boeckel
New submission from Ben Boeckel : Previously reported as a sidenote in Issue21016. The `--ignore-dir` option in trace.py replaces `$prefix` and `$exec_prefix` *anywhere* in the path when it really should just replace it in the start of the path and if it is followed by nothing or a path

[issue21016] trace: $prefix and $exec_prefix improperly replaced on Fedora

2020-02-12 Thread Ben Boeckel
Ben Boeckel added the comment: Thanks! Should I file a new issue for the other (less urgent) problem mentioned at the bottom or is it not really worth fixing? > It also erroneously replaces things like '$prefixpath'. It should probably do > split the path on the path separators an

[issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler

2020-02-04 Thread Ben Caller
Ben Caller added the comment: Isn't this a duplicate of bpo-38826 ? -- nosy: +bc ___ Python tracker <https://bugs.python.org/issue39503> ___ ___ Python-bug

[issue39463] ast.Constant, bytes, and ast.unparse

2020-01-27 Thread Tal Ben-Nun
Change by Tal Ben-Nun : -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue39463> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39463] ast.Constant, bytes, and ast.unparse

2020-01-27 Thread Tal Ben-Nun
New submission from Tal Ben-Nun : In Python 3.8, the "kind" field was introduced into the Constant AST class. This brings about a problem when unparsing the AST for various packages. First, it breaks backward compatibility for older code that creates ast.Num without specifying k

[issue39066] Expose SOABI setting in the header

2019-12-16 Thread Ben Boeckel
Ben Boeckel added the comment: Ah, that does look like it is suitable (since it is a shell script). I assume it is a batch script on Windows (though I feel cross-compilation is far rarer there). Thanks. -- stage: -> resolved status: open ->

[issue39066] Expose SOABI setting in the header

2019-12-16 Thread Ben Boeckel
New submission from Ben Boeckel : Currently, the SOABI suffix is only available by running the Python interpreter to ask `sysconfig` about the setting. This complicates cross compilation because the target platform's Python may not be runnable on the build platform. Exposing

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-12-11 Thread Ben Brown
Change by Ben Brown : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37226> ___ ___ Python-bugs-list

[issue38826] Regular Expression Denial of Service in urllib.request.AbstractBasicAuthHandler

2019-11-17 Thread Ben Caller
Ben Caller added the comment: I have been advised that DoS issues can be added to the public bug tracker since there is no privilege escalation, but should still have the security label. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38826] Regular Expression Denial of Service in urllib.request.AbstractBasicAuthHandler

2019-11-16 Thread Ben Caller
New submission from Ben Caller : The regular expression urllib.request.AbstractBasicAuthHandler.rx is vulnerable to malicious inputs which cause denial of service (REDoS). The regex is: rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+' 'realm=(["\']?)([^"\']*)

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-14 Thread Ben Caller
Change by Ben Caller : -- keywords: +patch pull_requests: +1 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17157 ___ Python tracker <https://bugs.python.org/issu

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-14 Thread Ben Caller
New submission from Ben Caller : The regex http.cookiejar.LOOSE_HTTP_DATE_RE iss vulnerable to regular expression denial of service (REDoS). LOOSE_HTTP_DATE_RE.match is called when using http.cookiejar.CookieJar to parse Set-Cookie headers returned by a server. Processing a response from

[issue38728] Update PC/pyconfig.h to support disabling auto linking

2019-11-14 Thread Ben Boeckel
Change by Ben Boeckel : -- nosy: +mathstuf ___ Python tracker <https://bugs.python.org/issue38728> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38759] Python 2.7.9 x64 for Windows version is 2.7.13

2019-11-09 Thread Ben Barbour
New submission from Ben Barbour : When downloading Python 2.7.9 x64, the actual python executable is Python 2.7.13. The 32-bit version has the correct executable. -- messages: 356307 nosy: Ben Barbour priority: normal severity: normal status: open title: Python 2.7.9 x64 for Windows

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-08 Thread Ben Reilly
Ben Reilly added the comment: Yes, your description sounds right, and I had zero-ed in on the same park of the mock code when I was doing my investigation. I know that this is a peculiar situation, but one thing to note is that `inspect.signature` gets the signature right on these wrapped

[issue30587] Mock with spec object does not ensure method call signatures

2019-11-07 Thread Ben Reilly
Change by Ben Reilly : -- nosy: +breilly_box ___ Python tracker <https://bugs.python.org/issue30587> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-06 Thread Ben Reilly
Change by Ben Reilly : -- components: +Tests ___ Python tracker <https://bugs.python.org/issue38729> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-06 Thread Ben Reilly
New submission from Ben Reilly : mock.create_autospec is meant to create a mock that will ensure, among other things, that method calls on the mock correspond to real methods on the original object and that the arguments match the signature of the original method. However, if the original

[issue38607] Document that cprofile/profile only profile the main thread

2019-10-27 Thread Ben Spiller
New submission from Ben Spiller : The built-in profiling modules only provide information about the main thread (at least when invoked as documented). To avoid user confusion we should state this in the documentation at https://docs.python.org/3/library/profile.html. Potentially we could

[issue36356] Failure to build with address sanitizer

2019-10-08 Thread Ben Harper
Ben Harper added the comment: The default build of python with ASAN builds successfully. Test suite and PGO build are currently blocked, but that can be separated if it makes more sense to handle them individually. Would it make sense to add an ASAN build to the CI pipeline to make

[issue36253] Use after free in ctypes test suite

2019-10-08 Thread Ben Harper
Ben Harper added the comment: Changes merged -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue36356] Failure to build with address sanitizer

2019-10-05 Thread Ben Harper
Change by Ben Harper : -- pull_requests: +16186 pull_request: https://github.com/python/cpython/pull/16598 ___ Python tracker <https://bugs.python.org/issue36

[issue38278] Need a more efficient way to perform dict.get(key, default)

2019-09-25 Thread Ben Spiller
Ben Spiller added the comment: Thanks... yep I realise method calls are slower than operators, am hoping we can still find a cunning way to speed up this use case nonetheless. :D For example by having a configuration option on dict (or making a new subclass) that gives the (speedy

[issue38278] Need a more efficient way to perform dict.get(key, default)

2019-09-25 Thread Ben Spiller
New submission from Ben Spiller : In performance-critical python code, it's quite common to need to get an item from a dictionary, falling back on a default (e.g. None, 0 etc) if it doesn't yet exist. The obvious way to do this based on the documentation is to call the dict.get() method

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

2019-09-11 Thread Ben Hsing
Ben Hsing added the comment: Correction. I've now done this by delegating the resolution of attributes belonging to the tuple class to _Call.__getattr__ instead. Passed all build tests. -- ___ Python tracker <https://bugs.python.org/issue37

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

2019-09-11 Thread Ben Hsing
Change by Ben Hsing : -- status: pending -> open ___ Python tracker <https://bugs.python.org/issue37972> ___ ___ Python-bugs-list mailing list Unsubscrib

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

2019-09-11 Thread Ben Hsing
Ben Hsing added the comment: Agreed. I've submitted a new commit with the call chaining behavior now generalized for all dunder methods by delegating the resolution of all attributes not directly in the _Call object's __dict__ keys to the getattr method. -- status: open -> pend

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

2019-08-28 Thread Ben Hsing
Change by Ben Hsing : -- keywords: +patch pull_requests: +15240 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15565 ___ Python tracker <https://bugs.python.org/issu

[issue37652] Multiprocessing shared_memory ValueError on race with ShareableList

2019-07-29 Thread Ben
Ben added the comment: It would be nice to get davin to clarify the API for this module. What are the use cases for SharedMemory and ShareableList? Are you supposed to ever use a raw SharedMemory buffer directly? What atomicity guarantees are there for ShareableList operations and read/write

[issue37409] relative import without parent succeeds with builtins.__import__

2019-07-26 Thread Ben Lewis
Change by Ben Lewis : -- pull_requests: +14724 pull_request: https://github.com/python/cpython/pull/14956 ___ Python tracker <https://bugs.python.org/issue37

[issue37652] Multiprocessing shared_memory ValueError on race with ShareableList

2019-07-22 Thread Ben
New submission from Ben : When running the attached on 3.8 and 3.9 (master) I get the following: Process Process-3: Traceback (most recent call last): File "/hom

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-07-22 Thread Ben Brown
Ben Brown added the comment: I can fully confirm the issue is due to flow control or lack of in my code the system runs out of resources and this is when it errors, I have implemented flow control in my protocol and it now works without errors. One thing I did find is that the documentation

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-07-19 Thread Ben Brown
Ben Brown added the comment: With some more research it looks like the issue is flow related, I experimented with the StreamWriter in a simple server and using that plus drain() appears to have worked an I no longer get the error. I have added my new server to the gist I posted above

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-07-09 Thread Ben Brown
Ben Brown added the comment: Maayan Keshet do you have a minimal example it would be interesting to compare against our code and see if there is something we are both doing that could help narrow down the issue. -- ___ Python tracker <ht

[issue37409] relative import without parent succeeds with builtins.__import__

2019-06-29 Thread Ben Lewis
Change by Ben Lewis : -- keywords: +patch pull_requests: +14282 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/14465 ___ Python tracker <https://bugs.python.org/issu

[issue37409] relative import without parent succeeds with builtins.__import__

2019-06-28 Thread Ben Lewis
Ben Lewis added the comment: I'll look into this further and open a PR initially for the regression tests. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37409] relative import without parent

2019-06-26 Thread Ben Lewis
Ben Lewis added the comment: >>> foo = 'oops' >>> from . import foo as fubar # should raise ImportError >>> fubar 'oops' After further investigation, the problem is that builtins.__import__ (the c port version) does not replicate the behaviour of importlib.__impo

[issue37409] relative import_from without parent

2019-06-26 Thread Ben Lewis
New submission from Ben Lewis : >>> from curses import ascii >>> from . import ascii The second line should raise an ImportError but instead succeeds (tested cpython 3.6.7, 3.7.0 and 3.7.3, and from interactive interpreter and scripts). Specifically, builtins.__import__

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-24 Thread Ben Brown
Ben Brown added the comment: Hi is there any update on this issue, were you able to replicate the error with the minimal example I provided or is there any additional information I can provide. -- ___ Python tracker <https://bugs.python.

[issue37373] Configuration of windows event loop for libraries

2019-06-23 Thread Ben Darnell
Ben Darnell added the comment: Yeah, it's definitely a hack. The argument for it, at best, is "practicality beats purity". The solution is two simple lines, but those lines need to be repeated in every project that depends on Tornado and cares about Windows, now or in the future

[issue37373] Configuration of windows event loop for libraries

2019-06-22 Thread Ben Darnell
Ben Darnell added the comment: > From my understanding, there is no issue for Tornado itself. If Jupiter > Notebook needs Tornado, Tornado needs selector event loop on Windows -- > Jupiter can install the proper loop. Right. I'm just advocating for something that would make the t

[issue37373] Configuration of windows event loop for libraries

2019-06-22 Thread Ben Darnell
New submission from Ben Darnell : On Windows there are two event loop implementions with different interfaces: The proactor event loop is missing the file descriptor family of methods (add_reader()), while the selector event loop has other limitations including missing support for pipes

[issue35185] Logger race condition - loses lines if removeHandler called from another thread while logging

2019-06-20 Thread Ben Spiller
Ben Spiller added the comment: Interesting conversation. :) Yes I agree correctness is definitely top priority. :) I'd go further and say I'd prefer correctness to be always there automatically, rather than something the user must remember to enable by setting a flag

[issue35185] Logger race condition - loses lines if removeHandler called from another thread while logging

2019-06-20 Thread Ben Spiller
Ben Spiller added the comment: I'd definitely suggest we go for a solution that doesn't hit performance of normal logging when you're not adding/removing things, being as that's the more common case. I guess that's the reason why callHandlers was originally implemented without grabbing

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-12 Thread Ben Brown
Ben Brown added the comment: I have created a minimal example if that helps to show the issue https://gist.github.com/bobthemac/031213b8e37960ee805f2ae1e6990b60 -- ___ Python tracker <https://bugs.python.org/issue37

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-11 Thread Ben Brown
Ben Brown added the comment: I tested an older version of OpenSSL 1.0.2g and I get the same error on that -- ___ Python tracker <https://bugs.python.org/issue37

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-11 Thread Ben Brown
Ben Brown added the comment: I am using the version I mentioned above 1.1.0 and TLS 1.2, I am sorry I can't be of more help. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-11 Thread Ben Brown
Ben Brown added the comment: That's a shame, which version should it work on I don't mind downgrading for now to fix the issue as a workaround. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-11 Thread Ben Brown
Ben Brown added the comment: The OpenSSL version is OpenSSL 1.1.0j 20 Nov 2018 -- ___ Python tracker <https://bugs.python.org/issue37226> ___ ___ Python-bug

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-06-11 Thread Ben Brown
New submission from Ben Brown : I have been getting an intermittent errors when using asyncio with SSL. The error always occurs in the _process_write_backlog method in asyncio's sslproto.py file. I have looked at lots of possibilities as to what the cause is and found that for some reason

[issue23297] Clarify error when ‘tokenize.detect_encoding’ receives text

2019-04-28 Thread Ben Finney
Ben Finney added the comment: On 28-Apr-2019, Berker Peksag wrote: > The original problem has already been solved by making > tokenize.generate_tokens() public in issue 12486. I don't understand how that would affect the resolution of this issue. Isn't the correct resolution here

[issue13282] the table of contents in epub file is too long

2019-04-11 Thread Ben Creasy
Ben Creasy added the comment: Not sure if this is filed elsewhere, but the contents on the page at https://docs.python.org/3/contents.html could really use a collapse button, and could start automatically collapsed. The first half of the page is "What's new" for the past few Pytho

[issue13282] the table of contents in epub file is too long

2019-04-11 Thread Ben Creasy
Change by Ben Creasy : -- nosy: +jcrben ___ Python tracker <https://bugs.python.org/issue13282> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36356] Failure to build with address sanitizer

2019-03-24 Thread Ben Harper
Ben Harper added the comment: I'm not sure about the change from 3.7 to master, but that assertion may be more likely to happen while instrumented with ASAN due to the extra space reserved between heap objects. As far as I can tell it's just expecting that the offset of two pointers

[issue36356] Failure to build with address sanitizer

2019-03-19 Thread Ben Harper
Change by Ben Harper : -- pull_requests: +12399 ___ Python tracker <https://bugs.python.org/issue36356> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36356] Failure to build with address sanitizer

2019-03-19 Thread Ben Harper
Ben Harper added the comment: I'm on Ubuntu 18.10/amd64 compiling with Ubuntu's GCC 8.2.0, I know there's some libraries that are missing dependencies (including bz2 and sqlite) so I may have missed the ipv6 dependencies as well. My eventual goal was to be able to build a pgo optimized

[issue36356] Failure to build with address sanitizer

2019-03-18 Thread Ben Harper
Change by Ben Harper : -- keywords: +patch pull_requests: +12380 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36356> ___ ___ Py

[issue36356] Failure to build with address sanitizer

2019-03-18 Thread Ben Harper
New submission from Ben Harper : Trying to run make after './configure --with-address-sanitizer --with-pydebug' fails with leak of locale string -- components: Build messages: 338315 nosy: btharper priority: normal severity: normal status: open title: Failure to build with address

[issue36253] Use after free in ctypes test suite

2019-03-09 Thread Ben Harper
Change by Ben Harper : -- keywords: +patch pull_requests: +12243 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36253> ___ ___ Py

[issue36253] Use after free in ctypes test suite

2019-03-09 Thread Ben Harper
New submission from Ben Harper : When running the builtin test suite with address sanitizer enabled, one of the ctypes tests causes a use after free demonstrating the danger of using a reference to the inside of a deallocated buffer. This use is detected as an error by the address sanitizer

[issue35915] re.search extreme slowness (looks like hang/livelock), searching for patterns containing .* in a large string

2019-02-06 Thread Ben Spiller
Ben Spiller added the comment: Running this command: time python -c "import re; re.compile('y.*x').search('y'*(N))" It's clearly quadratic: N=100,000 time=7s N=200,000 time=18s N=400,000 time=110s N=1,000,000 time=690s This illustrates how a simple program that's working cor

[issue35915] re.search extreme slowness (looks like hang/livelock), searching for patterns containing .* in a large string

2019-02-06 Thread Ben Spiller
Ben Spiller added the comment: Correction to original report - it doesn't hang indefinitely, it just takes a really long time. Specifically, looks like it's quadratic in the length of the input string. Increase the size of the input string to 1000*1000 and it's really really slow. I don't

[issue35915] re.search livelock/hang, searching for patterns starting .* in a large string

2019-02-06 Thread Ben Spiller
New submission from Ben Spiller : These work fine and return instantly: python -c "import re; re.compile('.*x').match('y'*(1000*100))" python -c "import re; re.compile('x').search('y'*(1000*100))" python -c "import re; re.compile('.*x').search('y'*(1000*10

[issue33130] functools.reduce signature uses `iterable`, documentation should use the same term

2018-11-30 Thread Ben Finney
Ben Finney added the comment: Hah, sorry to use a local-filesystem URL. (Hooray for locally-installed developer documentation!) The same section is online at https://docs.python.org/3/library/functools.html#functools.reduce . -- ___ Python

[issue33130] functools.reduce signature uses `iterable`, documentation should use the same term

2018-11-30 Thread Ben Finney
Ben Finney added the comment: The library documentation (e.g. file:///usr/share/doc/python3/html/library/functools.html#functools.reduce ) also has this dissonance: > functools.reduce(`function`, `iterable` [, `initializer` ]) > >Apply function of two arguments cum

[issue32281] bdist_rpm v.s. the Macintosh

2018-11-07 Thread Ben Hyde
Ben Hyde added the comment: ping -- ___ Python tracker <https://bugs.python.org/issue32281> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue35185] Logger race condition - loses lines if removeHandler called from another thread while logging

2018-11-07 Thread Ben Spiller
New submission from Ben Spiller : I just came across a fairly serious thread-safety / race condition bug in the logging.Loggers class, which causes random log lines to be lost i.e. not get passed to some of the registered handlers, if (other, unrelated) handlers are being added/removed using

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2018-11-07 Thread Ben Spiller
Change by Ben Spiller : -- nosy: +Ben Spiller ___ Python tracker <https://bugs.python.org/issue5166> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2018-10-19 Thread Ben Darnell
Ben Darnell added the comment: We have an easy reproduction of this "[Errno 0] Error" on the server side in https://github.com/tornadoweb/tornado/issues/2504#issuecomment-426782158 It is triggered by a connection from `nc -z` (which I think is doing a TCP handshake and shu

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2018-10-19 Thread Ben Spiller
Ben Spiller added the comment: To help anyone else struggling with this bug, based on https://lsimons.wordpress.com/2011/03/17/stripping-illegal-characters-out-of-xml-in-python/ the best workaround I've currently found is to define this: def escape_xml_illegal_chars(unicodeString

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-24 Thread Ben Darnell
Ben Darnell added the comment: Yeah, I think that would work at least for the sphinx use case. It seems like a strange partially-degraded mode and anything that needs structured access to the annotation would still need typeshed, but just getting the string would probably be enough

[issue34712] Style fixes in examples of "Input and Output" tutorial section

2018-09-17 Thread Ben Hoyt
Ben Hoyt added the comment: GitHub PR link with changes and commit notes attached. -- ___ Python tracker <https://bugs.python.org/issue34712> ___ ___ Python-bug

[issue34712] Style fixes in examples of "Input and Output" tutorial section

2018-09-17 Thread Ben Hoyt
Change by Ben Hoyt : -- keywords: +patch pull_requests: +8784 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34712> ___ ___ Python-

[issue34712] Style fixes in examples of "Input and Output" tutorial section

2018-09-17 Thread Ben Hoyt
New submission from Ben Hoyt : There are a couple of examples in the "Input and Output" section of the tutorial that use an unusual / non-PEP 8 Python style or whitespace. I think our examples, especially in the tutorial, should reflect good, PEP 8 style. I'll fix these in a PR

[issue34700] typing.get_type_hints doesn't know about typeshed

2018-09-15 Thread Ben Darnell
New submission from Ben Darnell : Currently, most type annotations for the standard library are provided in typeshed rather than in the library itself. Not all consumers of type annotations are aware of typeshed, and this can cause problems. Specifically, Sphinx 1.8 accesses type hints via

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2018-09-10 Thread Ben Spiller
Ben Spiller added the comment: Hi it's been a few years now since this was reported and it's still a problem, any chance of a fix for this? The API gives the impression that if you pass python strings to the XML API then the library will generate valid XML. It takes care of the charset

[issue1016626] distutils support for swig is under par

2018-08-18 Thread Ben McGinnes
Change by Ben McGinnes : -- versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue1016626> ___ ___ Python-bug

[issue2651] Strings passed to KeyError do not round trip

2018-07-27 Thread Ben Doremus
Ben Doremus added the comment: Did this patch die? I ran into the same issue noted in the SO post. It's bizarre that KeyError is the only error message to handle things this way. -- nosy: +bdoremus ___ Python tracker <https://bugs.python.

[issue14102] argparse: add ability to create a man page

2018-06-14 Thread Ben Finney
Ben Finney added the comment: On Thu, 2018-06-14 23:46 +, Aaron Meurer wrote: > Couldn't such a tool exist outside the standard library. I've tried writing such a tool. It would ideally re-use as much as feasible of the functionality that assembles the usage mess

[issue14102] argparse: add ability to create a man page

2018-06-14 Thread Ben Finney
Ben Finney added the comment: On Thu, 2018-06-14 20:02 +, Pablo Galindo Salgado wrote: > The (possible) confusion is the existence of a manpage only available > though argparse (`./python foo.py --manpage`) This report isn't asking for that. (I see only one person pro

[issue14102] argparse: add ability to create a man page

2018-06-14 Thread Ben Finney
Ben Finney added the comment: On 14-Jun-2018, Pablo Galindo Salgado wrote: > I think this should be something that is not included in argparse > itself. I can imagine a scenario in which the manpage is accessible > through `./python foo.py --manpage` but the manpage is not

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-05-02 Thread Ben FrantzDale
Ben FrantzDale <b...@formlabs.com> added the comment: I looked into it a bit more. With python 2.7 on macOS High Sierra on APFS (Encrypted) with a FAT32 thumb drive... I have a directory that glob.glob('/Volumes/thumb/tmp/*') shows as sorted. I cp -r that to /tmp with bash. glob.glob

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-24 Thread Ben FrantzDale
Ben FrantzDale <b...@formlabs.com> added the comment: Great point. Looks like the phrase is "in arbitrary order" in the docs for those (both 2.7 and 3), which is better than saying nothing. I'd still prefer a bit more specificity about the potential gotcha since "arbitr

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Ben FrantzDale
Ben FrantzDale <b...@formlabs.com> added the comment: Fascinating. That seems like an even wilder gotcha: It sounds like a script assuming sorted results would work in one directory (on one filesystem) but not on another. Or even weirder, if I had a mounted scratch partition, the script

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Ben FrantzDale
New submission from Ben FrantzDale <b...@formlabs.com>: The sortedness of glob.glob's output is platform-dependent. While the docs do not mention sorting, and so are strictly correct, if you are on a platform where its output is sorted, it's easy to believe that the output is always

[issue1222585] C++ compilation support for distutils

2018-04-02 Thread Ben Elliston
Ben Elliston <b...@air.net.au> added the comment: Is there a simple workaround that one can put into setup.py in the meantime? I tried using compiler.compiler.remove('-Wstrict-prototypes') to no avail. -- nosy: +bje ___ Python tracke

[issue33103] Syntax to get multiple arbitrary items from an iterable

2018-03-19 Thread amjad ben hedhili
Change by amjad ben hedhili <amjadbenhedh...@gmail.com>: -- title: Syntax to get multiple items from an iterable -> Syntax to get multiple arbitrary items from an iterable ___ Python tracker <rep...@bugs.python.org> <https

[issue33103] Syntax to get multiple items from an iterable

2018-03-19 Thread amjad ben hedhili
New submission from amjad ben hedhili <amjadbenhedh...@gmail.com>: It will be much of improvement for readability to write: my_list = ["John", "Richard", "Alice", 1, True, 2.1, "End"] a, b, c = my_list[1, 3, -1] instead of: my_list = ["John

[issue33102] get the nth folder of a given path

2018-03-19 Thread amjad ben hedhili
Change by amjad ben hedhili <amjadbenhedh...@gmail.com>: -- title: get the nth folder -> get the nth folder of a given path ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33102] get the nth folder

2018-03-19 Thread amjad ben hedhili
New submission from amjad ben hedhili <amjadbenhedh...@gmail.com>: It will be handy if there was an os or os.path function that returns the path to the nth directory in a given path for example: given path = "C:\Users\User\AppData\Local\Programs\Python\Python36\Lib\asyncio\

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-16 Thread Ben Feinstein
Ben Feinstein <feinstein...@gmail.com> added the comment: General loggers are used in the standard way (message, args, etc), but data loggers are used for different types of data. Instead of message, they receive the experiment results (dict/list/np.array/binary data) and their `formatM

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-15 Thread Ben Feinstein
Ben Feinstein <feinstein...@gmail.com> added the comment: I use the logging module to log records of lab experiments. I have two types of loggers, one for experiment results ("data") and another for general information. I think that having a different managers for data loggers is

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-14 Thread Ben Feinstein
Ben Feinstein <feinstein...@gmail.com> added the comment: Here is a code that demonstrate the bug: ```python import logging class LogRecordTypeFilter(logging.Filter): def __init__(self, cls): self.cls = cls def filter(self, record): t = type(record)

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-12 Thread Ben Feinstein
Change by Ben Feinstein <feinstein...@gmail.com>: Removed file: https://bugs.python.org/file47478/issue_logRecordFactory.py ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-12 Thread Ben Feinstein
Change by Ben Feinstein <feinstein...@gmail.com>: -- keywords: +patch pull_requests: +5848 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-12 Thread Ben Feinstein
New submission from Ben Feinstein <feinstein...@gmail.com>: In logging.Manager, the logRecordFactory attribute is never used. One would expect that makeRecord() (in logging.Logger) would generate a record using its manager's logRecordFactory, or fallback to the global _logRecordF

[issue33020] Tkinter old style classes

2018-03-07 Thread Ben Kirshenbaum
New submission from Ben Kirshenbaum <benki...@gmail.com>: Tkinter objects cannot handle the super() function, and probably other functions (I only found a problem with super()) -- components: Tkinter messages: 313397 nosy: benkir07 priority: normal severity: normal status: open

[issue18533] Avoid error from repr() of recursive dictview

2018-01-27 Thread Ben North
Ben North <b...@redfrontdoor.org> added the comment: Terry in msg310785: > As I expected from the fact that Ben once did a separate 2.7 > version, the auto backport for 2.7 failed. Ben, since you know what > code changes are needed, can you prepare a backport (cherry pick) >

[issue18533] Avoid error from repr() of recursive dictview

2018-01-27 Thread Ben North
Change by Ben North <b...@redfrontdoor.org>: -- pull_requests: +5203 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

<    1   2   3   4   5   6   >