[issue28768] Warning: implicit declaration of function '_setmode'

2016-11-22 Thread Martin Panter
Martin Panter added the comment: The Modules/main.c change at least looks reasonable as a bug fix. In the long term, it would be nice to clean up some of the conditions for including . Currently it is unconditional via PC/pyconfig.h, configure.ac optionally enables HAVE_IO_H, and there are

[issue28771] Update documented signatures of tp_get/setattr

2016-11-22 Thread Martin Panter
New submission from Martin Panter: https://docs.python.org/3.7/c-api/typeobj.html#c.PyTypeObject.tp_getattr tp_getattr and tp_setattr take a non-const char pointer in their signatures, but the documentation points to PyObject_GetAttrString() etc which were changed to take const char pointers

[issue4347] Circular dependency causes SystemError when adding new syntax

2016-11-22 Thread Martin Panter
Martin Panter added the comment: I’m not sure I understand your questions Brett (Which tokenizer? What rebuilding?), but I will try to explain some relevant parts. My main goal is to add a makefile dependency of parsetok.o on $(GRAMMAR_H). In Python 3, that is easy, and (I realize now) my

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Martin Panter
Martin Panter added the comment: Hmm, it seems I already discovered this leak six months ago: https://bugs.python.org/review/27100 -- ___ Python tracker <http://bugs.python.org/issue27

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-22 Thread Martin Panter
Martin Panter added the comment: https://mail.python.org/pipermail/python-checkins/2016-November/147171.html test_collections leaked [0, 0, 7] memory blocks, sum=7 test_contextlib leaked [38, 38, 38] references, sum=114 test_contextlib leaked [13, 12, 12] memory blocks, sum=37 test_descr leaked

[issue28763] Use en-dashes for ranges in docs

2016-11-22 Thread Martin Panter
Martin Panter added the comment: My Australian Style Manual says to use en rules for spans of figures etc. Wikipedia mentions some other guides: <https://en.wikipedia.org/wiki/Dash#Ranges_of_values>; apparently some prefer the hyphen. That is why I said it is a style issue, not a bla

[issue28769] Make PyUnicode_AsUTF8 returning "const char *" rather of "char *"

2016-11-22 Thread Martin Panter
Martin Panter added the comment: No opinion if this is a good change to make, but I left some review suggestions -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue28

[issue28763] Use en-dashes for ranges in docs

2016-11-21 Thread Martin Panter
Martin Panter added the comment: Sure, I was just saying that for whatever reason, 50% of the documentation uses hyphens for number ranges, and 50% uses en dashes. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28766] Remove the semicolon in source code

2016-11-21 Thread Martin Panter
Martin Panter added the comment: This was added to 2.7 in r68532 (Issue 4879), but the semicolon never made it to the Python 3 branch that I can see, so I don’t think there is anything to fix there. Your patch is against the 2.7 branch, which is only open for bug fixes now, and I don’t think

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-21 Thread Martin Panter
Changes by Martin Panter : -- superseder: Warning -- warnings.filters was modified by test_warnings -> Implement comparison (x==y and x!=y) for _sre.SRE_Pattern ___ Python tracker <http://bugs.python.org/issu

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-21 Thread Martin Panter
Martin Panter added the comment: As long as we are restricted by backwards compatibility, it will be hard to find a hack-free solution. The ideal solution IMO is to re-create _warnings.filters from scratch when _warnings is reloaded, but such a change would be safer only for 3.7. So I am

[issue28763] Use en-dashes for ranges in docs

2016-11-21 Thread Martin Panter
Martin Panter added the comment: Personally I prefer en dashes where practical, but I fear the change may conflict with other people’s styles and preferences. I quickly counted 22 single hyphens (obviously I missed a few that your patch caught) and also 22 existing en dashes

[issue28743] test_choices_algorithms() in test_random uses lots of memory

