[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-25 Thread Matt Robenolt
Matt Robenolt added the comment: Is it worth investigating the different behavior then with `getaddrinfo` between platforms? As far as I know, that's the only method that works with both ipv6 and will tell you "here are all the IP addresses this r

[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-25 Thread Matt Robenolt
Matt Robenolt added the comment: Ah, I just confirmed broken behavior in macOS as well using `getaddrinfo()` in C. I guess I'd be ok with python ignoring this as well. Maybe worth a change to documentation to note this? -- ___ Python tr

[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-26 Thread Matt Robenolt
Matt Robenolt added the comment: > Why do you need octal addresses? What is your use case? :-p I didn't, but an attacker leveraged this to bypass security. We had checks against `127.0.0.1`, but this resolved to `177.0.0.1` incorrectly, bypassing the check. We were using `socket.getho

[issue27884] during 'make install', pre-existing site-packages residents are recompiled. Twice.

2016-08-28 Thread Matt Morrison
New submission from Matt Morrison: I've been building Python 3 from source on Linux for a long time (at least since 3.2 days), and I honestly can't remember if this has happened before 3.6 or not, which is why I'm only tagging this 3.6. Basically, when running 'make inst

[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-02-27 Thread Matt Clarke
New submission from Matt Clarke: I have had an issue arise with ctypes callbacks with 64bit Python on Windows. Note: everything works fine with 32bit Python on Windows and on 32bit and 64bit Linux. I have created a simple example to illustrate the issue I have (see attachment), but the real

[issue17451] Test to splitdoc in pydoc.py

2013-03-17 Thread Matt Bachmann
New submission from Matt Bachmann: Found a line in splitdoc that was not being exercised. I added a test for it. -- components: Library (Lib) files: splitdoc_description_test.patch keywords: patch messages: 184427 nosy: Matt.Bachmann priority: normal severity: normal status: open title

[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-03-18 Thread Matt Clarke
Matt Clarke added the comment: Hi Amaury. I have tried removing pack and using /Zp1, but it makes no difference. The size of callback_t and the one in C are 8 bytes. Thanks, Matt On 13 March 2013 13:19, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment

[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-03-18 Thread Matt Clarke
Matt Clarke added the comment: Hi Amaury. They are both 12 bytes. Matt -- ___ Python tracker <http://bugs.python.org/issue17310> ___ ___ Python-bugs-list mailin

[issue17451] Test to splitdoc in pydoc.py

2013-03-18 Thread Matt Bachmann
Changes by Matt Bachmann : Added file: http://bugs.python.org/file29444/acks.patch ___ Python tracker <http://bugs.python.org/issue17451> ___ ___ Python-bugs-list mailin

[issue17451] Test to splitdoc in pydoc.py

2013-03-18 Thread Matt Bachmann
Matt Bachmann added the comment: This has the test in the wrong place and I am actively expanding it. I will reopen later today. -- resolution: -> rejected status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
Changes by Matt Bachmann : -- components: +Tests type: -> enhancement ___ Python tracker <http://bugs.python.org/issue17464> ___ ___ Python-bugs-list mai

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
New submission from Matt Bachmann: Adds some test coverage to pydoc. -- files: pydoctests.patch keywords: patch messages: 184486 nosy: Matt.Bachmann priority: normal severity: normal status: open title: Improve Test Coverage Of Pydoc versions: Python 3.5 Added file: http

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
Matt Bachmann added the comment: Sure thing, ill make the improvements and upload a new patch. Thanks! -- ___ Python tracker <http://bugs.python.org/issue17

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
Matt Bachmann added the comment: --Changes assertequals to assertequal --Removes maxdiff as it should not really be there in the first place --Creates an explicit testdir, and cleans it up --Last patch did not actually apply cleanly... I reverted and applied this one and this seems to work

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
Matt Bachmann added the comment: Thanks for the feedback :-D Changes: Utilize test.support.temp_cwd() Removed imports that this made unnecessary Awesome trick! Cut line length down. Don't worry about nitpicking. Anything to get this to be as good as possible. I added an explanation t

[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann
Matt Bachmann added the comment: Eh, sorry... I tried to do a less fragile way of generating the configuration dict. Tried a few things but it very quickly got messy and even worse started to smell like testing the method with... the method being tested. I am open to ideas though

[issue17476] Pydoc allmethods does not return all methods

2013-03-18 Thread Matt Bachmann
New submission from Matt Bachmann: Somewhere between python 2.7 and now the definition of a method changed causing this helper method in pydoc to break. This was discovered in http://bugs.python.org/issue17464 by r.david.murray when he found it curious that a test I wrote was passing. I had

[issue17476] Pydoc allmethods does not return all methods

2013-03-18 Thread Matt Bachmann
Changes by Matt Bachmann : Removed file: http://bugs.python.org/file29472/pydoc_tests_v3.patch ___ Python tracker <http://bugs.python.org/issue17476> ___ ___ Python-bug

[issue17476] Pydoc allmethods does not return all methods

2013-03-18 Thread Matt Bachmann
Matt Bachmann added the comment: Yes! Sorry. -- Added file: http://bugs.python.org/file29474/fix_is_some_method.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17497] Unicode support for HTTP headers in http.client

2013-03-20 Thread Matt Tierney
New submission from Matt Tierney: Changed the headers string charset to utf-8 since a header field may contain non-iso-8859-1 characters. For instance, a Location header field may contain Cyrillic characters. -- components: Library (Lib) files: tierney.patch keywords: patch messages

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2013-03-21 Thread Matt Wheeler
Changes by Matt Wheeler : -- nosy: +funkyhat ___ Python tracker <http://bugs.python.org/issue6931> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17310] Ctypes callbacks shows problem on Windows Python (64bit)

2013-04-23 Thread Matt Clarke
Matt Clarke added the comment: It seems that any argument greater than 8 bytes is automatically converted to a references. Thus, changing to using ctypes.POINTER works. For example: callback_t = ctypes.CFUNCTYPE(None, ctypes.POINTER(myst_args)) Quite a simple solution in the end. Is it worth

[issue18020] html.escape 10x slower than cgi.escape

2013-05-20 Thread Matt Bryant
Matt Bryant added the comment: I did a few more tests and am seeing the same speed differences Florent noticed. It seems reasonable to use .replace() instead, as it does the same thing significantly faster. I've attached a patch doing just this. -- keywords: +patch nosy: +Teh

[issue7760] use_errno=True does not work

2013-05-22 Thread Matt Jones
Matt Jones added the comment: Is this really a documentation issue? Is it not generally understood that using absolute paths to libraries is a bad idea due to the amount of PATH/symlink spaghetti that the average file system contains? -- nosy: +Matt.Jones

[issue18045] get_python_version is not import in bdist_rpm.py

2013-05-23 Thread Matt Mao
New submission from Matt Mao: Python version : 2.7.5 OS : CentOS 6.3 When I tried to build a rpm with "python ./setup.py bdist_rpm", I get the following error : Traceback (most recent call last): File "setup.py", line 221, in ... and much more ;)&q

[issue8876] distutils should not assume that hardlinks will work

2014-10-14 Thread Matt Wright
Matt Wright added the comment: Here's another example of where this is a pain. An emerging workflow is using Docker for a Python environment. However, on OS X, its common to use boot2docker (a lightweight VM). With VirtualBox on OS X, its common to setup a shared folder between the hos

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-10-24 Thread Matt Frank
Changes by Matt Frank : -- nosy: +WanderingLogic ___ Python tracker <http://bugs.python.org/issue20306> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-10-24 Thread Matt Frank
Matt Frank added the comment: Here is shiz's patch extended with the addition to configure.ac. I added the variable HAVE_PASSWD_GECOS_FIELD and the appropriate tests. Luckily this very problem (missing pw_gecos field) is the example used in the autoconf manual (https://www.gnu.org/sof

[issue21668] The select and time modules uses libm functions without linking against it

2014-10-27 Thread Matt Frank
Changes by Matt Frank : -- nosy: +WanderingLogic Added file: http://bugs.python.org/file37041/audioop_ctypes_test_link_with_libm.patch ___ Python tracker <http://bugs.python.org/issue21

[issue21668] The select and time modules uses libm functions without linking against it

2014-10-27 Thread Matt Frank
Matt Frank added the comment: Additionally, * audioop calls floor() * _ctypes_test calls sqrt() Patch attached. -- ___ Python tracker <http://bugs.python.org/issue21

[issue21668] The select and time modules uses libm functions without linking against it

2014-10-27 Thread Matt Frank
Changes by Matt Frank : -- nosy: +freakboy3742 ___ Python tracker <http://bugs.python.org/issue21668> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-10-27 Thread Matt Frank
Changes by Matt Frank : -- nosy: +freakboy3742 ___ Python tracker <http://bugs.python.org/issue20306> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21668] The select and time modules uses libm functions without linking against it

2014-10-27 Thread Matt Frank
Matt Frank added the comment: >> audioop_ctypes_test_link_with_libm.patch > + libraries=['m']) > Why not using math_libs here? math_libs is defined in detect_modules(). But the _ctypes_test extension is defined in a different function: detec

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-27 Thread Matt Frank
New submission from Matt Frank: On systems where configure is unable to find langinfo.h (or where nl_langinfo() is not defined), configure undefines HAVE_LANGINFO_H in pyconfig.h. Then in pythonrun.c:get_locale_encoding() the call to nl_langinfo() is wrapped in an #ifdef, but the #else path

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Matt Frank
Matt Frank added the comment: My platform is the Android command-line shell. Essentially it is like an embedded linux platform with a very quirky partially implemented libc (not glibc). It has no langinfo.h and while it has locale.h, the implementations of setlocale() and localeconv() do

[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2014-10-31 Thread Matt Frank
Matt Frank added the comment: I am working on using my resources at Intel to put some pressure on Google to fix some of the (many) problems in the Bionic libc. I have a sort of "polyfill" library that implements locale.h, langinfo.h, as well as the structure definitions for wchar

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2014-11-05 Thread Matt Frank
Changes by Matt Frank : -- nosy: +WanderingLogic ___ Python tracker <http://bugs.python.org/issue16255> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16353] add function to os module for getting path to default shell

2014-11-05 Thread Matt Frank
Changes by Matt Frank : -- nosy: +WanderingLogic ___ Python tracker <http://bugs.python.org/issue16353> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5717] os.defpath includes unix /bin on windows

2014-11-05 Thread Matt Frank
Changes by Matt Frank : -- nosy: +WanderingLogic ___ Python tracker <http://bugs.python.org/issue5717> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16353] add function to os module for getting path to default shell

2014-11-05 Thread Matt Frank
Matt Frank added the comment: Unfortunately os.defpath seems to be hardcoded. And hardcoded to the wrong value on every system I have looked at, including Linux. Lib/posixpath.py sets defpath=':/bin:/usr/bin' which is _not_ what `getconf CS_PATH` returns on my Linux (the extra

[issue5717] os.defpath includes unix /bin on windows

2014-11-05 Thread Matt Frank
Matt Frank added the comment: os.defpath also seems wrong on Mac (':') and Linux (':/bin:/bin/sh'. The extra ':' at the beginning means the same thing as '.:/bin:/bin/sh' which is probably a security problem. I just started up discussion on http

[issue16353] add function to os module for getting path to default shell

2014-11-06 Thread Matt Frank
Matt Frank added the comment: In msg174930 Christian Heimes (christian.heimes) wrote: > I've tested confstr("CS_PATH") on Linux, Mac OS X, Solaris, HP-UX > and BSD. It works and the path to `sh` is always included. In msg230713 Ned Deily(ned.deily) wrote: > ignore Lib/ma

[issue16353] add function to os module for getting path to default shell

2014-11-06 Thread Matt Frank
Matt Frank added the comment: In msg230720 Akira Li (akira) wrote: > os.defpath is supposed to be ':'+CS_PATH, e.g., look at glibc (C library > used on Linux) sysdeps/posix/spawni.c I don't know whether it is > possible to change CS_PATH without recompiling every static

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2014-11-06 Thread Matt Frank
Matt Frank added the comment: Assuming issue16353 is fixed using http://bugs.python.org/file36196/os.get_shell_executable.patch the appropriate way to find the path to the default shell is by calling os.get_shell_executable(). This is the 1-liner patch that uses os.get_shell_executable() in

[issue22809] Include/graminit.h and Python/graminit.c always rebuilt (breaks cross builds)

2014-11-06 Thread Matt Frank
New submission from Matt Frank: changeset 92496:c2a53aa27cad (issue22359) broke cross builds. (Now "make touch; make" always tries to rebuild Include/graminit.h and Python/graminit.c by running "pgen". But "pgen" is a host executable and won't run on the

[issue22359] Remove incorrect uses of recursive make

2014-11-06 Thread Matt Frank
Matt Frank added the comment: Sorry, I'm complaining. Cross builds broke. Please see issue22809. -- nosy: +WanderingLogic ___ Python tracker <http://bugs.python.org/is

[issue11101] plistlib has no graceful way of handing None values

2014-12-03 Thread Matt Hansen
Changes by Matt Hansen : -- nosy: +Matt.Hansen ___ Python tracker <http://bugs.python.org/issue11101> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14099] ZipFile.open() should not reopen the underlying file

2015-01-06 Thread Matt Mackall
Matt Mackall added the comment: The committed fix breaks Mercurial. http://bz.selenic.com/show_bug.cgi?id=4492 The "underlying file-like object" in our case is a wsgirequest but anything else trying to serve a dynamically-generated zip file on the web will probably die.

[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-01-17 Thread Matt Bachmann
New submission from Matt Bachmann: PEP 3131 changed the definition of valid identifiers to match this pattern * . Currently if you have an invalid character in an identifier you get this error ☺ = 4 SyntaxError: invalid character in identifier This is fine in most cases. But in some cases

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2015-01-30 Thread Matt Frank
Matt Frank added the comment: Apologies. That last patch includes diffs to generated files (configure and pyconfig.h.in). This version just patches Modules/pwdmodule.c and configure.ac. After applying the patch please run "autoheader" and "autoconf" to correctly rege

[issue24882] ThreadPoolExceutor doesn't reuse threads until #threads == max_workers

2015-08-17 Thread Matt Spitz
New submission from Matt Spitz: https://hg.python.org/cpython/file/3.4/Lib/concurrent/futures/thread.py#l114 ThreadPoolExecutor will keep spawning new threads, even if existing threads are waiting for new work. We should check against the queue length when deciding to spawn a new thread to

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2015-08-17 Thread Matt Spitz
Changes by Matt Spitz : -- title: ThreadPoolExceutor doesn't reuse threads until #threads == max_workers -> ThreadPoolExecutor doesn't reuse threads until #threads == max_workers ___ Python tracker <http://bugs.pytho

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2015-08-17 Thread Matt Spitz
Matt Spitz added the comment: On further investigation, it appears that we can't just check against the queue length, as it doesn't indicate whether threads are doing work or idle. A change here will need a counter/semaphore to keep track of the number of idle/working threads, whic

[issue25250] AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

2015-09-27 Thread Matt Hickford
New submission from Matt Hickford: Hi distutils. I wrote a setup.py that conditions on compiler type, following the guide at [1]. I needed to add an extra include when the compiler is an msvc version older than 9.0 (infamously missing stdint.h [2]) Anyway the code I wrote to do this was: if

[issue25251] Unknown MS Compiler version 1900

2015-09-27 Thread Matt Hickford
New submission from Matt Hickford: Hi distutils. I previously used compiler=mingw32 with success. Today I installed Visual Studio 2015. Now compiler=mingw32 gives me an error File "c:\python35\lib\distutils\cygwinccompiler.py", line 86, in get_msvcr raise ValueError("Unkn

[issue25251] Unknown MS Compiler version 1900

2015-09-28 Thread Matt Hickford
Matt Hickford added the comment: Here's a patch that helped on my computer On 28 September 2015 at 00:29, Zachary Ware wrote: > > Changes by Zachary Ware : > > > -- > components: +Windows > nosy: +paul.moore, steve.dower, tim.golden, zach.ware

[issue25250] AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

2015-09-29 Thread Matt Hickford
Matt Hickford added the comment: Hi Steve. Thanks for your reply. In the end I went with your something similar to your third suggestion. It's important I wanted to condition on what compiler distutils is using *now* to the build the extension on my computer, rather than what compile

[issue25250] AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

2015-09-29 Thread Matt Hickford
Matt Hickford added the comment: It matters if you're trying to write a library that builds reliably 1. On Linux 2. On Windows compiler=msvc 3. On Windows compiler=mingw32 (many people set this in distutils.cfg [1]) ...for all Python versions 2.6 through 3.5 (24 combinations!) Anyway I

[issue25250] AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

2015-09-29 Thread Matt Hickford
Matt Hickford added the comment: Yes you're right. My setup.py if you're curious https://github.com/hickford/primesieve-python/blob/master/setup.py Separately, I think compiler=mingw32 is broken in Python 3.5 on computers with Visual Studio 2015 installed. http://bugs.python.org/iss

[issue25251] Unknown MS Compiler version 1900

2015-09-30 Thread Matt Hickford
Matt Hickford added the comment: I'm not sure what the correct analogue of msvcr100 is for Visual C++ 14.0. "msvcr140.dll no longer exists" http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx elif msc_ver == '1600':

[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-01 Thread Matt C
Changes by Matt C : -- nosy: +freshquiz ___ Python tracker <http://bugs.python.org/issue25294> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25302] Memory Leaks with Address Sanitizer

2015-10-02 Thread Matt Clarkson
New submission from Matt Clarkson: I have the following `main.cpp` ``` #include int main() { Py_Initialize(); if (!Py_IsInitialized()) return 1; Py_Finalize(); return 0; } ``` Compiled with on Arch Linux 4.2.1 gcc 5.2.0 python 3.4.3: ``` g++ -fsanitize=address main.cpp -o

[issue14373] C implementation of functools.lru_cache

2015-10-21 Thread Matt Joiner
Changes by Matt Joiner : -- nosy: -anacrolix ___ Python tracker <http://bugs.python.org/issue14373> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25472] Typing: Specialized subclasses of generics cannot be unpickled

2015-10-25 Thread Matt Chaput
New submission from Matt Chaput: If I try to pickle and unpickle an object of a class that has specialized a generic superclass, when I try to unpickle I get this error: TypeError: descriptor '__dict__' for 'A' objects doesn't apply to 'B' object Tes

[issue25251] Unknown MS Compiler version 1900

2015-11-22 Thread Matt Hickford
Matt Hickford added the comment: Hi Ateik. Find cygwinccompiler.py on your computer and copy the patch to the same folder. Then run the command `patch < patch.diff`. It that doesn't work, just open both files in a text editor and copy and paste the lines to the right place, you'l

[issue25714] Consider isinstance(..., numbers.Integral) instead of isinstance(..., int) or isinstance(..., (int, long)) in datetime.py

2015-11-23 Thread Matt Bogosian
New submission from Matt Bogosian: datetime.py is peppered with ``assert`` statements that are two restrictive. Specifically, ``isinstance(..., int)`` does not afford compatibility with alternate ``int``-like implementations (e.g., ``future.types.newint``). Some background: * https

[issue25714] Consider isinstance(..., numbers.Integral) instead of isinstance(..., int) or isinstance(..., (int, long)) in datetime.py

2015-12-01 Thread Matt Bogosian
Matt Bogosian added the comment: > I consider this as a bug and think that we should weak some of checks > isinstance(..., int) to isinstance(..., (int, long)). numbers.Integral is too > wide type, C implementation doesn't support it. Oddly enough, the C implementation is what i

[issue26352] getpass incorrectly displays password prompt on stderr on fallback

2016-02-12 Thread Matt Hooks
New submission from Matt Hooks: When calling getpass.getpass(), certain circumstances cause it to fallback to getpass.fallback_getpass, such as when swapping out sys.stdin for another object in a unit test. In such a circumstance, fallback_getpass may be called with stream=None when getpass

[issue26352] getpass incorrectly displays password prompt on stderr on fallback

2016-02-12 Thread Matt Hooks
Matt Hooks added the comment: Patch attached. I'm unsure whether forcing the warning message to stderr is the right choice here, but it seems unlikely that users would want their warning and password prompt on the same stream. The alternative here would be a second kwarg, but that

[issue11874] argparse assertion failure with brackets in metavars

2016-03-21 Thread Matt Pr
Matt Pr added the comment: Same AssertionError is also caused by having certain "choices". Python 2.7.10 global_options.add_argument('--field-sep', choices=[',',';','|','\t'], required=True, help='Field separator that separate

[issue26731] subprocess on windows leaks stdout/stderr handle to child process when stdout/stderr overridden

2016-04-10 Thread Matt Peters
New submission from Matt Peters: Tested in on Windows 8.1 with python 2.7.5. I have a parent process that creates a child process and calls communicate to get stdout/stderr from the child. The child process calls a persistent process, with stdout/stderr/stdin set to os.devnull, and then

[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-03-02 Thread Matt Bachmann
Matt Bachmann added the comment: Alrighty. I'll investigate and see if I can cut down the code some. If I can't significantly I'll let the issue die quietly. I agree that it's a pretty nitpick ticket. I noticed it while doing some research into unicode and made the p

[issue21672] Python for Windows 2.7.7: Path Configuration File No Longer Works With UNC Paths

2015-03-04 Thread Matt Mackall
Matt Mackall added the comment: Changeset 26ec62 regressed Mercurial. http://bz.selenic.com/show_bug.cgi?id=4557 Before: >>> ntpath.join(r'\\foo\bar\baz', '') 'foo\\bar\\baz\\' >>> ntpath.join(r'\\foo\bar', '') '\\\

[issue23652] ifdef uses of EPOLLxxx macros so we can compile on systems that don't have them

2015-03-12 Thread Matt Frank
New submission from Matt Frank: With the LSB (Linux Standard Base) headers for libc Modules/selectmodule.c fails to compile because we have code that uses EPOLLRDNORM, EPOLLRDBAND, EPOLLWRNORM and EPOLLMSG without first checking that they are defined. The patch wraps the five uses of

[issue23652] ifdef uses of EPOLLxxx macros so we can compile on systems that don't have them

2015-03-12 Thread Matt Frank
Changes by Matt Frank : -- type: -> compile error ___ Python tracker <http://bugs.python.org/issue23652> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-12 Thread Matt Frank
New submission from Matt Frank: When the faulthandler module is compiled at -O3 (the default for non-debug builds) with a compiler that does tailcall optimization the Modules/faulthandler.c:stack_overflow() function may become an infinite loop that does not expand the stack. This puts the

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-13 Thread Matt Frank
Matt Frank added the comment: Yes, this is currently only a problem with the Intel compiler. The writes to buffer[] are dead (provably won't be ever used) at the point that the recursive call occurs. Actually gcc and llvm can figure this out. Thus all the space allocated for the first

[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-23 Thread Matt Frank
Matt Frank added the comment: This is a patch that turns off the Intel Compiler's optimization for the stack_overflow() function. It turns out that icc doesn't support gcc's __attribute__((optimize("no-optimize-sibling-calls"))). Instead I used an ifdef'd in

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread Matt Chung
Matt Chung added the comment: Comparing to introom. Any reason to not wrap the entire in a try? Attached patch. -- nosy: +itsmemattchung Added file: http://bugs.python.org/file38793/issue23840.patch ___ Python tracker <http://bugs.python.

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread Matt Chung
Matt Chung added the comment: Curious, @haypo, are you looking for a new unittest or a function within an existing unit test? Perhaps go under TestTokenize? 1227 def test_main(): 1228 from test import test_tokenize 1229 support.run_doctest(test_tokenize, True) 1230

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread Matt Chung
Matt Chung added the comment: I believe it goes here under the TestTokenize class. Going to give it a shot now. -- ___ Python tracker <http://bugs.python.org/issue23

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread Matt Chung
Matt Chung added the comment: Updated patch based off of haypo's comment. Changed "except Exception as err:" -> "except" -- Added file: http://bugs.python.org/file38795/tokenize.patch ___ Python tracker <ht

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-01 Thread Matt Chung
Matt Chung added the comment: Based off of storchaka's comment, moving the -- Added file: http://bugs.python.org/file38799/tokenize.patch ___ Python tracker <http://bugs.python.org/is

[issue12807] Optimization/refactoring for {bytearray, bytes, unicode}.strip()

2015-04-14 Thread Matt Soucy
Changes by Matt Soucy : -- nosy: +msoucy ___ Python tracker <http://bugs.python.org/issue12807> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22848] Subparser help does not respect SUPPRESS argument

2015-04-15 Thread Matt Long
Matt Long added the comment: I prefer the idea of help=SUPPRESSED resulting in a "hidden" subcommand. That is, one that does not show up at all in the usage/help output: import argparse parser = argparse.ArgumentParser(prog='myapp') parser.add_argument('--

[issue22848] Subparser help does not respect SUPPRESS argument

2015-04-15 Thread Matt Long
Matt Long added the comment: Here's a patch for the proposal in my previous comment. As Barry mentioned, it wasn't as straightforward as I had hoped due to parts of the usage text being generated by the state of both self._name_parser_map and self._choices_actions. --

[issue23971] dict(list) and dict.fromkeys() doesn't account for 2/3 fill ratio

2015-04-17 Thread Matt Mackall
Matt Mackall added the comment: We already presize the output dict and have for ages. The question here is what size to use. In the current state, we use twice as much memory and CPU as necessary quite often because we end up spilling and growing... even though we apparently intentionally

[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error

2015-04-24 Thread Matt Chung
Matt Chung added the comment: Hey Haypo, I'm working on submitting the new patch now. Still getting used to the workflow and tools here. Thanks for being patient. You should see the new file in the next 30 minutes. -- ___ Python tracker

[issue24080] asyncio.Event.wait() Task was destroyed but it is pending

2015-04-30 Thread Matt Johnston
New submission from Matt Johnston: asyncio.Event.wait() doesn't seem to be cancelled by asyncio.wait_for(). Ctrl-c in the attached example produces output below. I'm not certain the code is correct though the documentation for wait_for() suggests it should work. Without the wai

[issue24230] tempfile.mkdtemp() doesn't work with bytes paths

2015-05-18 Thread Matt Mackall
Matt Mackall added the comment: Another way of putting it is: os.listdir() -> [,...] os.listdir() -> [,...] is the usual pattern, and tempfile isn't following it. -- nosy: +Matt.Mackall ___ Python tracker <http://bugs.python.

[issue28170] SystemError: returned NULL without setting an error

2016-09-15 Thread Matt Wright
New submission from Matt Wright: I'm experiencing a strange error when connecting to a web server with a self signed certificate. I've added the Root and Intermediate certs to the system CA bundle, and can `curl` against the server without any errors or using the `k` flag. But P

[issue28170] SystemError: returned NULL without setting an error

2016-09-15 Thread Matt Wright
Matt Wright added the comment: Ahh! Thanks much! -- ___ Python tracker <http://bugs.python.org/issue28170> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3604] broken link in curses module docs

2008-08-19 Thread Matt Beaumont-Gay
New submission from Matt Beaumont-Gay <[EMAIL PROTECTED]>: The link to the "Curses Programming with Python" page on the curses module doc page (http://www.python.org/doc/lib/module-curses.html) is broken; the correct link is apparently 'http://docs.python.org/

[issue21727] Ambiguous sentence explaining `cycle` in itertools documentation

2014-06-11 Thread Matt Deacalion Stevens
New submission from Matt Deacalion Stevens: https://docs.python.org/3.5/library/itertools.html#itertools.cycle The first sentence sounds a bit ambiguous: "Make an iterator returning elements from the iterable and saving a copy of each." Suggestion: "Make an iterator that return

[issue21727] Ambiguous sentence explaining `cycle` in itertools documentation

2014-06-12 Thread Matt Deacalion Stevens
Matt Deacalion Stevens added the comment: It's probably just me then. The code example is what helped me grasp `cycle`, not the explanation. -- ___ Python tracker <http://bugs.python.org/is

<    1   2   3   4   5   6