[issue24902] http.server: on startup, show host/port as URL

2015-08-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I like Felix's original suggestion. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-

[issue24880] ctypeslib patch for regular expression for symbols to include

2015-08-20 Thread Jan Wagner
Jan Wagner added the comment: Yes, hosted at svn.python.org, but without any means of "externally" filing a bug report or patch for it other than here on bugs.python.org. Maybe theller you could include this patch? Change status to closed + third party...? -- ___

[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-08-20 Thread Tim Peters
Tim Peters added the comment: It is really bad that roundtripping current microsecond datetimes doesn't work. About half of all microsecond-resolution datetimes fail to roundtrip correctly now. While the limited precision of a C double guarantees roundtripping of microsecond datetimes "far e

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2015-08-20 Thread Shiming He
Changes by Shiming He : -- nosy: +Shiming He ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue24355] Provide a unittest api for controlling verbosity in tests

2015-08-20 Thread Robert Collins
Robert Collins added the comment: I've put a fairly comprehensive comment into issue22197. -- ___ Python tracker ___ ___ Python-bugs-l

[issue24247] "unittest discover" modifies sys.path

2015-08-20 Thread Robert Collins
Robert Collins added the comment: It did that because you did not specify a top level directory. Without that, the cwd is not on the path and that breaks many environments. We should probably document it better. The workaround for your needs is to either just run 'unittest discover', or run 'u

[issue22197] Allow better verbosity / output control in test cases

2015-08-20 Thread Robert Collins
Robert Collins added the comment: There's a few interacting things here. If I can suggest some design thoughts. buffering within a test is I think really something we should offer a test servicing API for. There are many thirdparty ones (e.g. I have one in fixtures) - but it should be a dedica

[issue24900] Raising an exception that cannot be unpickled causes hang in ProcessPoolExecutor

2015-08-20 Thread Alex Grönholm
Changes by Alex Grönholm : -- nosy: +alex.gronholm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-08-20 Thread Russell Keith-Magee
Russell Keith-Magee added the comment: >>What hardware architecture are you compiling for? If it's ARM64, and you're >>not using a trunk version of libffi, that segfault in test_ctypes is to be >>expected. > Does this mean I can safely ignore the segfault? Well, "safely" in the sense that eve

