[issue14075] argparse: unused method?

2013-08-30 Thread Madison May
Madison May added the comment: Any chance this issue could be reopened? I ran across this bit of code today when working on coverage for argparse. I'd like to again propose the removal or modification of _get_args. I understand that it's there primarily to be overridden, but even that's not

[issue18882] Add threading.main_thread() function

2013-08-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: There is updated patch. All tests pass. I've added docs for threading.main_thread() function also. -- Added file: http://bugs.python.org/file31530/issue18882-2.diff ___ Python tracker

[issue12037] test_email failures under Windows with the eol extension activated

2013-08-30 Thread R. David Murray
R. David Murray added the comment: Looks good to me, go ahead and push it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18891] Master patch for content manager addtion to email package.

2013-08-30 Thread R. David Murray
New submission from R. David Murray: Since the only way to get a rietveld review link for all the changes is to post a single complete patch, I'm doing so in this issue. Feel free to review based on either this or the separate patches posted in issue 18785, issue 18860, and issue 18890. Ther

[issue18418] Thread.isAlive() sometimes True after fork

2013-08-30 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: Thanks for accepting this patch! Antoine, I initially had trouble writing a test that reliably reproduced the bug, especially in Python 3.3. But I read other threading tests and got smarter. The final patch includes tests that are very reliable at reveal

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-30 Thread Tim Peters
Tim Peters added the comment: Nasty problem ;-) I don't understand the need for all the indirections in the second patch. Like, why use a weakref? It's not like we have to worry about an immortal tstate keeping a measly little lock object alive forever, right? Seems to me that if the tstat

[issue18890] Add a raw_data_manager content manager to the email package.

2013-08-30 Thread R. David Murray
Changes by R. David Murray : -- dependencies: +Add content manager API to email package ___ Python tracker ___ ___ Python-bugs-list ma

[issue18890] Add a raw_data_manager content manager to the email package.

2013-08-30 Thread R. David Murray
New submission from R. David Murray: This is the third of three layered patches that introduce a new content management API to the email package. This patch is layered on top of the patch in issue 18860. Unfortunately the fact that these patches are layered (which I did in hopes of making th

[issue12037] test_email failures under Windows with the eol extension activated

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Attached patch works here too. Only the test...rfc822 part applies to 3.3, both to 3.4. The same idea works for #18889 too. -- Added file: http://bugs.python.org/file31527/12037_test_email2.diff ___ Python tracker <

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: On #12037, David suggests instead the equivalent of this: with open(TEST_XMLFILE_OUT) as f: xml_test_out = f.read().encode('ascii') -- ___ Python tracker _

[issue11798] Test cases not garbage collected after run

2013-08-30 Thread Meador Inge
Meador Inge added the comment: I see some regressions when reference leak hunting with -j './python -j8 -R :' test test_ast crashed -- Traceback (most recent call last): File "/home/meadori/src/cpython/Lib/test/regrtest.py", line 1265, in runtest_inne r huntrleaks) File "/home/meadori/sr

[issue18889] test_sax: multiple failures on Windows desktop

2013-08-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: These are due to \r in line endings, as with #12037. File "F:\Python\dev\py34\lib\test\test_sax.py", line 634, in test_expat_file self.assertEqual(result.getvalue(), xml_test_out) Assert fails because off many \rs in xml_text_out. Same in line 649, in t

[issue12037] test_email failures under Windows with the eol extension activated

2013-08-30 Thread R. David Murray
R. David Murray added the comment: We have to be careful, since while Windows may no longer care about \r\n, the RFCs certainly do, and the email package is very concerned with the RFC. However, neither of these tests are testing linesep discipline, so it is fine to fix them. I've made review

[issue12037] test_email failures under Windows with the eol extension activated

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Two years later, I get the exact same failure in both repository 3.3.2+ and installed 3.3.2. So eol extension and .hgignore seem irrelevant. I sometime think Python should stop generating files with \r\n. In other words, change os.linesep to '\n' even on windo

[issue18858] dummy_threading lacks threading.get_ident() equivalent

2013-08-30 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18888] Add stdlib support for random sampling with replacement

