Python Unit test

2016-01-26 Thread toluagboola
I'm a University student of IT with majors in Embedded Systems. I have this assignment where I have to write Unittest for a simple Python Code without having prior knowledge of Python. I really need some help. Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Unit test

2016-01-26 Thread toluagboola
Yes I have studied the page but it's quite vague to me. So we have this project - Development of a touch screen controllable IEC61850 standard protocol analyzer. With this analyzer user can monitor and analyze network traffic in substation network. --

[issue26039] More flexibility in zipfile interface

2016-01-26 Thread Thomas Kluyver
Thomas Kluyver added the comment: Serhiy, any chance you'd have some time to review my patch(es)? Or is there someone else interested in zipfile I might interest? Thanks :-) -- ___ Python tracker

[issue24683] Type confusion in json encoding

2016-01-26 Thread paul
paul added the comment: Proof of EIP control. -- Added file: http://bugs.python.org/file41719/eip.py ___ Python tracker ___

[issue24683] Type confusion in json encoding

2016-01-26 Thread paul
paul added the comment: GDB dump of running ./python eip.py ___ eax:37A317DD ebx:B7A54268 ecx:BFFFE22C edx:11223344 eflags:00010217 esi:B7A61060 edi:B7AA6714 esp:BFFFE20C ebp:B7A317DC eip:11223344

Re: Python Unit test

2016-01-26 Thread toluagboola
On Tuesday, January 26, 2016 at 10:57:51 PM UTC+2, 4ndre4 wrote: > On 26/01/2016 11:09, toluagbo...@gmail.com wrote: > > [...] > > I'm a University student of IT with majors in Embedded Systems. > > I have this assignment where I have to write Unittest for a simple > Python Code > > without

Re: Tkinter spacing

2016-01-26 Thread Christian Gollwitzer
Am 26.01.16 um 23:48 schrieb high5stor...@gmail.com: On Monday, January 25, 2016 at 7:41:57 PM UTC-8, KP wrote: > [fullquote snipped] Ah - that clears it up. Thanks for your help! It is totally unclear what you reply to. PLease cite what you refer to, and shorten your citation for clarity.

[issue17394] Add slicing support to collections.deque

2016-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Synchronized with current sources and added mandatory now braces. -- Added file: http://bugs.python.org/file41723/deque_slices_2.patch ___ Python tracker

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-01-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce3d47eaeb21 by Raymond Hettinger in branch '3.5': Issue #26194: Fix undefined behavior for deque.insert() when len(d) == maxlen https://hg.python.org/cpython/rev/ce3d47eaeb21 -- nosy: +python-dev ___

Re: Tkinter spacing

2016-01-26 Thread Christian Gollwitzer
Am 26.01.16 um 04:41 schrieb KP: If I want to have some space between, say, btn_last & btn_new, will I have to use a dummy label in between these two or is there a better way? If you just want to put space there, you can use the pad options of grid, just like you do for lbl_Recs.

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New behavior looks less surprising to me. Old behavior is even more weird for negative indices: >>> from collections import deque >>> d = deque(range(20), maxlen=10) >>> d deque([10, 11, 12, 13, 14, 15, 16, 17, 18, 19], maxlen=10) >>> d.insert(-3, 'New') >>>

[issue26194] Undefined behavior for deque.insert() when len(d) == maxlen