[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-20 Thread Eric Snow
Eric Snow added the comment: "Hybrid Nathaniel/Brett approach" LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-08-20 Thread Robert Collins
Robert Collins added the comment: (for the trivial case of CLI discover without a parameter - so translate that to the lower level API and then test that) -- ___ Python tracker

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-08-20 Thread Robert Collins
Robert Collins added the comment: reviewed in rietvald, but here too just in case. The hunk that saves/restores _top_level_dir feels wrong to me - and not part of this bug, please remove it. The rest of the patch is fine today. But it also needs to add two specifically namespace tests: concre

[issue24790] Idle: improve stack viewer

2015-08-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: We should take a look as the stackviewer part of the debugger ui. -- ___ Python tracker ___ ___ Pyth

[issue24790] Idle: improve stack viewer

2015-08-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I just realized that there is a slight but in the patch so far. When a non-empty program runs, it necessarily executes at least one statement in the main module. It will only execute anything else when there is a call. Therefore, the stack trace always begin

[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-08-20 Thread Alex Grönholm
Alex Grönholm added the comment: I've implemented my background-calling code in my framework via run_in_executor() now, so this has become a non-issue for me. I have no more interest in this patch. -- ___ Python tracker

[issue24352] Provide a way for assertLogs to optionally not hide the logging output

2015-08-20 Thread Robert Collins
Robert Collins added the comment: Ok so, design thoughts here. assertLogs really does two things. Firstly it takes a copy of the logs so it can do its assertion. Secondly it disables all other logging, cleaning up noisy tests. Your specific need only conflicts with the second case. The way I

[issue24263] unittest cannot load module whose name starts with Unicode

2015-08-20 Thread Robert Collins
Robert Collins added the comment: I'm torn on whether this needs a test or not. It would be hard to regress, but testing this properly really wants hypothesis with a valid-python-identifier-strategy. I think on balance we do need one. So - we need a test in test_discover that mocks the presen

[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-20 Thread Mark Roseman
Mark Roseman added the comment: Regarding the setting background for the multiple elements.. one possibility is that the first time in a session they change the background of an element that was same as the background, we ask if they'd like to apply that change to the other program elements th

[issue24263] unittest cannot load module whose name starts with Unicode

2015-08-20 Thread Robert Collins
Robert Collins added the comment: Thank you very much for writing your patch in backwards compatible style - it will make backporting to unittest2 much easier. -- ___ Python tracker ___

[issue24758] unittest.mock.Mock's new "unsafe" feature needs a better error message

2015-08-20 Thread Robert Collins
Robert Collins added the comment: @Randy - ok thanks. So, please do improve the prose in the error message, should be a very straight forward patch. -- stage: test needed -> needs patch ___ Python tracker

[issue14534] Add means to mark unittest.TestCases as "do not load".

2015-08-20 Thread Robert Collins
Changes by Robert Collins : -- title: Add means to mark unittest.TestCases as "do not run". -> Add means to mark unittest.TestCases as "do not load". ___ Python tracker ___

[issue14534] Add means to mark unittest.TestCases as "do not run".

2015-08-20 Thread Robert Collins
Robert Collins added the comment: I'm going to review on rietvald - I see a lot of changes needed - sorry - and some are a bit bikesheddy. But, if we do them I'll commit it asap and do any final fixup needed. -- ___ Python tracker

[issue14534] Add means to mark unittest.TestCases as "do not run".

2015-08-20 Thread Robert Collins
Robert Collins added the comment: Removed the bogus huge diff. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue14534] Add means to mark unittest.TestCases as "do not run".

2015-08-20 Thread Robert Collins
Changes by Robert Collins : Removed file: http://bugs.python.org/file36315/01438f18ee18.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue14534] Add means to mark unittest.TestCases as "do not run".

2015-08-20 Thread Robert Collins
Robert Collins added the comment: So I've two more cases for this that I think we need to ensure works. Firstly FunctionTestCase should be blacklistable, and its not abstract. Secondly we're going to want nose, unittest2 etc to be able to also honour this. I suspect that this is easy and may n

[issue22680] Blacklist FunctionTestCase from test discovery

2015-08-20 Thread Robert Collins
Robert Collins added the comment: Thanks for this. I think that a better approach would be the other linked bug - we can kill many birds with one stone. -- resolution: -> duplicate status: open -> closed ___ Python tracker

[issue24904] Patch: add timeout to difflib SequenceMatcher ratio() and quick_ratio()

2015-08-20 Thread Robert Collins
Robert Collins added the comment: So - I'm with Victor and Raymond here. I think modifying difflib to provide external control over the poor-O components would permit many more benefits than just controlling time: you could wrap them in a timer module to get what this patch does, you could rep

[issue24904] Patch: add timeout to difflib SequenceMatcher ratio() and quick_ratio()

2015-08-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue24904] Patch: add timeout to difflib SequenceMatcher ratio() and quick_ratio()

2015-08-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: In general, it isn't good design to incorporate timeout logic in computation logic. What would be better is a general purpose, reusable, decoupled tool: run_with_time_limit(some_computation, some_args, time_limit). Such a tool might be based on separate p

[issue24904] Patch: add timeout to difflib SequenceMatcher ratio() and quick_ratio()

2015-08-20 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure that it's a good idea to add a timeout to such algorithm. It can be very surprising to have a difference result depending on the system load (CPU usage of _other_ applications) and on the CPU performances. If you really want this result, I would p

[issue24904] Patch: add timeout to difflib SequenceMatcher ratio() and quick_ratio()

2015-08-20 Thread John Taylor
New submission from John Taylor: SequenceMatcher in the difflib module contain ratio() and quick_ratio() methods which can take a long time to run with certain input. One example is two slightly different versions of jquery.min.js. I have written a patch against python-350b4 that adds a timeo

[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-20 Thread Brett Cannon
Brett Cannon added the comment: Could someone do a quick code review of my latest patch? If the design looks sane I might be able to steal some time tomorrow to start on the C implementation. -- ___ Python tracker

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2015-08-20 Thread Jan Hudec
Jan Hudec added the comment: Oh, I see I misunderstood Gerhard's last commit. So now the problem should be only if there is a DML statement followed by DDL statement and no commit afterwards. Well, that is indeed probably stupid. -- ___ Python track

[issue24903] Do not verify destdir argument to compileall

2015-08-20 Thread R. David Murray
R. David Murray added the comment: Actually, it looks like it is a bit more potentially complex than that. The original code would issue the error only if there were more than one argument and the first one was not a directory. So it would in fact compile more than one argument as long as th

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2015-08-20 Thread Jan Hudec
Jan Hudec added the comment: While I agree that the current behaviour is a bug (this bug), and one that renders the package unusable for me (I used apsw or different language instead), I unfortunately have to disagree with Gerhard that the change is not a problem. It can be. The implicit comm

[issue24903] Do not verify destdir argument to compileall

2015-08-20 Thread R. David Murray
R. David Murray added the comment: So, given that that does something useful, it appears that the error message (which is what is in 2.7 as well) is wrong to refer to 'directory argument', and we should just eliminate the isdir check (and fix the error message). The patch will need a test. --

[issue24903] Do not verify destdir argument to compileall

2015-08-20 Thread Jake Garver
Jake Garver added the comment: Thanks for the response and sorry for the mis-read. In 2.7, I did something like: python -m compileall -d /runtime/path foo.py But in 3.4, I get: -d destdir requires exactly one directory argument I'm doing this during a build. Then we package the pyc file into a

[issue24897] Add new attribute decorator (akin to property)?

2015-08-20 Thread Eric Snow
Eric Snow added the comment: No worries, Emanuel. Thanks for bringing it up. I'd still be interested to see what sort discussion ensued if you took this to python-ideas. Starting a thread on the topic has been on my todo list for a while but other matters always end up taking precedence. :)

[issue24897] Add new attribute decorator (akin to property)?

2015-08-20 Thread Emanuel Barry
Emanuel Barry added the comment: I figured. I guess it makes more sense to do that on a per-library basis. Eric does have a valid point, and perhaps this addition is not needed :) I realize now that this isn't really needed, backing off and closing :) -- __

[issue24897] Add new attribute decorator (akin to property)?

2015-08-20 Thread Eric Snow
Eric Snow added the comment: That said... What's the benefit of it being a decorator? The docstring? Access to func.__name__? It could just as well be: class attribute: _name = None def __get__(self, instance, owner): if instance is None: retu

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-08-20 Thread Cyd Haselton
Cyd Haselton added the comment: A few questions for Russell: >What hardware architecture are you compiling for? If it's ARM64, and you're >not using a trunk version of libffi, that segfault in test_ctypes is to be >expected. Does this mean I can safely ignore the segfault? >Are you using the

[issue24897] Add new attribute decorator (akin to property)?

2015-08-20 Thread Eric Snow
Eric Snow added the comment: This sort of thread belongs on python-id...@python.org, not on the tracker. Please post there (feel free to reference this issue; also add a link to the thread here). TBH, I think there's a larger discussion to be had regarding the topic of other useful descripto

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-20 Thread Jim Jewett
Jim Jewett added the comment: On windows, when python is started from the command line without a GUI, os.isatty(sys.stdin) raises an error, but os.isatty(sys.stdin.fileno()) returns true. Within IDLE, os.isatty(sys.stdin.fileno()) also raises an error, but os.isatty(0), os.isatty(1), and os

[issue24903] Do not verify destdir argument to compileall

2015-08-20 Thread R. David Murray
R. David Murray added the comment: That line isn't checking the existence of destdir, but rather of the (single, because we have only one destdir to use) directory to compile. What bug are you actually seeing? -- nosy: +r.david.murray ___ Python t

[issue21253] unittest assertSequenceEqual can lead to Difflib.compare() crashing on mostly different sequences

2015-08-20 Thread John Taylor
John Taylor added the comment: I am seeing something similar in difflib.HtmlDiff.make_file() under Python 3.4.3 (windows 7). Do I need to file a separate bug report? File "H:\test\test.py", line 522, in print_differ diff = html.make_file(file1_data,file2_data,"dir 1","dir 2",True) File

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread R. David Murray
R. David Murray added the comment: Well, it sounds like there may be no way around the fact that people may already be doing the extra needed quoting escaping internal quotes) and therefore that this change would break those use cases. (I note that any such code must be conditional on windows

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-20 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Astonishingly isatty appear to work on windows: http://bugs.python.org/issue18553 Up to core python for istty(). -- ___ Python tracker __

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-20 Thread Nathaniel Smith
Nathaniel Smith added the comment: If pty is going to work at all then it should work regardless of whether the tests themselves are being run under a tty, yes. I personally would not want to merge a test based on making isatty lie, because the point of tests is to increase confidence that thi

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-20 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Would `pty` even work on CI where the terminal itself might not be a TTY ? >>> subprocess.Popen(['bash', '-c', '''./python.exe -c "import sys; print(sys.stdin.isatty())"'''], stdin=subprocess.PIPE, stderr=subprocess.STDOUT) False Otherwise, I can

[issue24903] Do not verify destdir argument to compileall

2015-08-20 Thread Jake Garver
New submission from Jake Garver: In compileall.py's main, we verify that the provided destdir (-d) exists at build time. But destdir will commonly be used to override the build time path with a runtime path. That runtime path will usually not exist at build time. Note that this logic was cha

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-20 Thread Nathaniel Smith
Nathaniel Smith added the comment: I don't see how any of those suggestions help for writing an automated test. Spawning a shell is irrelevant; the problem is to get a tty, which is much harder. There only way I can see that might work for an automated test is to use https://docs.python.org/3

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread Steve Dower
Steve Dower added the comment: FWIW, the problem in the original post is that '-DMODULE_VERSION="1.0.5"' is not quoted by distutils and the quotes are eaten. This can be fixed by specifying '-DMODULE_VERSION=\"1.0.5\"'. There are no spaces in the argument, so the problem is that cl.exe eats un

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread Steve Dower
Steve Dower added the comment: The problem is I can easily find plenty of cases where it won't work. My biggest concern is that list2cmdline will require already-quoted arguments, which is going to break anyone who's already worked around distutils failing to do so (which makes it really diffi

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread Chris Hogan
Chris Hogan added the comment: > Since issue 8972 has been resolved by fixing the broken behavior, I think we > should just use list2cmdline. > We could leave _nt_quote_args alone and replace the call to it in _spawn_nt > with: > cmd = [list2cmdline([arg]) for arg in cmd] I verified that t

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-20 Thread Jim Jewett
Jim Jewett added the comment: Instead of using python directly in a subprocess, try calling a shell command that in turns calls python. (Admittedly, this may look like the pipe scenario...) In theory, you could even drive another python interactively, using a GUI runner, but I'm not sure how

[issue24893] Tk occasionally mispositions Text() insert cursor on mouse click.

2015-08-20 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue24893] Tk occasionally mispositions Text() insert cursor on mouse click.

2015-08-20 Thread Guido van Rossum
Guido van Rossum added the comment: I don't have that laptop any more. It's likely that the screen resolution change caused Tcl/Tk to be confused. That's probably a Tcl/Tk bug. -- ___ Python tracker __

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-20 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Hum, working on the automated test. It is slightly annoying as with subprocess python is not in a tty, so there will be no change in behavior. I'm not sure how to proceed. > At a minimum, an interactive test should be written and added to the > document

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread Steve Dower
Steve Dower added the comment: Maybe a better starting point is to monkey-patch via setuptools? I know it's nasty, but it'll give us a chance to actually iterate on this before committing to a distutils change. (IMO the biggest problem with distutils is that it gets basically no testing before

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-20 Thread Steve Dower
Steve Dower added the comment: FYI - the Tcl and Tk changes have been committed upstream: http://core.tcl.tk/tcl/tktview/00189c4afcb9e2586301d711f71383e48817a72d -- ___ Python tracker _

[issue24893] Tk occasionally mispositions Text() insert cursor on mouse click.

2015-08-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Ned] > the out-of-date Apple-supplied Tk *might* be in use. It also happens to me and my students periodically. Our Tk is up-to-date. -- ___ Python tracker __

[issue24902] http.server: on startup, show host/port as URL

2015-08-20 Thread R. David Murray
R. David Murray added the comment: I do it in a number of test suites (you pass in localhost and port 0, then parse the output to find out what port got used). I'm sure other people do it as well. The parens could be dropped. I don't think it is really redundant, as the two ways of presenti

[issue24902] http.server: on startup, show host/port as URL

2015-08-20 Thread Felix Kaiser
Felix Kaiser added the comment: I'm not sure - that'd be redundant, and I find it harder to read. It also breaks for badly configured terminals where "("/")" are part of the select-by-word character set (but thats a very minor issue -- users with parentheses in the set will probably be used to

[issue24898] Documentation for str.find() is confusing

2015-08-20 Thread Ted Lemon
Ted Lemon added the comment: Hm, okay, that explains it. I was previously mystified. How about this as a refinement on your proposal, though: Return the lowest index in the string where substring sub is found within the string. Optional arguments start and end restrict the search to the sl

[issue24902] http.server: on startup, show host/port as URL

2015-08-20 Thread R. David Murray
R. David Murray added the comment: This is a nice idea, but I think it would be better to add it to the message rather than change the message (and we'd still break some people's programs, I'm sure): Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000) ... -- nosy: +r.david.murra

[issue24897] Add new attribute decorator (akin to property)?

2015-08-20 Thread R. David Murray
R. David Murray added the comment: So you are basically wanting to be able to create read only attributes that don't have a _ in front of them even internally. I don't think that's something Python core should add. Read only attributes should be an exceptional case in most python programs. F

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread R. David Murray
R. David Murray added the comment: *I'm* not suggesting using Popen. That would be a more significant change to the code, and I don't see a motivation for it. I'm just suggesting using list2cmdline for the quoting. (If we were rewriting distutils it would be a different story, but we're not

[issue24897] Add new attribute decorator (akin to property)?

2015-08-20 Thread Skip Montanaro
Skip Montanaro added the comment: I'm missing the point too, I think. I don't see class attributes in your initial Foo class, then your second one as a __new__ method, but references self. I'm quite confused at this point. -- nosy: +skip.montanaro _

[issue24902] http.server: on startup, show host/port as URL

2015-08-20 Thread Felix Kaiser
New submission from Felix Kaiser: http.server: on startup, show host/port as URL Old: % python3 -m http.server Serving HTTP on 0.0.0.0 port 8000 ... New: % ./python -m http.server Serving http://0.0.0.0:8000/ ... This is useful because (modern) terminals will auto-detect URLs and make them

[issue24901] (2, )!=(2) and (2, 3)==(2, 3, ) why ??? tested in each version

2015-08-20 Thread eryksun
eryksun added the comment: Refer to section 6.2.3, parenthesized forms: https://docs.python.org/3/reference/expressions.html#parenthesized-forms if the list contains at least one comma, it yields a tuple; otherwise, it yields the single expression that makes up the expression list.

[issue24901] (2, )!=(2) and (2, 3)==(2, 3, ) why ??? tested in each version

2015-08-20 Thread shiva prasanth
Changes by shiva prasanth : -- nosy: -shivaprasanth title: single element tuple 's ending comma is different that without comma -> (2,)!=(2) and (2,3)==(2,3,) why ??? tested in each version type: -> behavior versions: +Python 3.4 ___ Python tracker

[issue24901] single element tuple 's ending comma is different that without comma

2015-08-20 Thread shiva prasanth
New submission from shiva prasanth: Python 2.7.9 (default, Apr 2 2015, 15:33:21) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> (2,)==(2) False >>> (2,3,)==(2,3) True >>> (2,3)==(2,3,) True >>> s=(2,) >>> s2=(2) >>> s==s2 False >>> -- m

[issue24900] Raising an exception that cannot be unpickled causes hang in ProcessPoolExecutor

2015-08-20 Thread Benedikt Sauer
Benedikt Sauer added the comment: Actually I think that this may consist of multiple issues: 1. http://bugs.python.org/issue8323 (closed as wont-fix): multiprocessing.Queue should throw a sensible error if a Queue element can't be unpickled, however the user managed to create that 2. The worke

[issue24900] Raising an exception that is unable to be unpickled causes hang in ProcessPoolExecutor

2015-08-20 Thread Benedikt Sauer
New submission from Benedikt Sauer: When raising an exception that is unpicklable in a worker process. This used to be the case for all exceptions that have a non-trivial constructor but this was fixed by http://bugs.python.org/issue1692335. I now have the concrete problem with cx_Oracle in wh