2013-08-30 Thread Madison May
New submission from Madison May: Although the random module supports random sampling without replacement, there is no support for random sampling with replacement. Efficient random sampling with replacement is trivial using random.choice() (see below), but supporting it as an optional 'replac

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: The very fact that we would add a warning makes pickle unfit for the tutorial, IMHO. The tutorial should stick to simple enough stuff that doesn't need any warnings. -- ___ Python tracker

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-08-30 Thread Westley Martínez
Westley Martínez added the comment: Here's a patch that adds the warning, if we so choose to keep pickle in the tutorial. It's taken verbatim from the pickle module's documentation. -- keywords: +patch Added file: http://bugs.python.org/file31524/pickle-add-warning_18840.diff

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-08-30 Thread Westley Martínez
Westley Martínez added the comment: I won't question the usefulness of JSON. I'm not a web programmer and have never used it. From my interpretation of the tutorial, it seems that the section's purpose is for storing python objects. If pickle is going to stay in the tutorial, I think a warn

[issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP)

2013-08-30 Thread Westley Martínez
Westley Martínez added the comment: On 3.4.0a1 on Windows it seems to come up automatically with \ or \\. A single \ will only pop up with the tab key; I think it's good that way. Special characters (i.e. æ) work normally. All this said, I think this issue is fixed. --

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: > How about we simply add the warning from > http://docs.python.org/3/library/pickle.html#module-pickle to the beginning > (or end) of the section? That is one possibility. > The Official Python Tutorial has always assumed a certain programmer's > competence

[issue18825] Making msg optional on logging.exception() and similar variants

2013-08-30 Thread Vinay Sajip
Vinay Sajip added the comment: No, because in the general case, it would be useful to provide a message. If you don't want to, you can specify '', but there's no reason to make that the default. -- nosy: +vinay.sajip resolution: -> invalid status: open -> pending

[issue16853] add a Selector to the select module

2013-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: On Fri, Aug 30, 2013 at 6:34 AM, Charles-François Natali wrote: [Giampaolo Rodola'] > > - I'm not sure why in case of EINTR you retry with a different timeout; > > can't you just return []? > > Because when I do: > selector.select(10) > > I expect the selecto

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-08-30 Thread Westley Martínez
Westley Martínez added the comment: How about we simply add the warning from http://docs.python.org/3/library/pickle.html#module-pickle to the beginning (or end) of the section? The Official Python Tutorial has always assumed a certain programmer's competence. It's up to them if they want to

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Perhaps I am confused because I did not notice the switch between builtins.__import__ and importlib.__import__ -- and I do not know the relation between the two, if indeed they are two and not one. What I read and understood is * importlib.import_module doc sa

[issue18875] Automatic insertion of the closing parentheses, brackets, and braces

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have thought about such a feature also. I would at least like to have patch to try it out. Possible? I suspect so. -- nosy: +terry.reedy versions: +Python 3.4 -Python 2.7 ___ Python tracker

[issue18756] os.urandom() fails under high load

2013-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've committed the patch for the lazy opening approach. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18887] test_multiprocessing.test_connection failure

2013-08-30 Thread Charles-François Natali
New submission from Charles-François Natali: http://buildbot.python.org/all/builders/x86%20Windows7%202.7/builds/2211/steps/test/logs/stdio """ test_ignore_listener (test.test_multiprocessing.TestIgnoreEINTR) ... test test_multiprocessing failed -- Traceback (most recent call last): File "D:

[issue18877] tkinter askopenfilenames does not work in Windows library folder

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: There was a issue about people not being able to open windows 'library' files from Idle, but it was determined not to be an Idle problem. I cannot find it now. The outcome may have been that this was presumed to be a tk bug, but your report about the alternate

[issue18756] os.urandom() fails under high load

2013-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset acc7439b1406 by Antoine Pitrou in branch 'default': Issue #18756: os.urandom() now uses a lazily-opened persistent file descriptor, so as to avoid using many file descriptors when run in parallel from multiple threads. http://hg.python.org/cpython/

[issue18855] Inconsistent README filenames

2013-08-30 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue18823] Idle: use pipes instead of sockets to talk with user subprocess

2013-08-30 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8786] Add support for IEEE 754 contexts to decimal module.