2016-11-21 Thread Martin Panter
Martin Panter added the comment: Thanks Raymond, now the test is noticeably faster and fine with my memory situation :) -- stage: -> resolved ___ Python tracker <http://bugs.python.org/issu

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Martin Panter
Martin Panter added the comment: The committed change looks wrong in the new example. I think Mariatta’s patch was right; it the index found is 3, not 2: >>> a [66.25, 333, -1, 333, 1, 1234.5, 333] >>> a.index(333) 1 >>> a.index(333, 2) # search for 333 starting at

[issue28743] test_choices_algorithms() in test_random uses lots of memory

2016-11-21 Thread Martin Panter
Martin Panter added the comment: Gareth, are you sure that fixes the main memory problem? Did you see Serhiy’s cum_weights list? Looking at the code, a list of every number from one to 13 million will use more memory (to hold each unique integer) than the initial list of repeated ones. I

[issue28532] Show sys.version when -V option is supplied twice.

2016-11-21 Thread Martin Panter
Martin Panter added the comment: The text looks okay. I’m not sure about putting it in the “Porting to Python 3.6” section, but there doesn’t seem to be a more appropriate existing heading. Perhaps we need a new heading, say “Other Improvement”, near “Optimizations” and “Build and C API

[issue28532] Show sys.version when -V option is supplied twice.

2016-11-21 Thread Martin Panter
Martin Panter added the comment: Ned indicated he was open to the idea: <http://mid.mail-archive.com/nu39u2$9ri$1...@blaine.gmane.org>. Maybe just double check; there’s still a few hours left! I’m not sure, but maybe there should be “.. versionchanged:: 3.6” in the RST documentation,

[issue4347] Circular dependency causes SystemError when adding new syntax

2016-11-20 Thread Martin Panter
Martin Panter added the comment: Equivalent patch for 2.7 -- Added file: http://bugs.python.org/file45576/graminit-dep.py2.patch ___ Python tracker <http://bugs.python.org/issue4

[issue25659] ctypes.Array.from_buffer segmentation fault when trying to create from array.array

2016-11-20 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10656] "Out of tree" build fails on AIX

2016-11-20 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10656] "Out of tree" build fails on AIX

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Okay I will assume that $(srcdir) reference was just due to a mistake or bad cargo-culting then. Will commit this soon unless anyone has a good idea to avoid embedding @abs_srcdir@. -- stage: patch review -> commit rev

[issue28548] http.server parse_request() bug and error reporting

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Okay committed to 3.7 for the moment. I think that is all we can reasonably do unless we drop the pseudo-HTTP-0.9 support. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed _

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Thanks Mariatta. Some people like to use the warn(stacklevel=2) parameter, then the warning message is potentially more useful. Also, I think it would be good to write a brief test case for the warning. There are probably lots of examples in the test suite

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-18 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review versions: +Python 3.6, Python 3.7 ___ Python tracker <http://bugs.python.org/issue20572> ___ ___ Python-

[issue25659] ctypes.Array.from_buffer segmentation fault when trying to create from array.array

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Here is a patch implementing Eryk’s suggestion, for both from_buffer() and from_buffer_copy() methods. This is exactly how it is already handled for Array.from_address(). The two buffer methods were added more recently than from_address(). -- keywords

[issue28743] test_choices_algorithms() in test_random uses lots of memory