2016-01-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: The plain-insert-followed-by-a-pop-on-the-right is giving reasonable results with nice properties: d.insert(0, i) --- 0 --> deque([0], maxlen=4) 1 --> deque([1, 0], maxlen=4) 2 --> deque([2, 1, 0], maxlen=4) 3 --> deque([3,

Re: Tkinter spacing

2016-01-26 Thread Peter Otten
KP wrote: > If I want to have some space between, say, btn_last & btn_new, will I have > to use a dummy label in between these two or is there a better way? > > Thanks for any help, as always! You could use nested frames with nonzero padding, e. g: nav_bar = ttk.Frame(root, borderwidth=2,

Re: Python Unit test

2016-01-26 Thread David Palao
Well, there is a very specific example in there. But you still don't give us much information about *concrete* troubles you have. I *guess* that one of the following is true: 1) You have problems to understand some part of the example in the unittest module documentation. 2) You don't know how to

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Wolfgang Maier
I have used 2.7 and 3.2 side-by-side for two years or so on Ubuntu 12.04. Never encountered any problem except for a few times that I accidentally tried to run something with python when I should have used python3. Cheers, Wolfgang On 26.01.2016 13:26, Gene Heskett wrote: Greetings; I have

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread David Palao
Hello, On my system I have 2.7.10 and 3.4.3 system wide, but it is not debian. Of course, the "python" executable can be only one of them at a given time. Another option is tu use a virtual environment or something (pyvenv or virtualenv). Best 2016-01-26 13:26 GMT+01:00 Gene Heskett

Re: Python Unit test

2016-01-26 Thread Bernardo Sulzbach
Or maybe he doesn't know enough about unit testing. If that is the case, Wikipedia and SO should have you covered. Amazon has a few books on the subject, too. -- https://mail.python.org/mailman/listinfo/python-list

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Grobu
On 26/01/16 13:26, Gene Heskett wrote: Greetings; I have need of using a script written for python3, but the default python on wheezy is 2.7.3. I see in the wheezy repos that 3.2.3-6 is available. Can/will they co-exist peacefully? Thank you. Cheers, Gene Heskett On Debian Jessie : $ ls

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Matt Wheeler
On 26 January 2016 at 12:26, Gene Heskett wrote: > Greetings; > > I have need of using a script written for python3, but the default python > on wheezy is 2.7.3. > > I see in the wheezy repos that 3.2.3-6 is available. > > Can/will they co-exist peacefully? Yes, python

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Nick Sarbicki
On Tue, Jan 26, 2016 at 2:22 PM David Palao wrote: > Hello, > On my system I have 2.7.10 and 3.4.3 system wide, but it is not > debian. Of course, the "python" executable can be only one of them at > a given time. > Another option is tu use a virtual environment or

Re: Question about asyncio and blocking operations

2016-01-26 Thread Frank Millman
"Frank Millman" wrote in message news:n8038j$575$1...@ger.gmane.org... I am developing a typical accounting/business application which involves a front-end allowing clients to access the system, a back-end connecting to a database, and a middle layer that glues it all together. [...]

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Wolfgang Maier
On 26.01.2016 15:34, Matt Wheeler wrote: The only slight issue you might encounter is that Python 3.2 is quite old now and actually not as well supported as Python 2.7 (many projects support Python 2.7 or 3.3+ only). Best to just try out your script and find out though. Right. For example,

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Gene Heskett
On Tuesday 26 January 2016 09:20:16 Wolfgang Maier wrote: > I have used 2.7 and 3.2 side-by-side for two years or so on Ubuntu > 12.04. Never encountered any problem except for a few times that I > accidentally tried to run something with python when I should have > used python3. I think thats

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Chris Angelico
On Wed, Jan 27, 2016 at 2:11 AM, Gene Heskett wrote: > On Tuesday 26 January 2016 09:20:16 Wolfgang Maier wrote: > >> I have used 2.7 and 3.2 side-by-side for two years or so on Ubuntu >> 12.04. Never encountered any problem except for a few times that I >> accidentally tried

thanks

2016-01-26 Thread Kawuma Julius
Thank you for developing us.We love you God bless you the more. I am Julius in Uganda learning computer. -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about asyncio and blocking operations

2016-01-26 Thread Ian Kelly
On Tue, Jan 26, 2016 at 7:15 AM, Frank Millman wrote: > I am making some progress, but I have found a snag - possibly unavoidable, > but worth a mention. > > Usually when I retrieve rows from a database I iterate over the cursor - > >def get_rows(sql, params): >

Re: Python Unit test

2016-01-26 Thread Tolu Agboola
I'll go with number 2. I don't know how to apply the ideas to the code I have. Sent from my iPhone > On 26 Jan 2016, at 15:48, David Palao wrote: > > Well, there is a very specific example in there. > But you still don't give us much information about *concrete*

Re: Python Unit test

2016-01-26 Thread Joel Goldstick
On Tue, Jan 26, 2016 at 10:48 AM, Tolu Agboola wrote: > I'll go with number 2. I don't know how to apply the ideas to the code I > have. > > Sent from my iPhone > > > On 26 Jan 2016, at 15:48, David Palao wrote: > > > > Well, there is a very

Re: Tkinter spacing

2016-01-26 Thread high5storage
On Monday, January 25, 2016 at 7:41:57 PM UTC-8, KP wrote: > If I want to have some space between, say, btn_last & btn_new, will I have to > use a dummy label in between these two or is there a better way? > > Thanks for any help, as always! > > > > > from tkinter import * > from tkinter

Re: Python Unit test

2016-01-26 Thread David Palao
2016-01-26 16:56 GMT+01:00 Joel Goldstick : > On Tue, Jan 26, 2016 at 10:48 AM, Tolu Agboola > wrote: > >> I'll go with number 2. I don't know how to apply the ideas to the code I >> have. >> >> Sent from my iPhone >> >> > On 26 Jan 2016, at 15:48,

show instant data on webpage

2016-01-26 Thread mustang
I've built a sensor to measure some values. I would like to show it on a web page with python. This is an extract of the code: file = open("myData.dat", "w") while True: temp = sensor.readTempC() riga = "%f\n" % temp file.write(riga) time.sleep(1.0)

Re: show instant data on webpage

2016-01-26 Thread David Palao
2016-01-26 17:10 GMT+01:00 mustang : > I've built a sensor to measure some values. > I would like to show it on a web page with python. > > > This is an extract of the code: > > file = open("myData.dat", "w") > > while True: > temp = sensor.readTempC() > riga =

Re: Tkinter spacing

2016-01-26 Thread Peter Otten
high5stor...@gmail.com wrote: >> from tkinter import * >> from tkinter import ttk >> >> root = Tk() >> root.geometry("822x600+100+100") >> nav_bar = ttk.Frame(root, borderwidth=2, relief='ridge', padding=(10, 3, >> 10, 3)) >> >> btn_first = ttk.Button(nav_bar, text='|<', width=4) # for

Re: show instant data on webpage

2016-01-26 Thread mustang
open("myData.dat", "w").close() while True: temp = sensor.readTempC() riga = "%f\n" % temp with open("myData.dat", "a") as f: f.write(riga) time.sleep(1) yes great it works!thanks a lot! Anyway to refresh temperature I've to recall anytime the php page. My idea is

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Gene Heskett
On Tuesday 26 January 2016 10:21:07 Chris Angelico wrote: > On Wed, Jan 27, 2016 at 2:11 AM, Gene Heskett wrote: > > On Tuesday 26 January 2016 09:20:16 Wolfgang Maier wrote: > >> I have used 2.7 and 3.2 side-by-side for two years or so on Ubuntu > >> 12.04. Never encountered

Re: Which Python editor has this feature?

2016-01-26 Thread Fabio Zadrozny
On Sun, Jan 10, 2016 at 11:59 PM, wrote: > It lets you jump between the current cursor position and the line the > upper level indentation start, something like the bracket matching in C > editor. Because of Python use indentation as its code block mark, It might > be

Re: Which Python editor has this feature?

2016-01-26 Thread Fabio Zadrozny
On Mon, Jan 11, 2016 at 6:40 AM, Gordon Levi wrote: > jf...@ms4.hinet.net wrote: > > >It lets you jump between the current cursor position and the line the > upper level indentation start, something like the bracket matching in C > editor. Because of Python use

Re: Python Unit test

2016-01-26 Thread 4ndre4
On 26/01/2016 11:09, toluagbo...@gmail.com wrote: [...] I'm a University student of IT with majors in Embedded Systems. > I have this assignment where I have to write Unittest for a simple Python Code > without having prior knowledge of Python. I really need some help. www.python.org to get

Re: pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);

2016-01-26 Thread eryk sun
On Sun, Jan 24, 2016 at 7:27 PM, Terry Reedy wrote: > > More specifically, / is not accepted in paths to be executed. It seems to be > generally accepted in path arguments, as in cd path, or > > C:\Users\Terry>C:\programs\python35\python.exe C:/programs/python34/tem.py An

Re: Tkinter spacing

2016-01-26 Thread high5storage
On Monday, January 25, 2016 at 7:41:57 PM UTC-8, KP wrote: > If I want to have some space between, say, btn_last & btn_new, will I have to > use a dummy label in between these two or is there a better way? > > Thanks for any help, as always! > > > > > from tkinter import * > from tkinter

Re: Question about asyncio and blocking operations

2016-01-26 Thread Alberto Berti
> "Frank" == Frank Millman writes: Frank> Now I have another problem. I have some classes which retrieve some Frank> data from the database during their __init__() method. I find that it Frank> is not allowed to call a coroutine from __init__(), and it is not

Re: python-2.7.3 vs python-3.2.3

2016-01-26 Thread Ben Finney
Gene Heskett writes: > I have need of using a script written for python3, but the default > python on wheezy is 2.7.3. Correction: the default Python 2 is 2.7.3. The default Python 3 is 3.2.3. Since Python 2 and Python 3 are distinct run-time systems, there's no single

Re: Question about asyncio and blocking operations

2016-01-26 Thread Alberto Berti
> "Alberto" == Alberto Berti writes: Alberto> async external_coro(): # this is the calling context, which is a coro Alberto> async with transction.begin(): Alberto> o = MyObject Alberto> # maybe other stuff

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___

[issue26198] PyArg_ParseTuple with format "et#" and "es#" detects overflow by raising TypeError instead of ValueError

2016-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes minor bugs in Python/getargs.c: 1. Replaces TypeError with confusing error message for buffer overflow for "es#" and "et#" format units to ValueError with correct error message. Due to the risk to break working code, may be we will left

[issue26039] More flexibility in zipfile interface

2016-01-26 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks! I will work on docs and tests. -- ___ Python tracker ___ ___

[issue26039] More flexibility in zipfile interface

2016-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your patches are great Thomas! This is just what I want to implement. It will take some time to make a careful review. Besides possible corrections I think these features will be added in 3.6. But new features need tests and documenting. --

[issue26198] PyArg_ParseTuple with format "et#" and "es#" detects overflow by raising TypeError instead of ValueError

2016-01-26 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: Barun, Serhiy, thanks for picking this up so quickly. I would further suggest to avoid using a fixed buffer in abspath (_getfullpathname, but only abspath seems to call it). Other filesystem calls are using the interface where PyArg_ParseTuple allocates the

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread Steve Dower
Steve Dower added the comment: So the more interesting error message is higher up: xxmodule.c xxmodule.obj : warning LNK4197: export 'PyInit_xx' specified multiple times; using first specification Creating library d:\temp\tmptzty591d\Debug\temp\tmptzty591d\xx_d.cp36-win_amd64.lib and

[issue19698] Implement _imp.exec_builtin and exec_dynamic

2016-01-26 Thread Brett Cannon
Brett Cannon added the comment: At this point both FrozenImporter and BuiltinImporter support exec_module(), so the only thing left to do is to document when FrozenImporter and WindowsRegistryFinder gained their exec_module() implementations (BuiltinImporter already has a note about it).

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread Zachary Ware
Zachary Ware added the comment: Steve, I'm assuming you meant "x86_amd64" rather than "x86_arm" on that last filename? Note that this issue is restricted to Debug builds (as suggested by the issue being with mspdb140.dll), the Non-Debug buildbot is not failing. --

[issue26203] nesting venv in virtualenv segfaults

2016-01-26 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> closed ___ Python tracker ___ ___

[issue26205] Inconsistency concerning nested scopes

2016-01-26 Thread Brett Cannon
Brett Cannon added the comment: https://docs.python.org/3/tutorial/classes.html for the docs that Roscoe is talking about. So the sentence is technically correct, it just takes careful reading to grasp what's being said. There are "at least three nested scopes", but there can be *up to* four

[issue26208] decimal C module's exceptions don't match the Python version

2016-01-26 Thread Petr Viktorin
New submission from Petr Viktorin: Exceptions from the decimal module are quite unfriendly: >>> Decimal(42) / Decimal(0) ... decimal.DivisionByZero: [] >>> huge = Decimal('9' * 99) >>> huge.quantize(Decimal('0.1')) ... decimal.InvalidOperation: [] compared to the

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread Steve Dower
Steve Dower added the comment: Yep, that's what I meant. So many cross compilers these days... -- ___ Python tracker ___

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: > It's entirely possible that this was an issue with VS 2015 that has been > resolved in VS 2015 Update 1. Let me check with some people who may know. If a fix cannot be found quickly, would it be possible to revert the Python change until VS is fixed and the

[issue26204] compiler: don't emit LOAD_CONST instructions for constant statements?

2016-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. It looks to me that this optimization was added to avoid spending executing time for docstrings. Other cases almost never occur in real code and are not worth to be optimized. But the patch makes the code cleaner (it would even more cleaner if

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be easier to just temporary skip some tests on particular platforms. -- nosy: +serhiy.storchaka ___ Python tracker

[issue26208] decimal C module's exceptions don't match the Python version

2016-01-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: If it doesn't take too much effort, I would like the see the exception messages made more user friendly and kept more in-sync with the pure Python version. -- assignee: -> skrah nosy: +rhettinger ___ Python

[issue26209] TypeError in smtpd module with string arguments

2016-01-26 Thread Lorenzo Ancora
New submission from Lorenzo Ancora: smtpd.PureProxy(localaddr="host1", remoteaddr="host2") ...produces the error: [...] smtpd.py", line 657, in __init__ gai_results = socket.getaddrinfo(*localaddr, type=socket.SOCK_STREAM) TypeError: getaddrinfo() got multiple values for argument 'type'

[issue26209] TypeError in smtpd module with string arguments

2016-01-26 Thread SilentGhost
Changes by SilentGhost : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

[issue26208] decimal C module's exceptions don't match the Python version

2016-01-26 Thread Stefan Krah
Stefan Krah added the comment: Yes, ideally the exceptions should be in sync. I don't find the list of signals entirely uninteresting, but implementing it in _pydecimal would require #8613 to be solved, which is unlikely to happen. In _decimal the exceptions come directly from libmpdec, so in

[issue26208] decimal C module's exceptions don't match the Python version

2016-01-26 Thread Stefan Krah
Changes by Stefan Krah : -- stage: -> needs patch type: -> enhancement versions: +Python 3.6 ___ Python tracker ___

[issue26210] `HTMLParser.handle_data` may be invoked although `HTMLParser.reset` was invoked

2016-01-26 Thread Yannick Duchêne
New submission from Yannick Duchêne: `HTMLParser.handle_data` may be invoked although `HTMLParser.reset` was invoked. This occurs at least when `HTMLParser.reset` was invoked during `HTMLParser.handle_endtag`. According to the documentation, `HTMLParser.reset` discard all data, so it should

[issue26201] Faster type checking in listobject.c

2016-01-26 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg258942 ___ Python tracker ___

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > It would be easier to just temporary skip some tests on particular platforms. Ah yes, I also like this option. Well, it's up to you Steve :-) -- ___ Python tracker

[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-26 Thread Yannick Duchêne
New submission from Yannick Duchêne: Using HTMLParser on the attached file, I got this: File "/usr/lib/python3.5/html/parser.py", line 111, in feed self.goahead(0) File "/usr/lib/python3.5/html/parser.py", line 171, in goahead k = self.parse_starttag(i) File

[issue26204] compiler: don't emit LOAD_CONST instructions for constant statements?

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "It looks to me that this optimization was added to avoid spending executing time for docstrings." Hum, let me dig Mercurial history. changeset: 39364:8ef3f8cf90e1 branch: legacy-trunk user:Neal Norwitz date:

[issue26204] compiler: don't emit LOAD_CONST instructions for constant statements?

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: """ Will the following code compile OK? What will it compile to? if 1: 42 """ compile OK: what do you mean? This code doesn't make any sense to me :-) Currently text strings statements are ignored: --- >>> def f(): ... if 1: ... "abc" ... >>>

[issue26205] Inconsistency concerning nested scopes

2016-01-26 Thread Yannick Duchêne
Yannick Duchêne added the comment: Better at least two, if I'm not wrong: the innermost scope may be the module's scope. So there is always at least the module scope and the built‑ins scope, at least two up to four. (if I have not overlooked something) -- nosy: +Hibou57

[issue26204] compiler: don't emit LOAD_CONST instructions for constant statements?

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "It looks to me that this optimization was added to avoid spending executing time for docstrings. Other cases almost never occur in real code and are not worth to be optimized. But the patch makes the code cleaner (it would even more cleaner if

[issue26205] Inconsistency concerning nested scopes

2016-01-26 Thread Brett Cannon
Changes by Brett Cannon : -- stage: -> needs patch type: behavior -> versions: +Python 2.7, Python 3.6 ___ Python tracker ___

[issue26205] Inconsistency concerning nested scopes

2016-01-26 Thread Brett Cannon
Brett Cannon added the comment: It depends on how you want to view things as to whether you can claim there are two or three scopes for module-level code. While it's true that the local scope operates just like global scope, to Python it's more like local == global rather than the local scope

[issue26204] compiler: don't emit LOAD_CONST instructions for constant statements?

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: > Maybe the compiler should emit a warning to say that the code doesn't make > sense at all and is ignored? Oh ok, now I recall a similar issue that I posted 3 years ago: issue #17516, "Dead code should be removed". Example of suspicious code: def func():

[issue26204] compiler: ignore constants used as statements? (don't emit LOAD_CONST+POP_TOP)

2016-01-26 Thread STINNER Victor
Changes by STINNER Victor : -- title: compiler: don't emit LOAD_CONST instructions for constant statements? -> compiler: ignore constants used as statements? (don't emit LOAD_CONST+POP_TOP) ___ Python tracker

[issue24905] Allow incremental I/O to blobs in sqlite3

2016-01-26 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker ___ ___ Python-bugs-list

[issue26146] PEP 511: Add ast.Constant to allow AST optimizer to emit constants

2016-01-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset c5df914e73ad by Victor Stinner in branch 'default': Fix a refleak in validate_constant() https://hg.python.org/cpython/rev/c5df914e73ad -- ___ Python tracker

[issue26146] PEP 511: Add ast.Constant to allow AST optimizer to emit constants

2016-01-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0d0d0a05 by Victor Stinner in branch 'default': Issue #26146: remove useless code https://hg.python.org/cpython/rev/0d0d0a05 New changeset 58086f0a953a by Victor Stinner in branch 'default': Issue #26146: enhance ast.Constant error message

[issue26212] Python with ncurses6.0 will not load _curses module.

2016-01-26 Thread R. Jones
New submission from R. Jones: I am trying to compile Python-2.7.10. This is being done as a user, not root and I don't have access to /usr/local other than to avoid all the broken stuff in it. My local is /appl/local I am installing Python in /appl/local/python-2.7.10 I have ncursest as

[issue26213] Document BUILD_LIST_UNPACK & BUILD_TUPLE_UNPACK

2016-01-26 Thread Brett Cannon
New submission from Brett Cannon: Turns out the BUILD_TUPLE_UNPACK and BUILD_LIST_UNPACK opcodes are undocumented in the dis module. -- assignee: docs@python components: Documentation messages: 258985 nosy: benjamin.peterson, brett.cannon, docs@python priority: low severity: normal

[issue26213] Document BUILD_*_UNPACK opcodes

2016-01-26 Thread Brett Cannon
Brett Cannon added the comment: There are also BUILD_SET_UNPACK and BUILD_MAP_UNPACK as well. -- title: Document BUILD_LIST_UNPACK & BUILD_TUPLE_UNPACK -> Document BUILD_*_UNPACK opcodes ___ Python tracker

[issue26039] More flexibility in zipfile interface

2016-01-26 Thread Thomas Kluyver
Changes by Thomas Kluyver : Added file: http://bugs.python.org/file41722/zipinfo-from-file2.patch ___ Python tracker ___

[issue26128] Let the subprocess.STARTUPINFO constructor take arguments

2016-01-26 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch ___ Python tracker ___ ___

[issue19225] lack of PyExc_BufferError doc

2016-01-26 Thread Martin Panter
Martin Panter added the comment: General approach looks good. I left some review comments. VMSError: I think this is Python 2 only, where it seems to be in a similar situation to WindowsError. According to Issue 16136 it was removed in Python 3.4. But it looks like your patch is against

[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-26 Thread Martin Panter
Martin Panter added the comment: I think we should discuss this in the existing reports: Issue 9182: Mention the “--” divider in the documentation and usage as a workaround. Perhaps you could mention your proposal to put positional arguments before the options there. Issue 9338: Change the

[issue26188] Provide more helpful error message when `await` is called inside non-`async` method

2016-01-26 Thread Martin Panter
Martin Panter added the comment: According to PEP 492, “await” is still allowed to be an ordinary identifier in non-async functions until Python 3.7. Which means you are still allowed to write def oh_hai(): await = "something" The proposed error message would need to be smart enough to

[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-26 Thread Xiang Zhang
Xiang Zhang added the comment: Test your html file and can not get the AssertionError. Seems everything works fine. Could you please provide more info? -- nosy: +xiang.zhang ___ Python tracker

[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-26 Thread Xiang Zhang
Xiang Zhang added the comment: After reading Issue26210, I can get the AssertionError when there is a self.reset() in handle_endtag. I don't think it's proper to use reset in the process of parsing. From the samples I find on Web, reset is commonly used to set extra attributes on the parser

[issue26210] `HTMLParser.handle_data` may be invoked although `HTMLParser.reset` was invoked

2016-01-26 Thread Xiang Zhang
Xiang Zhang added the comment: reset just set some attributes to the initial states and it does not control the parsing process. So reading the gohead function, even if reset is called in handle_endtag and all data are discarded, it is still possible for the process to move forward.

[issue26212] Python with ncurses6.0 will not load _curses module on Solaris 10

2016-01-26 Thread R. Jones
R. Jones added the comment: Note: This issue is on Solaris 10 using GCC 4.7.2 and the Solaris linker "ld". -- title: Python with ncurses6.0 will not load _curses module. -> Python with ncurses6.0 will not load _curses module on Solaris 10 ___

[issue22625] When cross-compiling, don’t try to execute binaries

2016-01-26 Thread ƦOB COASTN
ƦOB COASTN added the comment: Similar patch used for 3.5 Additionally required: -Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib +Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py + $(MAKE)

Re: Python Unit test

2016-01-26 Thread David Palao
Hello, It would be good to provide more details on what you need help for. For instance, have you read the manual https://docs.python.org/3/library/unittest.html ? It even contains a couple of examples. Best 2016-01-26 12:09 GMT+01:00 : > I'm a University student of IT

[issue26206] test_socket.testRecvmsgPeek() timeout on "AMD64 Debian root 3.x" buildbot

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: Info about the buildbot (regrtest headers): == CPython 3.6.0a0 (default:fadc4b53b840, Jan 26 2016, 18:14:53) [GCC 4.7.2] == Linux-3.2.0-4-amd64-x86_64-with-debian-7.9 little-endian == hash algorithm: siphash24 64bit ==

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: Same issue on Windows 8 and Windows 10 buildbots: * http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/1716/steps/test/logs/stdio * http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/598/steps/test/logs/stdio --

[issue26206] test_socket.testRecvmsgPeek() timeout on "AMD64 Debian root 3.x" buildbot

2016-01-26 Thread STINNER Victor
New submission from STINNER Victor: The bug started between build 3071 and 3072: * http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/3071 * http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/3072 Maybe it's an issue on the buildbot, not on the

[issue26206] test_socket.testRecvmsgPeek() timeout on "AMD64 Debian root 3.x" buildbot

2016-01-26 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +Rosuav ___ Python tracker ___ ___

[issue25850] Building extensions with MSVC 2015 Express fails

2016-01-26 Thread STINNER Victor
STINNER Victor added the comment: test_distutils is now failing on "AMD64 Windows7 SP1 3.x" buildbot: please see issue #26207. -- nosy: +haypo ___ Python tracker

python-2.7.3 vs python-3.2.3

2016-01-26 Thread Gene Heskett
Greetings; I have need of using a script written for python3, but the default python on wheezy is 2.7.3. I see in the wheezy repos that 3.2.3-6 is available. Can/will they co-exist peacefully? Thank you. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap,

[issue26207] test_distutils fails on "AMD64 Windows7 SP1 3.x" buildbot

2016-01-26 Thread STINNER Victor
New submission from STINNER Victor: It looks like the buildbot started to fail with the build http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7166/ The change 37dc870175be43cdcb6920cc642a99fc10cd4bb4 of issue #25850 changed Lib/distutils/_msvccompiler.py: "Use

  1   2   >