2013-08-30 Thread Stefan Krah
Stefan Krah added the comment: BTW, in _decimal the feature can already be enabled with: ./configure CFLAGS=-DEXTRA_FUNCTIONALITY >>> IEEEContext(DECIMAL128) Context(prec=34, rounding=ROUND_HALF_EVEN, Emin=-6143, Emax=6144, capitals=1, clamp=1, flags=[], traps=[]) >>> IEEEContext(DECIMAL64) C

[issue17224] can not open idle in python 2.7.3

2013-08-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue18845] 2.7.5-r2: Fatal Python error: Segmentation fault

2013-08-30 Thread Tim Peters
Tim Peters added the comment: As issue 18843 has evolved, seems more likely now that it's flaky HW, but agreed in any case there's really no evidence of a Python problem here. So closing it. Martin, we can revisit this if there's real progress on the other issue. -- resolution: ->

[issue18853] Got ResourceWarning unclosed file when running Lib/shlex.py demo

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think the warning should be silenced on all versions where it occurs. There is no real problem here, but there can be with multiple opens without close on non-refcounted interpreters. Patch looks good but I have not tried it. -- nosy: +terry.reedy st

[issue18853] Got ResourceWarning unclosed file when running Lib/shlex.py demo

2013-08-30 Thread Madison May
Madison May added the comment: The patch LGTM as well. ResourceWarning was silenced after applying patch when tested on my machine. -- nosy: +madison.may ___ Python tracker ___

[issue18851] subprocess's Popen closes stdout/stderr filedescriptors used in another thread when Popen errors

2013-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed after applying Charles-François's suggested fixes. Thanks! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker __

[issue18851] subprocess's Popen closes stdout/stderr filedescriptors used in another thread when Popen errors

2013-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset c11754defe1c by Antoine Pitrou in branch '3.3': Forward port new tests from Issue #18851. http://hg.python.org/cpython/rev/c11754defe1c New changeset 290ca31d4cfe by Antoine Pitrou in branch 'default': Forward port new tests from Issue #18851. http:

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-30 Thread Brett Cannon
Brett Cannon added the comment: Not sure what doc discrepancy you are talking about, Terry. The docs for importlib are totally accurate which means no one has been accidentally mislead by them. This bug is about whether importlib.import_module() bypassing builtins.__import__ is a big enough de

[issue18851] subprocess's Popen closes stdout/stderr filedescriptors used in another thread when Popen errors

2013-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 43749cb6bdbd by Antoine Pitrou in branch '2.7': Issue #18851: Avoid a double close of subprocess pipes when the child process fails starting. http://hg.python.org/cpython/rev/43749cb6bdbd -- nosy: +python-dev __

[issue18831] importlib.import_module() bypasses builtins.__import__

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The discrepancy between doc and code should be eliminated. In this case, it seems the doc should be changed (in 3.3 as well). Would 'not' in the right place suffice? -- nosy: +terry.reedy ___ Python tracker

[issue18418] Thread.isAlive() sometimes True after fork

2013-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset ba54011aa295 by Charles-François Natali in branch '2.7': Issue #18418: After fork(), reinit all threads states, not only active ones. http://hg.python.org/cpython/rev/ba54011aa295 New changeset 29fce7f31539 by Charles-François Natali in branch '3.3'

[issue18855] Inconsistent README filenames

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: README.txt is also used in lib/idlelib and lib/idlelib/idle_test. In the latter case, I was told to use this. -- nosy: +terry.reedy ___ Python tracker

[issue18826] reversed() requires a sequence - Could work on any iterator?

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The two cases are not parallel. a = sorted(b) abbreviates a = list(b) a.sorted() which occurred often enough to be a nuisance. With this proposal, a = reversed(b) would abbreviate a = reversed(list(b)) which is probably less common and certainly less ob

[issue18845] 2.7.5-r2: Fatal Python error: Segmentation fault

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think this should be closed as extremely likely to be a matplotlib error. -- nosy: +terry.reedy ___ Python tracker ___ ___

[issue18418] Thread.isAlive() sometimes True after fork