2016-11-18 Thread Martin Panter
New submission from Martin Panter: Revision 32bfc8b6 added test.test_random.MersenneTwister_TestBasicOps.test_choices_algorithms(), which runs the following code: n = 13132817 # 13 million self.gen.choices(range(n), [1]*n, k=1) When I build Python with the “--with-pydebug” configure

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Here is another way to remember that the filter list has already been initialized. I made a new immortal _warnings.filters_initialized flag at the C level. It is actually a list so that it can be mutated and remembered across module reloads, but it is either

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-18 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file45542/immortal-filters.patch ___ Python tracker <http://bugs.python.org/issue28688> ___ ___ Python-bug

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Having an unassigned f-string as the first statement is still valid syntax, so could at most be a warning, not a SyntaxError. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Actually, testing your code fragment, it seems you do get a doc string when the f-string has no substitutions in curly brackets, otherwise you don’t get any doc string. Maybe this is due to how different forms of string are compiled. >>>

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Martin Panter
Martin Panter added the comment: There was a bit of discussion at the top of <https://bugs.python.org/issue25179#msg254298>. IMO it would be simpler do disallow all f-strings as docstrings. Otherwise, what would the result of this be: name = "module level" class C: nam

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-18 Thread Martin Panter
Martin Panter added the comment: I think other people wanted to add an automated deprecation warning in the code first, before removing it. -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue20

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-18 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file42579/downloadfile.htm ___ Python tracker <http://bugs.python.org/issue20572> ___ ___ Python-bug

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread Martin Panter
Martin Panter added the comment: I didn’t really like adding the _add_filter() special handling in the first place, but I went ahead because I couldn’t think of a better way to avoid the problem with reloading the warnings modules. So unless anyone can suggest anything better, I am okay with

[issue28728] test_host_resolution in test_socket fails on duplicate assert

2016-11-17 Thread Martin Panter
Martin Panter added the comment: That’s not exactly a duplicate; one is host-by-NAME, the other host-by-ADDR -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue28

[issue28700] test_dbm failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6)

2016-11-15 Thread Martin Panter
Martin Panter added the comment: Is the problem something like a missing C function prototype? Maybe you see compiler warnings, but the compiler and linker carry on with the wrong prototype. If you build with “make -s”, warnings might be easier to see. If my guess is right, this would be

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2016-11-14 Thread Martin Panter
Martin Panter added the comment: BTW my understanding is that currently, if the garbage collector deletes a generator, it effectively calls its close() method. When close() is called, it throws GeneratorExit into the suspended generator. This is meant to cause all the “with” and “try

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2016-11-13 Thread Martin Panter
Martin Panter added the comment: Perhaps I shouldn’t have mentioned “del gen”. That was meant to represent the garbage collector running and calling gen.__del__() or equivalent. Basically what I was trying to say is I think there will be two classes of generators: 1. Simple generators just

[issue28000] Build fails on AIX with _LINUX_SOURCE_COMPAT flag

2016-11-13 Thread Martin Panter
Martin Panter added the comment: I committed your patches for 3.5+ and 2.7. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker <http://bugs.python.or

[issue28016] test_fileio fails on AIX

2016-11-13 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.7 ___ Python tracker <http://bugs.python.or

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2016-11-13 Thread Martin Panter
Martin Panter added the comment: This would be hard to get right, but maybe not impossible. If the frame is suspended, and will do special handling of GeneratorExit, a ResourceWarning would be nice in most cases. But if the frame will not catch any exception, there should be no

[issue8840] truncate() semantics changed in 3.1.2

2016-11-13 Thread Martin Panter
Martin Panter added the comment: In general I agree with the doc strings giving the main details, and leaving smaller details for the reference documentation. Maybe for concrete implementations like BytesIO, it is not worth saying the expanded contents are undefined. One other way to make

[issue23839] Clear caches after every test

2016-11-13 Thread Martin Panter
Martin Panter added the comment: When I run the tests with -Werror (or any other -W option), I now get 2 tests altered the execution environment: test___all__ test_warnings -- nosy: +martin.panter ___ Python tracker <http://bugs.python.

[issue28678] tarfile extract docs inconsistent naming of parameter numeric_owner or numeric_only

2016-11-13 Thread Martin Panter
Martin Panter added the comment: Thanks Lewis -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28678] tarfile extract docs inconsistent naming of parameter numeric_owner or numeric_only

2016-11-13 Thread Martin Panter
Martin Panter added the comment: The offending commit is revision 6b70f16d585a. The true name is numeric_owner; numeric_only is wrong. The name also needs fixing in Doc/whatsnew/3.5.rst. -- nosy: +martin.panter ___ Python tracker <h

