[issue28829] Tkinter messagebox cx_freeze Python 3.4

2016-11-29 Thread Parviz Karimli
New submission from Parviz Karimli: Tkinter messagebox doesn't work when trying to make an exectuable by cx_freeze in Python 3.4. It works fine with Python 3.4 alone. But after I create an exe of this file, the messagebox does not pop up. -- components: Tkinter files: messagebox

[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: > Whenever I did a fresh clone, the Tools/scripts/generate_opcode_h.py would be > called. Can you please test "make touch"? This command "fixes" timestamps. -- ___ Python tracker

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: I don't think that it's worth it to add a new function to _testcapi to test PyUnicode_FindChar. The implementation of the function seems simple. At least, I would prefer to only see a few unit tests, not 17 test for this simple function! I mean

[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread Florin Papa
Florin Papa added the comment: I tested and the script is no longer called if you do a "make touch" beforehand. -- ___ Python tracker ___

[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Florin Papa added the comment: > I tested and the script is no longer called if you do a "make touch" > beforehand. Oh ok, thanks for the test. It confirms that you don't need to run the script to build Python 3. It's a side effect of the Mercurial clone.

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: >> The function was already documented in Python 3.5, so please add a ".. >> versionchanged:: 3.6" to document the API chnange. > No, this behavior is not documented in any released Python version. The note > about the failure was added in issue28701. Ah

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is nice to add tests for C API. Especially if there is no direct mapping between Python and C API ("character in str" don't call PyUnicode_FindChar()). Tests should cover all corner cases, otherwise we can miss bugs. Some C API can be not used in

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Usually we don't add "versionchanged" for every fixed bug. -- ___ Python tracker ___

[issue14845] list() != []

2016-11-29 Thread Mark Dickinson
Mark Dickinson added the comment: @wolma: I don't think PEP 479 is relevant here: we're not raising StopIteration inside a generator function, which is the situation that PEP 479 covers. The behaviour in 3.6 matches that originally reported: Python 3.6.0b3 (default, Nov 2 2016, 08:15:32)

[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I updated a patch to check the made path because previous patch has added suffix even to symbolic link. New patch works that If made path is invalid, revert to original. -- Added file: http://bugs.python.org/file45684/sys-executable-suffix-3.patch

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Marko Rauhamaa
Steven D'Aprano : > There is no need to catch the exception if you're not going to do > anything with it. Correct. However, the question of the subject line is still a good one. See: try: with open("xyz") as f: ...[A]... except

[issue28834] Type checking in set comparisons.

2016-11-29 Thread nyoshimizu
New submission from nyoshimizu: The non-operator versions of set comparisons (intersection(), union(), etc.) exhibit inconsistent type checking. They only check the first input before deciding whether or not to raise a TypeError exception. Therefore, it's possible to pass a set first, then

[issue26861] shutil.copyfile() doesn't close the opened files

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As I see, shutil.copyfile() uses the "with" statements and closes files just after copying. -- status: open -> pending ___ Python tracker

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye
Xavier de Gaye added the comment: > This approach will not work with a "multiarch" enabled environment, and break > cross builds on Debian and Ubuntu. No, the patch does not break cross builds on Debian and Ubuntu, unless you can demonstrate it does. > Afaics, the proposal assumes that the

Re: Asyncio -- delayed calculation

2016-11-29 Thread Steve D'Aprano
On Wed, 30 Nov 2016 05:41 am, Ian Kelly wrote: > You mean how do you create something that can be awaited that doesn't > await something else in turn? With a Future. > > import asyncio > > class Awaitable(asyncio.Future): > def wake_up_later(self): > asyncio.get_event_loop().call_later(3,

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-11-29 Thread Xavier Combelle
Xavier Combelle added the comment: It is not the dictionary of builtin module, which is inserted in , but the current __builtin__ global which happen to be normally the dictionnary of builtin. Hence in the following code, the builtins propagation works has expected. >>>

Re: csv into multiple columns using split function using python

2016-11-29 Thread woooee
Add some print statements to see what is happening, especially after the for elem in mylist1: statement -- https://mail.python.org/mailman/listinfo/python-list

Python while loop

2016-11-29 Thread paul . garcia2345
Write a program which prints the sum of numbers from 1 to 101 ( 1 and 101 are included) that are divisible by 5 (Use while loop) This is the code: x=0 count=0 while x<=100: if x%5==0: count=count+x x=x+1 print(count) Question: How does python know what count means ? I

[issue20215] socketserver.TCPServer can not listen IPv6 address

2016-11-29 Thread Jan Pokorný
Changes by Jan Pokorný : -- nosy: +jpokorny ___ Python tracker ___ ___

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread woooee
If you want to do something only if the file exists (or does not), use os.path.isfile(filename) -- https://mail.python.org/mailman/listinfo/python-list

[issue15533] subprocess.Popen(cwd) documentation

2016-11-29 Thread Wolfgang Maier
Wolfgang Maier added the comment: Just found issue15451, which reports a similar inconsistency between Windows and POSIX for 'PATH' provided through the Popen env parameter as for cwd. It seems that, on POSIX-platforms, the PATH environment variable passed through env affects the executable

[issue26861] shutil.copyfile() doesn't close the opened files

2016-11-29 Thread Josh Rosenberg
Josh Rosenberg added the comment: Agreed. 2.7 source is definitely using with: https://hg.python.org/cpython/file/2.7/Lib/shutil.py#l82 -- nosy: +josh.r status: pending -> open ___ Python tracker

Re: async enumeration - possible?

2016-11-29 Thread Steve D'Aprano
On Wed, 30 Nov 2016 07:07 am, Marko Rauhamaa wrote: > Terry Reedy : > >> On 11/29/2016 9:25 AM, Frank Millman wrote: >> >>> Is there any technical reason for this, or is it just that no-one has >>> got around to writing an asynchronous version yet? >> >> Google's first hit for

Re: best way to read a huge ascii file.

2016-11-29 Thread Steve D'Aprano
On Wed, 30 Nov 2016 01:17 am, Heli wrote: > The following line which reads the entire 7.4 GB file increments the > memory usage by 3206.898 MiB (3.36 GB). First question is Why it does not > increment the memory usage by 7.4 GB? > > f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0)

[issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True)

2016-11-29 Thread Thomas Robitaille
New submission from Thomas Robitaille: In Python 3.5, the following code: import warnings def deal_with_warning(*args, **kwargs): print("warning emitted") with warnings.catch_warnings(record=True): warnings.showwarning = deal_with_warning

[issue15533] subprocess.Popen(cwd) documentation

2016-11-29 Thread Jan Lachnitt
Jan Lachnitt added the comment: Thank Wolfgang Maier for reminding this issue and providing various details and observations. Having taken a look at my old comments (and at others' comments, too), I feel that the cwd issue deserves a clearer description. Let's use the following simple C

[issue28427] WeakValueDictionary next bug (with multithreading)

2016-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: One possibility would be to always delay removals (always put them in _pending_removals). We would then have to enforce removals from time to time, but synchronously. -- nosy: +pitrou, tim.peters ___ Python tracker

[issue28427] WeakValueDictionary next bug (with multithreading)

2016-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: (or we bite the bullet and add a C helper function for the atomic test-and-delete thing) -- ___ Python tracker ___

[issue11145] '%o' % user-defined instance

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I read the code multiple times but still don't see any issues with the last path. If anybody know issues with it, please point on them. Otherwise I'll commit the patch. -- assignee: -> serhiy.storchaka ___

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue28834] Type checking in set comparisons.

2016-11-29 Thread nyoshimizu
nyoshimizu added the comment: I see. Sorry & thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread Josh Rosenberg
Josh Rosenberg added the comment: Just OOC, what version of English are the docs supposed to use? In American English, noun vs. verb doesn't matter, it's always "practice" (there is no such word as "practise"). In this case it doesn't matter (it's a noun, and everyone agrees on the

[issue28208] update sqlite to 3.14.2

2016-11-29 Thread Big Stone
Big Stone added the comment: As far as I test, the novelties from 0.15.2 don't break any API (just nice SQL-syntax sugar), and correct some old 3.8.0 bugs. and ".2" is the same level of stabilisation as current "0.14.2" -- ___ Python tracker

[issue24339] iso6937 encoding missing

2016-11-29 Thread John Helour
John Helour added the comment: > Please also check whether it's not possible to reuse the charmap codec > functions we have I've found nothing useful, maybe you (as the author) can find something really useful which can improve code readability or increase the performance. Please look at the

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-11-29 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: Elik, Ed, I have overlooked tracemalloc module raises deadlock if apply the patch. I found out a source comment on Modules/_tracemalloc.c:161 /* If your OS does not provide native thread local storage, you can implement it manually using a lock.

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +martin.panter ___ Python tracker ___ ___

[issue20612] cElementTree has problems with StringIO object containing unicode content

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-29 Thread Julien Palard
Changes by Julien Palard : Added file: http://bugs.python.org/file45696/issue28795-2.7.diff ___ Python tracker ___

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Martin Panter
Martin Panter added the comment: If adding proper support for hi=None, maybe lo=None should also be supported. Also, I would think the main Doc/library/bisect.rst documentation needs updating, and a test and What’s New entry added. -- ___ Python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Stefan Krah
Stefan Krah added the comment: Julien, the syntax converters look pretty clever. Do we need AC everywhere though? I wonder (once again) if this is really more readable than the existing code. -- nosy: +skrah ___ Python tracker

[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Ned Deily
Changes by Ned Deily : -- stage: commit review -> resolved ___ Python tracker ___ ___

[issue24015] timeit should start with 1 loop, not 10

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: That was implemented in issue28240. $ time ./python -m timeit "import time; time.sleep(1.0)" 1 loop, best of 5: 1 sec per loop real0m6.176s user0m0.160s sys 0m0.004s -- resolution: -> duplicate stage: -> resolved status: open -> closed

[issue28834] Type checking in set comparisons.

2016-11-29 Thread SilentGhost
SilentGhost added the comment: You seem to be misunderstanding how the intersection/union/etc are supposed to be used: >>> ab = {'a', 'b'} >>> ab.intersection('bc') {'b'} Using set.intersection (where set is a built-in class, rather than an instance thereof) requires the first argument to be

[issue27142] Default int value with xmlrpclib / xmlrpc.client

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This format doesn't conform the XML-RPC specification. Adding the support of it is a new feature. The question is whether there is a need of this feature. Are there some common XML-RPC servers or clients that produce such format? -- type: behavior

[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thus the only way to fix links is to specify full names? Does docs_class_links-2.7.patch look good to you? -- stage: -> patch review ___ Python tracker

csv into multiple columns using split function using python

2016-11-29 Thread handar94
I am trying to split a specific column of csv into multiple column and then appending the split values at the end of each row. `enter code here` import csv fOpen1=open('Meta_D1.txt') reader=csv.reader(fOpen1) mylist=[elem[1].split(',') for elem

Re: async enumeration - possible?

2016-11-29 Thread Terry Reedy
On 11/29/2016 9:25 AM, Frank Millman wrote: Is there any technical reason for this, or is it just that no-one has got around to writing an asynchronous version yet? Google's first hit for 'aenumerate' is https://pythonwise.blogspot.com/2015/11/aenumerate-enumerate-for-async-for.html Note

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Stefan Krah added the comment: > Julien, the syntax converters look pretty clever. Do we need AC > everywhere though? Please see previous comments for advantages of AC (signature object, docstring, speed). -- ___

Re: async enumeration - possible?

2016-11-29 Thread Marko Rauhamaa
Terry Reedy : > On 11/29/2016 9:25 AM, Frank Millman wrote: > >> Is there any technical reason for this, or is it just that no-one has >> got around to writing an asynchronous version yet? > > Google's first hit for 'aenumerate' is >

[issue28791] update sqlite to 3.15.2

2016-11-29 Thread Ned Deily
Ned Deily added the comment: Yes, we're not going to change library versions for the 3.6.0 installers at this point. Upgrade for 3.7.0 is fine and possibly for a 3.6.x maintenance release if warranted. I suggest holding off on any patches until we're closer to those releases as there may be

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread R. David Murray
R. David Murray added the comment: We at least used to point to Apple's style guide. I'm not sure where we point at the moment (it's in the documentation somewhere :). But yes, it's pretty much formal American English, though I'm sure there are places where other spelling has crept in.

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread Lele Gaifax
Lele Gaifax added the comment: Ok, thank you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14845] list() != []

2016-11-29 Thread Wolfgang Maier
Wolfgang Maier added the comment: Mark, PEP479 is not fully in effect in 3.6 yet. 3.7 will raise the RuntimeError, but 3.6 still only gives a DeprecationWarning. -- ___ Python tracker

[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto
Changes by Masayuki Yamamoto : Removed file: http://bugs.python.org/file45684/sys-executable-suffix-3.patch ___ Python tracker ___

[issue14845] list() != []

2016-11-29 Thread Mark Dickinson
Mark Dickinson added the comment: Wolfgang: ah, thanks, that makes more sense. I misunderstood; sorry for the noise. -- ___ Python tracker ___

[issue14845] list() != []

2016-11-29 Thread Wolfgang Maier
Wolfgang Maier added the comment: running with "-W always": >>> def five(x): ... for _ in range(5): ... yield x ... >>> F = five('x') >>> [next(F) for _ in range(10)] Traceback (most recent call last): File "", line 1, in File "", line 1, in StopIteration >>> list(next(F)

[issue28733] Show how to use mock_open in modules other that __main__

2016-11-29 Thread Michael Foord
Michael Foord added the comment: open shouldn't always be patched in builtins, it's much better to patch it in the specific namespace it's being called from. So the doc patch here shouldn't be applied as is. -- ___ Python tracker

[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread SilentGhost
SilentGhost added the comment: Reads just fine to me. -- nosy: +SilentGhost ___ Python tracker ___ ___

[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto
Changes by Masayuki Yamamoto : Added file: http://bugs.python.org/file45685/sys-executable-suffix-3.patch ___ Python tracker ___

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Peter Otten
Marko Rauhamaa wrote: > However, I think the real answer is that you shouldn't mix the "with" > construct with exception handling. Instead you should write: > >try: >f = open("xyz") >except FileNotFoundError: >...[B]... >try: >...[A]... >finally: >

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Marko Rauhamaa
Peter Otten <__pete...@web.de>: > Marko Rauhamaa wrote: > >> However, I think the real answer is that you shouldn't mix the "with" >> construct with exception handling. Instead you should write: >> >>try: >>f = open("xyz") >>except FileNotFoundError: >>...[B]... >>

[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread Lele Gaifax
New submission from Lele Gaifax: At https://hg.python.org/cpython/rev/52038705827d#l1.18 there is an "as part" where probably a "are part" was meant. -- assignee: docs@python components: Documentation messages: 281977 nosy: docs@python, lelit priority: normal severity: normal status:

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread Julien Palard
Julien Palard added the comment: Hi Martin, Removed the removing of the double new line at end of file. -- Added file: http://bugs.python.org/file45686/issue28820-2.diff ___ Python tracker

[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Mark Harris
Mark Harris added the comment: I installed python just for my user, attempted to run python just out of interest in the command line and again the same error appeared (missing python35.dll). I uninstalled that then reinstalled for all users, and again during installation the message missing

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would be nice to test corner cases: 1. Search UCS2 or UCS4 character with zero lower 8 bits: U+XX00. 2. Search UCS2 or UCS4 character with lower 8 bits that match high bits of string characters. For example search U+0404 in the string that consists of

[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread SilentGhost
Changes by SilentGhost : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Steven D'Aprano
On Wednesday 30 November 2016 10:59, woo...@gmail.com wrote: > If you want to do something only if the file exists (or does not), use > os.path.isfile(filename) No, don't do that. Just because the file exists, doesn't mean that you have permission to read or write to it. Worse, the code is

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Stefan Krah
Stefan Krah added the comment: Signature and docstring can be done manually with very little effort. Currently METH_FASTCALL is AC only, but I hope that will change. -- ___ Python tracker

[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2016-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-29 Thread Julien Palard
Julien Palard added the comment: Proposed as patches but english is not my native language so please review carefully. -- keywords: +patch Added file: http://bugs.python.org/file45695/issue28795-tip.diff ___ Python tracker

Re: async enumeration - possible?

2016-11-29 Thread Chris Angelico
On Wed, Nov 30, 2016 at 7:07 AM, Marko Rauhamaa wrote: > Ok, so how about: > >aall(aiterable) >aany(aiterable) >class abytearray(aiterable[, encoding[, errors]]) >class adict(aiterable, **kwarg) >class afilter(coro, aiterable) >class afrozenset(aiterable)

[issue27142] Default int value with xmlrpclib / xmlrpc.client

2016-11-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

Re: Request Help With Byte/String Problem

2016-11-29 Thread Wildman via Python-list
On Tue, 29 Nov 2016 18:29:51 -0800, Paul Rubin wrote: > Wildman writes: >> names = array.array("B", '\0' * bytes) >> TypeError: cannot use a str to initialize an array with typecode 'B' > > In Python 2, str is a byte string and you can do that. In Python 3, > str is a

Re: async enumeration - possible?

2016-11-29 Thread Frank Millman
"Frank Millman" wrote in message news:o1k355$da5$1...@blaine.gmane.org... Hi all Python 3.6 has introduced Asynchronous Generators, which work very well. [...] However, it does not allow you to enumerate over the generator output - [...] Is there any technical reason for this, or is

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If adding proper support for hi=None, maybe lo=None should > also be supported. That would be gratuitous. Lo already has a reasonable, useful, and self-explanatory value. This would add more complexity to the signature while reducing clarity. I really

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
Decorater added the comment: oh wait nvm -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Matt Wheeler
On Tue, 29 Nov 2016 at 23:59 wrote: > If you want to do something only if the file exists (or does not), use > os.path.isfile(filename) > This opens you up to a potential race condition (and has potential security implications, depending on the application), as you're using

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
Decorater added the comment: Wait actually BotErrors.CommandTimeoutError cubaclasses concurrent.futures.TimeoutError -- ___ Python tracker ___

Re: Request Help With Byte/String Problem

2016-11-29 Thread Paul Rubin
Wildman writes: > names = array.array("B", '\0' * bytes) > TypeError: cannot use a str to initialize an array with typecode 'B' In Python 2, str is a byte string and you can do that. In Python 3, str is a unicode string, and if you want a byte string you have to specify

Re: Python while loop

2016-11-29 Thread BartC
On 29/11/2016 23:58, paul.garcia2...@gmail.com wrote: Write a program which prints the sum of numbers from 1 to 101 ( 1 and 101 are included) that are divisible by 5 (Use while loop) This is the code: x=0 count=0 while x<=100: if x%5==0: count=count+x x=x+1 print(count) This

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: concurrent.futures.TimeoutError and concurrent.futures.__base.TimeoutError are the same class. So there is nothing to do here. -- resolution: -> rejected status: open -> closed ___ Python tracker

Re: Python while loop

2016-11-29 Thread MRAB
On 2016-11-29 23:58, paul.garcia2...@gmail.com wrote: Write a program which prints the sum of numbers from 1 to 101 ( 1 and 101 are included) that are divisible by 5 (Use while loop) This is the code: x=0 count=0 while x<=100: if x%5==0: count=count+x x=x+1 print(count)

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
New submission from Decorater: So, concurrent.futures.TimeoutError subclasses concurrent.futures.__base.TimeoutError. Why not have asyncio throw that instead of the __base class for Timeout Error? There is a huge issue with this for starters for those know knows this they cannot handle it

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
Decorater added the comment: Here is my corouytine and the traceback on it to verify my issue too: Task exception was never retrieved future: exception=TimeoutError()> Traceback (most recent call last): File "asyncio\tasks.py", line 239, in _step File

Request Help With Byte/String Problem

2016-11-29 Thread Wildman via Python-list
For the purpose of learning I am writing a script that will return different information about the Linux machine where it is running. Sort of like the inxi utility. Below is some code that I found that returns a list of the network interface devices on the system. It runs as is perfectly on

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Decorater
Decorater added the comment: I handle concurrent.futures.TimeoutError on my coroutine that is fired with create_task yet it sitll don't handle it though... so it still is a issue -- ___ Python tracker

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Decorater
Decorater added the comment: hmm This shows a bug in shutil.make_archive in python3. Run ./test.sh to run shutil.make_archive in both python2 and python3 on the wdir and then extract each of them for comparison. The file called

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: FYI the first release including the fix 78ede2baa146 is Python 3.5.2. -- ___ Python tracker ___

[issue24838] tarfile.py: fix GNU and USTAR formats to properly handle paths with special characters that are encoded with more than one byte each

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: FYI the first release including the fix 78ede2baa146 is Python 3.5.2. -- ___ Python tracker ___

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Dan “locallycompact” Firth
New submission from Dan “locallycompact” Firth: I have made an example of this bug here: https://github.com/locallycompact/py3_make_archive_bug Using shutil.make_archive() in python2 works fine, where as in python3 one of the filenames has been truncated by five characters after unpacking the

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Oh, Serhiy just closed the issue as a duplicate. -- ___ Python tracker ___

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: An entry in a TAR archive has a name. The name field has a size of 100 bytes. The field is padded with zero bytes. I don't know if it must or must not end with a zero byte.

[issue13721] ssl.wrap_socket on a connected but failed connection succeeds and .peer_certificate gives AttributeError

2016-11-29 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: fyi, I just observed this in the field in 2.7.3 using requests 2.5.3 I don't think requests has a workaround for 2.7 from reading the release logs. -- nosy: +kristjan.jonsson ___ Python tracker

[issue28832] Reduce memset in dict creation

2016-11-29 Thread INADA Naoki
New submission from INADA Naoki: This patch delays initialization of dk_entries. Entries are initialized when first use (when dk_netries is incremented). Minimum dk_entries of 64bit arch is 5 * 8 * 3 = 120bytes. So it can save 4 cache lines! I'm running benchmark for now. -- assignee:

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks as a duplicate of issue24838. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> tarfile.py: fix GNU and USTAR formats to properly handle paths with special characters that are

Vulture 0.11

2016-11-29 Thread Jendrik Seipp
vulture - Find dead code Vulture finds unused classes, functions and variables in your code. This helps you cleanup and find errors in your programs. If you run it on both your library and test suite you can find untested code. Due to Python's dynamic nature, static

Last call for the Call For Proposals of PythonFOSDEM 2017

2016-11-29 Thread Stephane Wirtel
Because the deadline is imminent and because we have only received some proposals, we will extend the current deadline. The new submission deadline is 2016-12-18. Call For Proposals == This is the official call for sessions for the Python devroom at FOSDEM 2017. FOSDEM is the

[issue28733] Show how to use mock_open in modules other that __main__

2016-11-29 Thread Michał Bultrowicz
Michał Bultrowicz added the comment: Then where it should be patched in? Can you give an example? From what I've checked patching only works in __main__ and builtins. -- ___ Python tracker

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye
New submission from Xavier de Gaye: With this patch, cross compiling a third-party extension module is done with the command: XBUILD_PYTHON_DIR=/path/to/python/dir python setup.py build where XBUILD_PYTHON_DIR is the location of the directory of the cross-compiled python executable. It may

  1   2   >