2013-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well... I can't say anything except that the patch looks harmless. It's a pity the test failure is hard to trigger, though. -- ___ Python tracker __

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-30 Thread Tim Peters
Tim Peters added the comment: OK, it sounds to me like you do not have a reproducible test case, of any kind. It that's true, this bug report isn't going anywhere :-( Python isn't a memory-testing program, so it would be insanely inefficient for it to (for example) read up every byte it write

[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: For the tutorial, I agree with presenting json rather than pickle for all the reasons given, with pickle mentioned in a paragraph at the end (more powerful, more dangerous, see warning in manual before using). -- nosy: +terry.reedy stage: -> needs pat

[issue16853] add a Selector to the select module

2013-08-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm playing with devpoll on Open Solaris and it seems it works exactly as poll(). Basically a copy & paste of PollSelector class with a different self._poll attribute will suffice. With dev/poll support you now have 3 classes (PollSelector, EpollSelector, D

[issue18886] BytesGenerator does not handle 'binary' CTE correctly

2013-08-30 Thread R. David Murray
New submission from R. David Murray: ByteGenerator will assume that it can change any linesep characters to the linesep being used for the general message serialization, even if the content transfer encoding is 'binary'. This is incorrect, as existing \r and \n characters in binary parts must

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread Tim Peters
Tim Peters added the comment: Now you have something to show the matplotlib folks - although they're not likely to get excited about leaking 40 bytes. There is nothing Python can do about this. matplotlib is responsible for free'ing the memory matplotlib allocates, just as Python is responsib

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-30 Thread Martin Mokrejs
Martin Mokrejs added the comment: I think it would be of tremendous help if python reported the physical memory address though do not know how much work is that for you. I already said that, I wonder why memtest86+ could not find an error, I even tried other tools for that. Could --with-pydebu

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-30 Thread Tim Peters
Tim Peters added the comment: Martin, would it be possible to borrow someone else's machine and try to reproduce this? If you can, that would greatly reduce the probability of this being a HW error. It would also leave us with an exact set of commands to share so others can try it on their b

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-08-30 Thread Christian Heimes
Christian Heimes added the comment: It's not fixed in 3.1 and 3.2 yet. Please re-open the issue. I can't do it because I'm not at home. "Charles-François Natali" schrieb: > >Changes by Charles-François Natali : > > >-- >resolution: -> fixed >stage: patch review -> committed/rejected >

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread Martin Mokrejs
Changes by Martin Mokrejs : Added file: http://bugs.python.org/file31523/valgrind_python275_without-pymalloc.txt ___ Python tracker ___ ___ P

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-08-30 Thread Charles-François Natali
Charles-François Natali added the comment: Oops. -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue18852] site.py does not handle readline.__doc__ being None

2013-08-30 Thread Ned Deily
Ned Deily added the comment: The use of libedit is not restricted to OS X; in particular, some other BSD-derived distributions use it. There are some other open issues regarding generalization of support for libedit. So I don't think the proposed comments should be added to site.py. The doc

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread Martin Mokrejs
Martin Mokrejs added the comment: Of course I did recompile matplotlib to use the recompiled python with debug ABI. I just don't understand why if something is not leaded why a memleak has to happen. Anyway, now my application using the recompiled matplotlib baffled this through valgrind as w

[issue18844] allow weights in random.choice

2013-08-30 Thread Madison May
Madison May added the comment: [Mark Dickinson] > Both those seem like clear error conditions to me, though I think it would be > fine if the second condition produced a ZeroDivisionError rather than a > ValueError. Yeah, in hindsight it makes sense that both of those conditions should raise

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-08-30 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread Tim Peters
Tim Peters added the comment: The matplotlib people won't care about this one either. matplotlib allocated the memory, and the error message at the end says it's _trying_ to call _PyMem_DebugFree (which may well be trying to release the memory), but the binaries aren't compatible: _PyMem_Deb

[issue18418] Thread.isAlive() sometimes True after fork

2013-08-30 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +pitrou stage: patch review -> commit review versions: +Python 3.3, Python 3.4 ___ Python tracker ___ __

[issue18852] site.py does not handle readline.__doc__ being None

2013-08-30 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch with a comment about using pyreadline on Windows. Should the note in the readline documentation[1] be updated? [1] http://docs.python.org/3.4/library/readline.html (See also issue 5845 and msg123703) -- keywords: +patch stage: needs patc

[issue18438] Obsolete url in comment inside decimal module

2013-08-30 Thread Stefan Krah
Stefan Krah added the comment: Wikipedia sounds good. Let's avoid linking directly to "free" versions. :) -- ___ Python tracker ___ __

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread STINNER Victor
STINNER Victor added the comment: According to traces, the leak does not come from Python but matplotlib. Please report the issue to matplotlib bug tracker. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread Martin Mokrejs
Martin Mokrejs added the comment: Why do you think so? My point is that this happens when import fails. But python is at fault and should handle import errors. -- ___ Python tracker ___

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Stefan Krah
Stefan Krah added the comment: Well, these look like Gentoo build flags. Did you or "emerge" or anything else export CFLAGS in the shell? -- ___ Python tracker ___ __

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Martin Mokrejs
Martin Mokrejs added the comment: So I conclude that you want to say that some of the configure flags is wrong? Which? I can surely report that at Gentoo. I still think Makefile should be changed so that it make does not even try to compile xxlimited.c if -DPy_LIMITED_API=1 is in CFLAGS regard

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread R. David Murray
R. David Murray added the comment: Python2 doesn't support the limited ABI, so that flag is a noop for 2.7. -- ___ Python tracker ___

[issue18885] handle EINTR in the stdlib

2013-08-30 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +haypo, pitrou, sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-08-30 Thread Charles-François Natali
Charles-François Natali added the comment: 2013/8/30 Martin Mokrejs : > Per comment from Charles-François, so you mean that this single-bit change > won't be caught by valgrind, right? Why does not memtest86+ detect that? > Could python when compiled with the --with-pydebug print also physical,

[issue18885] handle EINTR in the stdlib

2013-08-30 Thread Charles-François Natali
New submission from Charles-François Natali: As discussed in http://mail.python.org/pipermail/python-dev/2013-August/128204.html, I think that we shouldn't let EINTR leak to Python code: it should be handled properly by the C code, so that users (and the Python part of the stdlib) don't have t

[issue18844] allow weights in random.choice

2013-08-30 Thread Mark Dickinson
Mark Dickinson added the comment: [Madison May] > - Should negative weights cause a ValueError to be raised, or should they be > converted to 0s? > - Should passing a list full of zeros as the weights arg raise a ValueError > or be treated as if no weights arg was passed? Both those seem lik

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Stefan Krah
Stefan Krah added the comment: I think I understand now: If you used the strategy from msg196520, of course you get the Gentoo flags. What you really should do is download a release or get a checkout from hg.python.org and build that _without_ using "emerge". -- ___

[issue18720] Switch suitable constants in the socket module to IntEnum

2013-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: I prefer two prettier loops over one less pretty one in this case. No opinion about _intenum_converter yet. (IMO refactoring can always be lazy, i.e. after you have multiple copies of the same code there's time to consider whether you should unify them and what

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Martin Mokrejs
Martin Mokrejs added the comment: Hmm, but I did not add -DPy_LIMITED_API=1. Python 2.7.5 can be compiled using same configuration. Going back to the build.log file I see: configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/shar

[issue18859] README.valgrind should mention --with-valgrind

2013-08-30 Thread Martin Mokrejs
Martin Mokrejs added the comment: Moreover, it should explain what that really does. One could think of several answers or even their combinations what this configure flag will really do: a) python will run itself under valgrind, don't bother ever doing it yourself b) you don't have to bother w

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Stefan Krah
Stefan Krah added the comment: Martin, msg196534 shows that you are building with -DPy_LIMITED_API=1. You can either use the limited API or --with-pydebug, but not both. [As I said in the other issue, IMHO it is better to use a minimal set of build options when reporting bugs.] --

[issue14914] pysetup installed distribute despite dry run option being specified

2013-08-30 Thread Éric Araujo
Éric Araujo added the comment: Contrary to other issues that are relevant to distlib/pip/others, this one can be closed. -- resolution: -> out of date stage: test needed -> committed/rejected status: open -> closed ___ Python tracker

[issue14974] rename packaging.pypi to packaging.index

2013-08-30 Thread Éric Araujo
Éric Araujo added the comment: The issue is moot now that packaging/distutils2 is stopped. -- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Martin Mokrejs
Martin Mokrejs added the comment: Uh. I don't understand. So did you want to say I should not run configure --with-pydebug in python 3.3 or what? I am fine if you fix the Makefile not to exit on this particular file. I am missing something. -- ___ P

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Martin Mokrejs
Martin Mokrejs added the comment: See for what I did to Gentoo: http://bugs.python.org/issue18843#msg196520 -- ___ Python tracker ___

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread R. David Murray
R. David Murray added the comment: I'm curious how this error gets triggered. I build python --with-pydebug on Gentoo all the time, albeit from a checkout, and I've never seen it. I'm imagining that means it is a Gentoo bug. Well, not even really a bug, since Gentoo doesn't itself support e

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Stefan Krah
Stefan Krah added the comment: A similar issue was closed, see msg157249. The error looks deliberate to me, so let's close this, too. -- nosy: +skrah resolution: -> works for me status: open -> closed ___ Python tracker

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +haypo, pitrou, skrah type: -> resource usage ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18882] Add threading.main_thread() function

2013-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > http://bugs.python.org/issue16500 is required to make work after > fork from thread other than the main one. No it isn't. Please take a look at _after_fork() in threading.py. -- dependencies: -Add an 'atfork' module _

[issue18720] Switch suitable constants in the socket module to IntEnum

2013-08-30 Thread Eli Bendersky
Eli Bendersky added the comment: [Thanks, Guido] Attaching patch with SOCK_* constants converted as well. The module globals are currently walked twice, once to extract AF_* and once SOCK_*. This is not a real performance problem, but should we fold it into a single loop that collects two dic

[issue18884] python-2.7.5-r3: 40 bytes in 1 blocks are definitely lost

2013-08-30 Thread Martin Mokrejs
New submission from Martin Mokrejs: It is not important why I had in this moment matplotlib not in sync with python itself whcih was configure using --with-pydebug ... but here I just want to show that maybe you do not test for memleaks using valgrind on import errors (maybe include such testc

[issue16853] add a Selector to the select module

2013-08-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > That should be pretty easy to add by someone who has access to a > Solaris box: I could use the buildbots, but it'd take a couple > iterations to get it right. I can probably help with that. -- ___ Python tracke

[issue16853] add a Selector to the select module

2013-08-30 Thread Charles-François Natali
Charles-François Natali added the comment: Hello, > - What about Solaris' /dev/poll? That should be pretty easy to add by someone who has access to a Solaris box: I could use the buildbots, but it'd take a couple iterations to get it right. > - I'm not sure why in case of EINTR you retry with

[issue18882] Add threading.main_thread() function

2013-08-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: http://bugs.python.org/issue16500 is required to make work after fork from thread other than the main one. -- dependencies: +Add an 'atfork' module ___ Python tracker

[issue18883] python-3.3.2-r2: Modules/xxlimited.c:17:error: #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG

2013-08-30 Thread Martin Mokrejs
New submission from Martin Mokrejs: Looks I cannot compile when python-3.3 was configured with --with-pydebug. I use Gentoo Linux, the -r2 shows they added some patches but should not matter I think. building 'xxlimited' extension x86_64-pc-linux-gnu-gcc -pthread -fPIC -Wno-unused-result -DDY

[issue17741] event-driven XML parser

2013-08-30 Thread Eli Bendersky
Eli Bendersky added the comment: This issue has become too large and discusses a few different things; hence I'm inclined to close it as fixed and open a new one as a placeholder for discussing the new design of the internals. I'll do this in a couple of days if there are no objections. -

[issue18852] site.py does not handle readline.__doc__ being None

2013-08-30 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue17741] event-driven XML parser

2013-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8fd72b1bb262 by Eli Bendersky in branch 'default': Issue #17741: Rename IncrementalParser and its methods. http://hg.python.org/cpython/rev/8fd72b1bb262 -- ___ Python tracker

[issue18882] Add threading.main_thread() function

2013-08-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: signal module reinitializes main_thread variable in PyOS_AfterFork, threading does nothing with forking. -- ___ Python tracker ___

[issue18882] Add threading.main_thread() function

2013-08-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: Patch with code and tests is attached. Test fails when program forks from thread other than the main one. -- keywords: +patch Added file: http://bugs.python.org/file31519/issue18882.diff ___ Python tracker

[issue18882] Add threading.main_thread() function

2013-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The function must take care of fork() in worker threads, too. The > isinstance(current_thread(), _MainThread) trick may not work. Well, there are two possibilities: - main_thread() returns the original _MainThread instance, even if it's dead in the child pro

  1   2   >