[issue28646] Using a read-only buffer.

2016-11-13 Thread Martin Panter
Martin Panter added the comment: Issue 11427 has some discussion about this. It seems one concern was to make it hard to modify the buffer of a bytes object (which is supposed to be immutable). But I agree there should be an easy way to access read-only buffers in ctypes. Perhaps that could

[issue28485] compileall.compile_dir(workers=) does not raise ValueError if multithreading disabled

2016-11-04 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue4347] Circular dependency causes SystemError when adding new syntax

2016-11-04 Thread Martin Panter
Martin Panter added the comment: Here is a patch for Python 3 implementing my idea. There is already code conditionally compiled out for the pgen build, so my patch just expands that to avoid the "graminit.h" include and derived functions. -- stage: needs patch -> patch

[issue25868] test_eintr.test_sigwaitinfo() hangs on "AMD64 FreeBSD CURRENT 3.x" buildbot

2016-11-04 Thread Martin Panter
Martin Panter added the comment: My patch doesn’t help answer the question of why this only fails on BSD, so I will hold off on committing it. However v2 has a minor update to skip the test when pthread_sigmask() is unavailable. -- versions: +Python 3.7 Added file: http

[issue28542] document cross compilation

2016-11-04 Thread Martin Panter
Martin Panter added the comment: Actually I think it is good to document DESTDIR (you weren’t seem aware of it before?). I was just pointing out that it is useful to more than just Android. Perhaps Guido shouldn’t have trimmed it from the 2.7 readme (original text: https://hg.python.org

[issue28594] List define and Change result

2016-11-03 Thread Martin Panter
Martin Panter added the comment: I haven’t looked at your code, but I think you may have misunderstood how variable assignments work in Python. See <https://docs.python.org/3.5/faq/programming.html#why-did-changing-list-y-also-change-list-x>. When you assign an object such as [0, 0

[issue28548] http.server parse_request() bug and error reporting

2016-10-31 Thread Martin Panter
Changes by Martin Panter : -- versions: +Python 3.7 -Python 3.5 Added file: http://bugs.python.org/file45300/parse-version.v2.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28542] document cross compilation

2016-10-31 Thread Martin Panter
Martin Panter added the comment: Regarding 2.7, I guess it depends on your definition of “support”. People have been cross-compiling Python 2.7 longer than I have been working on Python. In the past I have tried to apply cross compilation fixes to 2.7. But if you are only confident about 3.6

[issue28570] httplib mishandles unknown 1XX status codes

2016-10-31 Thread Martin Panter
Martin Panter added the comment: Consuming and ignoring 1xx responses seems reasonable for general cases. Treating 101 (Switching Protocols) as a special case also seems reasonable. I also agree it would be good to provide an API to return these responses (at least after the request is

[issue28513] Document zipfile CLI

2016-10-31 Thread Martin Panter
Martin Panter added the comment: Apparently (haven’t tried myself) if you put “.. program:: zipfile” before the :option: invocations, it changes the default context and you don’t need the bit. The text in general looks fine. One very minor thing: I would use a hyphen when “command line” is

[issue28532] Show sys.version when -V option is supplied twice.

2016-10-30 Thread Martin Panter
Martin Panter added the comment: Sorry, I should have said: the other two files (Misc/python.man and Modules/main.c) also need an extra “the”, like you changed in Doc/using/cmdline.rst. Other than that, it looks okay to me. But I guess you could add a quick test case in Lib/test

[issue26638] Avoid warnings about missing CLI options when building documentation

2016-10-29 Thread Martin Panter
Martin Panter added the comment: For the “unittest” module, I added separate text with a link: (see Warning control). Similarly for “timeit” in 2.7. Now the only Sphinx warnings I get are a handful about syntax highlighting, and two genuine ones relating to the missing -b documentation (Issue

[issue28532] Show sys.version when -V option is supplied twice.

2016-10-29 Thread Martin Panter
Martin Panter added the comment: I left some review comments. Also (as a native English speaker), I think it is okay to drop the third line about “multiple times”. You already say it may be given twice in the line above. -- nosy: +martin.panter

[issue11681] -b option undocumented

2016-10-29 Thread Martin Panter
Martin Panter added the comment: As well as the usage string, it is missing from the list of options in the main documentation at Doc/using/cmdline.rst. There are a couple of places (sys.rst and warnings.rst) that reference :option:`-b`, and newer versions of Sphinx complain about this

[issue25660] tabs don't work correctly in python repl

2016-10-28 Thread Martin Panter
Martin Panter added the comment: Clément: Yes, that sounds like the intended behaviour, at least when using Readline. Originally discussed in Issue 23441 and Issue 22086. (Though I think the change in behaviour when completion is called outside of Readline is a bug

[issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux

2016-10-28 Thread Martin Panter
Martin Panter added the comment: Looks good to me :) -- ___ Python tracker <http://bugs.python.org/issue28444> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28542] document cross compilation

2016-10-28 Thread Martin Panter
Martin Panter added the comment: Thanks, this looks like a decent start. I’m not that familiar with cross-compiling Python, but here are a couple questions: $(cd /path/to/source && pwd)/configure Why do you use $(pwd) here? I have mainly seen relative paths used (my own experime

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-28 Thread Martin Panter
Martin Panter added the comment: In general, I would be against stripping square brackets if the host and port have already been separated, e.g. in the address tuple used with socket.create_connection() etc. It feels like unnecessary double processing, which should already have been done at a

[issue28548] http.server parse_request() bug and error reporting

2016-10-28 Thread Martin Panter
Martin Panter added the comment: Here is a patch to parse the version from the request in more cases. Since it is more of a cosmetic improvement for handling erroneous requests, I would probably only apply it to the next Python version (3.7 atm). Or do you think it should go into bug fix

[issue10721] Remove HTTP 0.9 server support

2016-10-28 Thread Martin Panter
Martin Panter added the comment: Here is a slightly updated patch I have been sitting on. I think the main difference was tweaks to the documentation. Issue 28548 would also benefit if the HTTP 0.9 code was removed. The presence of the HTTP 0.9 code means a suboptimal response is sent in some

[issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9

2016-10-28 Thread Martin Panter
Martin Panter added the comment: Since my last comment, I have become more confident that Python’s request parsing never supported proper HTTP 0.9. So I would prefer to remove it in the next version of Python, and not bother fixing Xiang’s bug in existing versions (unless someone offers a

[issue28548] http.server parse_request() bug and error reporting

2016-10-28 Thread Martin Panter
Martin Panter added the comment: Parsing the version from words[-1] rather than words[2] may be a minor improvement however. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28548] http.server parse_request() bug and error reporting

2016-10-28 Thread Martin Panter
Martin Panter added the comment: I think you should be able to reproduce this without Mailman or tox, by just running “python -m http.server”. The problem is the “HTTP/0.9” protocol that Python is assuming does not include a header section, so there is no place to put a 400 status code or

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Martin Panter
Martin Panter added the comment: I tried the original revision 433606e9546c code in Python 2.7 (which still allows mixed tabs and spaces), and it behaves the same as the current version. Thus I suspect revision 9e2b94a3b5dc did not change any behaviour. What is your use case? Why can’t you

[issue28539] httplib/http.client HTTPConnection._set_hostport() regression

2016-10-26 Thread Martin Panter
Martin Panter added the comment: You say this is a regression. Can you point to a version that worked as you want? The IPv6 URL handling you pointed out seems to have been added to 2.4b1, and then backported to 2.3.5. I expect that earlier versions didn’t support IPv6 URLs at all. Also, it

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-25 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue4347] Circular dependency causes SystemError when adding new syntax

2016-10-25 Thread Martin Panter
Martin Panter added the comment: I occasionally get the following error, due to Parser/parsetok.o being older than Include/graminit.h. ./python -E -S -m sysconfig --generate-posix-vars ; if test $? -ne 0 ; then echo "generate-posix-vars failed" ; rm -f ./pybuilddir.txt ; exit 1 ;

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-10-25 Thread Martin Panter
Martin Panter added the comment: Regarding out-of-tree builds (Problem 3), see Issue 10656, which already has a potential patch. -- ___ Python tracker <http://bugs.python.org/issue18

[issue10656] "Out of tree" build fails on AIX

2016-10-25 Thread Martin Panter
Martin Panter added the comment: Actually, why do you remove $(srcdir) for Modules/python.exp? This code was added in r88426; see <https://bugs.python.org/issue941346#msg128586>. -- ___ Python tracker <http://bugs.python.org/i

[issue10656] "Out of tree" build fails on AIX

2016-10-25 Thread Martin Panter
Martin Panter added the comment: The idea of the patches makes sense to me. Embedding the name of whatever directory Python was built in into the installed version of Modules/ld_so_aix.in does not seem very clean to me. Is there another way of doing this? Perhaps a file copy or symlink

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-10-25 Thread Martin Panter
Martin Panter added the comment: Michael F.: It sounds like you have three separate but related problems: 1. Confusion between LDSHARED and BLDSHARED referring to the in-source build tree vs final installed files. I think this is what David and Michael H. were originally trying to fix here

[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Martin Panter
Martin Panter added the comment: Perhaps it is okay to keep the documentation changes, but I think either the library changes should be reverted or worked around where the modules are still in use. I normally run the tests with -Werror, and the failures I get are: * test_ssl, test_smtplib

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-25 Thread Martin Panter
Martin Panter added the comment: I agree it is good to explicitly document the __enter__() result, rather than relying on assumptions and example code. The patch looks good to me. I don’t understand the problem with pop_all() though. Is there still a problem if we apply your patch

[issue28536] Show the qualified name when a call fails

2016-10-25 Thread Martin Panter
Martin Panter added the comment: Perhaps you should merge your work with Issue 2786. With a very brief look, the patches seem to take a similar approach. -- nosy: +martin.panter resolution: -> duplicate superseder: -> Names in function call exception should have class nam

[issue28435] test_urllib2_localnet.ProxyAuthTests fails with no_proxy and NO_PROXY env

2016-10-21 Thread Martin Panter
Martin Panter added the comment: I altered the comment (looks like it was a copy from code forcing proxies to be bypassed). Also, I didn’t port the second no_proxy fix to 2.7; it looks like there is a different workaround there which is not affected by the environment. -- resolution

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-21 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file45180/subprocess3-2.7.patch ___ Python tracker <http://bugs.python.org/issue26240> ___ ___ Python-bug

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-21 Thread Martin Panter
Martin Panter added the comment: Here are corresponding patches for 3.5 and 2.7. -- stage: patch review -> commit review Added file: http://bugs.python.org/file45179/subprocess3-3.5.patch ___ Python tracker <http://bugs.python.org/issu

[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-10-21 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue28482] test_typing fails if asyncio unavailable

2016-10-21 Thread Martin Panter
Martin Panter added the comment: Yep, working well. Thanks Guido & Ivan. -- stage: commit review -> resolved ___ Python tracker <http://bugs.python.org/

[issue28482] test_typing fails if asyncio unavailable

2016-10-21 Thread Martin Panter
Martin Panter added the comment: I will this to Git Hub when I get a chance to get set up, if that helps though :) -- ___ Python tracker <http://bugs.python.org/issue28

[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-10-21 Thread Martin Panter
Martin Panter added the comment: Modifying the API to accept a keyword argument is not worthwhile IMO. That means modifying modules like http.client and zipfile (which use the wrong keyword name), and user-defined implementations may become incompatible. The question of documentation is

[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

2016-10-20 Thread Martin Panter
Martin Panter added the comment: The minus sign might have been deliberate at some stage, but I realize it is more accessible etc if it was ASCII -1, so I will change that. The idea of changing the signature is to avoid people thinking it accepts a keyword argument. See e.g. Issue 25030 for

[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2016-10-20 Thread Martin Panter
Martin Panter added the comment: I just got this failure again today. I think I have seen it once or twice before. Is the failure actually indicating a problem with Python, or is the test just too strict? It seems that it may be like a test ensuring that a random.randint(1, 100) is never

[issue28484] test_capi, test_regrtest fail when multithreading disabled

2016-10-20 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-20 Thread Martin Panter
Martin Panter added the comment: V3 looks good to me -- ___ Python tracker <http://bugs.python.org/issue26240> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28478] Built-in module 'time' does not enable functions if -Werror specified in the build environment

2016-10-20 Thread Martin Panter
Changes by Martin Panter : -- title: Built-in module 'Time' does not enable functions if -Wno-error specified in the build environment -> Built-in module 'time' does not enable functions if -Werror specified in the build environment ___

[issue28480] Compile error on Modules/socketmodule.c

2016-10-20 Thread Martin Panter
Martin Panter added the comment: I also committed a similar but independent fix in Python 2.7 building Modules/_sqlite/connection.c, caused by revision 649937bb8f1c, and adjusted some tests to work when multithreading is disabled. For the record, I also opened Issue 28482, Issue 28484 and

[issue28485] compileall.compile_dir(workers=) does not raise ValueError if multithreading disabled

2016-10-20 Thread Martin Panter
New submission from Martin Panter: According to the documentation and tests, a negative value for the “workers” parameter to compileall.compile_dir() should trigger ValueError. But if Python is built with “configure --without-threads”, the parameter is not checked. So I propose a patch to fix

[issue28484] test_capi, test_regrtest fail when multithreading disabled

2016-10-20 Thread Martin Panter
New submission from Martin Panter: Two tests in test_capi assume that the GIL is always used, but I don’t think it is available when Python is built with “configure --without-threads”. So I propose to skip these tests if the “threading” module is unavailable. In test_regrtest, a test is rerun

[issue28482] test_typing fails if asyncio unavailable

2016-10-19 Thread Martin Panter
New submission from Martin Panter: If you compile with “configure --without-threads”, various tests are already skipped because they rely on multithreading. However test_typing does not seem to handle this. It tries to import “asyncio”, which seems to depend on multithreading. I presume it is

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-19 Thread Martin Panter
Martin Panter added the comment: . I left some comments on the code review. Also, I’m not sure about the links to the online documentation. We don’t do this for other modules as far as I know. The pydoc module and help() commands already add their own links, which can be configured via

[issue28480] Compile error on Modules/socketmodule.c

2016-10-19 Thread Martin Panter
Martin Panter added the comment: Thanks for the report and patch. I think an empty statement might be better than the dummy assignment. Let me know if the following would work and I will commit it: done: +; /* necessary for --without-threads flag */ Py_END_ALLOW_THREADS

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-19 Thread Martin Panter
Martin Panter added the comment: When I run your program on Linux (natively, and I also tried Wine), the worst behaviour I get is a busy loop as soon as a client shuts down the connection and recv() returns an empty string. I would have to force an exception in the top level code to trigger

[issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux

2016-10-19 Thread Martin Panter
Martin Panter added the comment: Your second patch looks better, given my limited understanding of the scripts involved. :) I left one more suggestion though. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28447] socket.getpeername() failure on broken TCP/IP connection

2016-10-19 Thread Martin Panter
Martin Panter added the comment: I haven’t tried running your program, but I don’t see anything stopping multiple references to the same socket appearing in the “mailbox” queue. Once the first reference has been processed, the socket will be closed, so subsequent getpeername() calls will be

<    3   4   5   6   7   8   9   10   11   12   >