[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-16 Thread Simon Holland
Changes by Simon Holland : -- nosy: +gpolo, serhiy.storchaka ___ Python tracker ___

Re: __debug__ http://stackoverflow.com/questions/15305688

2016-11-16 Thread Steven D'Aprano
On Thursday 17 November 2016 02:22, eryk sun wrote: > On Wed, Nov 16, 2016 at 8:39 AM, Steven D'Aprano > wrote: >> On Wednesday 16 November 2016 16:21, Veek M wrote: >> >>> Trying to make sense of that article. My understanding of debug was >>> simple: >>>

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-11-16 Thread Michael Felt
Michael Felt added the comment: FYI: after manually creating the .../libpython3.5/config directory and copying three files (see below) I was able to "pip3 install cython" as test. At the packing area: michael@x071:[/data/prj/python3/python3-3.5.2]ls Xany/opt/lib/python3.5/config ld_so_aix

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread STINNER Victor
STINNER Victor added the comment: Windows API doc is not easy to understand. I wrote this doc when I fixed code pages in Python 3: http://unicodebook.readthedocs.io/operating_systems.html#windows -- ___ Python tracker

Re: help on "from deen import *" vs. "import deen"

2016-11-16 Thread jfong
Steven D'Aprano at 2016/11/17 12:06:19PM wrote: > You understand how this works? Yes, thank you for your detail explanation. > import russia as _tmp > president = _tmp.president > del _tmp This one I can understand. But the previous one >>_tmp = int('5') >>for name in dir(_tmp): >>

Re: What exactly is a python variable?

2016-11-16 Thread Chris Angelico
On Thu, Nov 17, 2016 at 4:40 PM, Veek M wrote: > In C: > int x = 10; > results in storage being allocated and type and location are fixed for > the life of the program. > > In Python, > x = 10 > > causes an object '10' to be created but how exactly is 'x' handled? > Symbol

Re: Access to the caller's globals, not your own

2016-11-16 Thread Dan Sommers
On Thu, 17 Nov 2016 16:17:51 +1100, Steven D'Aprano wrote: > ... factory functions are great. But I'm saying that as the writer of > the library, not the user of the library. Can you imagine expecting > users to do this? > from math import trig > sin = trig.build('sine') > result = sin(0.1) No,

What exactly is a python variable?

2016-11-16 Thread Veek M
In C: int x = 10; results in storage being allocated and type and location are fixed for the life of the program. In Python, x = 10 causes an object '10' to be created but how exactly is 'x' handled? Symbol Table lookup at compile time? Is every 'x' being substituted out of existence?

Re: Access to the caller's globals, not your own

2016-11-16 Thread Steven D'Aprano
On Thursday 17 November 2016 04:52, Rob Gaddi wrote: >> import library >> result = library.make_spam(arg) >> >> >> versus: >> >> import library >> make_spam = library.make_library() >> result = make_spam(arg) >> >> What a drag. >> >> > > And there you have it; an entire extra line at import

[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-16 Thread Simon Holland
New submission from Simon Holland: tkinters radiobutton's have an option 'indicatoron=0' which should display Radio Buttons as actual labelled buttons. button = tk.Radiobutton(self, text=option, variable = var, value = answer, indicatoron=0) Screenshots of expected and actual results ...

Re: help on "from deen import *" vs. "import deen"

2016-11-16 Thread Steven D'Aprano
On Thursday 17 November 2016 12:54, jf...@ms4.hinet.net wrote: > Steve D'Aprano at 2016/11/16 8:33:23AM wrote: >> `import foo` imports the module foo, that is all. (To be pedantic: it is >> *nominally* a module. By design, it could be any object at all.) >> >> `from foo import *` imports all the

Re: A question about sprite rendering in game development

2016-11-16 Thread Larry Hudson via Python-list
On 11/16/2016 12:16 AM, shadecelebi wrote: thanx a lot you guys. I'm slightly familiar with pygame from before so I'll make sure to utilize it. and no I don't have any of the characters yet as I've yet to start. I just wanted to know if I should keep learning python or if it would be trivial

[issue28670] PEP 235: Implement on every POSIX system, and clean up the C code for `import'

2016-11-16 Thread Nick Coghlan
Nick Coghlan added the comment: Michael, you seem to be operating under the assumption that the fact that the CPython VM assumes by default that Linux systems use consistent filesystem semantics is an accidental oversight. It's not - it's a pervasive simplifying assumption that runs

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-16 Thread Davin Potts
Davin Potts added the comment: Though it still lacks a proper test, I'm attaching a preliminary patch to address the problematic behavior in 3.5/3.6/default in the hopes that others might help test it. -- keywords: +patch Added file:

Re: help on "from deen import *" vs. "import deen"

2016-11-16 Thread Chris Angelico
On Thu, Nov 17, 2016 at 1:01 PM, wrote: > Michael Torrie at 2016/11/16 11:15:11AM wrote: >> ... The globals object is a dictionary and is itself >> mutable. But when we assign a new object to a particular dictionary >> key, it tosses out the old reference and makes the key

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: The ANSI and OEM codepages are conveniently supported on a Windows system as the encodings 'mbcs' and 'oem' (new in 3.6). The best-fit mapping is used by the 'replace' error handler (see the encode_code_page_flags function in Objects/unicodeobject.c). For other

Re: help on "from deen import *" vs. "import deen"

2016-11-16 Thread jfong
Michael Torrie at 2016/11/16 11:15:11AM wrote: > ... The globals object is a dictionary and is itself > mutable. But when we assign a new object to a particular dictionary > key, it tosses out the old reference and makes the key now refer to the > new object. It does not do anything to the old

[issue28718] '*' matches entire path in fnmatch.translate

2016-11-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: Oops, altsep is None, not the empty string when there is only one separator. And I didn't handle inverting the match. Sigh. You get the idea. -- ___ Python tracker

[issue28718] '*' matches entire path in fnmatch.translate

2016-11-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: Presumably something like: r'(?:' + r'|'.join({re.escape(os.path.sep), re.escape(os.path.altsep)}) + r')' would cover it completely. I switched to using non-capturing groups over a character class both to deal with the fact that escaping doesn't work the same

Re: help on "from deen import *" vs. "import deen"

2016-11-16 Thread jfong
Steve D'Aprano at 2016/11/16 8:33:23AM wrote: > `import foo` imports the module foo, that is all. (To be pedantic: it is > *nominally* a module. By design, it could be any object at all.) > > `from foo import *` imports all the visible public attributes of foo. > > They do completely different

[issue26072] pdb fails to access variables closed over

2016-11-16 Thread Chun-Yu Tseng
Chun-Yu Tseng added the comment: Your solution is quite neat. But it still misses use cases of the `global` statement: 1 y = 2 2 3 def f(): 4 y = 9 5 -> import pdb; pdb.set_trace(); 6 7 f() (Pdb) global y; y 9 (Pdb) global y; y += 1; y 10 (Pdb)

[issue28722] doctest example exit status

2016-11-16 Thread Rajiv Bakulesh Shah
New submission from Rajiv Bakulesh Shah: It might be nice if the doctest example set the appropriate exit status. Apologies if this is beyond the scope of the example, but I thought it might be good practice. Here is the file:

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: > Codecs are strict by default in Python. Call MultiByteToWideChar() with the > MB_ERR_INVALID_CHARS flag as Python does. Great catch. Without MB_ERR_INVALID_CHARS or WC_NO_BEST_FIT_CHARS Windows would perform the "best fit" behavior described in the BestFit

[issue28720] Add collections.abc.AsyncGenerator

2016-11-16 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks Ned. I went ahead and committed the patch. -- ___ Python tracker ___

[issue28721] Fix asynchronous generators athrow() and aclose() to handle StopAsyncIteration

2016-11-16 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28720] Add collections.abc.AsyncGenerator

2016-11-16 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28720] Add collections.abc.AsyncGenerator

2016-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset ae1dba7e7d04 by Yury Selivanov in branch '3.6': Issue #28720: Add collections.abc.AsyncGenerator. https://hg.python.org/cpython/rev/ae1dba7e7d04 New changeset fb9c8fdef3ec by Yury Selivanov in branch 'default': Merge 3.6 (issue #28720)

[issue28717] rounding error in % operator

2016-11-16 Thread William McIlhagga
William McIlhagga added the comment: Thanks, maybe I should get off my ass and contribute to the documentation then ... On 16 November 2016 at 22:30, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > > Is this behaviour documented? Or are you just

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-16 Thread Patrick Lehmann
Patrick Lehmann added the comment: Here is the patch file created with: PS> git diff > docstring_markup.patch This patchfile effects all files with this markup in the CPython repository. Kind regards Patrick -- keywords: +patch Added file:

[issue28721] Fix asynchronous generators athrow() and aclose() to handle StopAsyncIteration

2016-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0f12a1d3a737 by Yury Selivanov in branch '3.6': Issue #28721: Fix asynchronous generators aclose() and athrow() https://hg.python.org/cpython/rev/0f12a1d3a737 New changeset 22cd78026ad1 by Yury Selivanov in branch 'default': Merge 3.6 (issue

[issue28721] Fix asynchronous generators athrow() and aclose() to handle StopAsyncIteration

2016-11-16 Thread Yury Selivanov
New submission from Yury Selivanov: 1. aclose() should not propagate StopAsyncIteration: async def agen(): try: yield except: pass gen = agen() await agen.asend(None) await agen.aclose() # <- this shouldn't raise StopAsyncIteration 2. athrow() should

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-16 Thread R. David Murray
R. David Murray added the comment: We will accept github pull requests in the future (the transition is underway). For now, you can create a diff file (using hg diff by preference, but git diff will work) and uploaded it to the issue. For this issue, please only upload the docstring changes.

[issue28719] zipfile increase in size

2016-11-16 Thread Bert JW Regeer
Bert JW Regeer added the comment: Here's a dump from Python 3.6:

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-16 Thread Patrick Lehmann
Patrick Lehmann added the comment: How can I supply a fix? I have a branch with lots of fixes. https://github.com/Paebbels/cpython/tree/paebbels/issue-28710?ts=2 Why don't you accept pull requests via GitHub? Kind regards Patrick -- ___

[issue28719] zipfile increase in size

2016-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please make a dump. It should include not just literally the string written, but headers and other special fields. I tried with rbo = io.BytesIO(), and get rbo.tell() == 133. Should be a difference between io.BytesIO and ResponseBodyFile. Maybe

[issue28720] Add collections.abc.AsyncGenerator

2016-11-16 Thread Ned Deily
Ned Deily added the comment: OK for 3.6.0b4 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28717] rounding error in % operator

2016-11-16 Thread Mark Dickinson
Mark Dickinson added the comment: > Is this behaviour documented? Or are you just expected to know what C does? Indeed, it's not as well documented as it should be. I think that's partly for historical reasons: before Python 2.7, Python's % formatting more-or-less delegated directly to the

[issue28719] zipfile increase in size

2016-11-16 Thread Bert JW Regeer
Bert JW Regeer added the comment: It's literally the string written: writer.writestr('zinfo_or_arcname', b'foo') rbo in this case is a simple file like object. I can get dumps from Python 3.5 and Python 3.6 if necessary. -- ___ Python tracker

[issue28719] zipfile increase in size

2016-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you get a dump of rbo data? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Wolfgang Maier
Wolfgang Maier added the comment: No, I don't think the numeric tower ABC should be replaced by duck-typing. One of the very reasons the fractions module exists is that it showcases how to use the numeric tower. If you want a class to be picked up as a Rational it should be registered as

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: Similarly, type checking for int might be replaced with calling operator.index on the input and handling the TypeError; that way, anything that has declared itself logically int-like is handled without explicit type checking at all. --

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: Might it make sense to make instantiation from numbers.Rational duck typing based as well? Just try to get the numerator and denominator attributes, on AttributeError, skip it and move on. Unless there is some concern that a non-Rational type might have both

[issue28717] rounding error in % operator

2016-11-16 Thread William McIlhagga
William McIlhagga added the comment: OK, not wrong, just unexpected. Is this behaviour documented? Or are you just expected to know what C does? On 16 November 2016 at 21:37, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > You don't say why you think

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Wolfgang Maier
Wolfgang Maier added the comment: sure, I just happened to have the profiling available since I used it to optimize things. Here's similar microbenchmarks using perf: STRINGS === $ python -m perf timeit -s "from fractions import Fraction" "Fraction('1.23456e-7')" .

Re: Farewell to Rob Collins

2016-11-16 Thread Ben Finney
Ben Finney writes: > Robert and I had many conversations […]. My apologies for the confusion! This is not the same person. I did not know the Rob Collins described in the obituary so

[issue28717] rounding error in % operator

2016-11-16 Thread Mark Dickinson
Mark Dickinson added the comment: You don't say why you think this behaviour is wrong, or what you'd expect to see instead. Nevertheless, this behaviour is by design: the code `'%.1f' % x` rounds `x` to the nearest one-digit-after-the-point decimal number, and returns a string representation

Re: how to print variable few time?

2016-11-16 Thread andy
Sun, 13 Nov 2016 17:27:23 +0200 wrote Jussi Piitulainen: >>> word=raw_input() >>> print word*3 >>> >>> >>> with this code im getting - wordwordword. >>> what changes i need to make to get - word word word - instead? >>> >>> thanks >> >> using python3.x: >> >> word=input() >> print((word+'

[issue28720] Add collections.abc.AsyncGenerator

2016-11-16 Thread Yury Selivanov
Changes by Yury Selivanov : Removed file: http://bugs.python.org/file45512/agen_abc.patch ___ Python tracker ___

[issue28720] Add collections.abc.AsyncGenerator

2016-11-16 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file45513/agen_abc.patch ___ Python tracker ___

[issue28720] Add collections.abc.AsyncGenerator

2016-11-16 Thread Yury Selivanov
New submission from Yury Selivanov: This patch adds collections.abc.AsyncGenerator (closely modelled after collections.abc.Generator). Ned, is it OK if this goes into 3.6? This is something I completely forgot to do as part of PEP 525. This ABC is needed for asynchronous generators compiled

[issue28719] zipfile increase in size

2016-11-16 Thread Bert JW Regeer
New submission from Bert JW Regeer: I am the current maintainer of WebOb, and noticed that on Python 3.6 and 3.7 I noticed that a test started failing. Granted, the test is checking the size of the file created and it is not the brightest idea in a test, but it's been stable since Python

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-11-16 Thread Michael Felt
Michael Felt added the comment: As this is the issue still open with regard to issues with ld_so_aix... The current release Python3-3.5.2 does not include ld_so_aix in the "make install DESTDIR=xxx output ("make install" also neglects to install ld_so_aix) Installation Summary

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: I rewrote it using the csv module since I can't remember the escaping rules. -- Added file: http://bugs.python.org/file45511/codepage_table.csv ___ Python tracker

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Eryk Sun
Changes by Eryk Sun : Removed file: http://bugs.python.org/file45510/codepage_table.csv ___ Python tracker ___

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: I don't think the 2nd tuple element is useful when decoding a single byte. It either works or it doesn't, such as failing for non-ASCII bytes with multibyte codepages such as 932 and 950. I'm attaching the output from the following, which you should be able to

[issue26072] pdb fails to access variables closed over

2016-11-16 Thread Xavier de Gaye
Xavier de Gaye added the comment: This patch fixes the problems raised in this issue and allows accessing the globals at the Pdb prompt with the globals() dictionary: (Pdb) list 1 y = 2 2 3 def f(): 4 y = 9 5 z = 10 6 -> import pdb; pdb.set_trace(); 7

[issue28685] Optimizing list.sort() by performing safety checks in advance

2016-11-16 Thread Elliot Gorokhovsky
Elliot Gorokhovsky added the comment: Oh wait... uh... never mind... we want "faster" to refer to total time taken, so 1-def/ref is indeed the correct formula. I just got confused because perf outputs ref/dev, but that doesn't make sense for percents. --

Re: Printing a generator returns "", need to print its values

2016-11-16 Thread Peter Otten
vmaha...@centerpointmedia.com wrote: > I am running Python2.7, wherein I am running the following price of code: > > y = m.predict(input_fn=lambda:input_fn(df_predict), as_iterable=True) > print ('Predictions: {}'.format(str(y))) > > The output of the following is "" 0x7f0476373e10>" > >

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This would be helpful too if every byte is decoded to exactly 1 character. -- ___ Python tracker ___

Re: Printing a generator returns "", need to print its values

2016-11-16 Thread MRAB
On 2016-11-16 20:01, vmaha...@centerpointmedia.com wrote: I am running Python2.7, wherein I am running the following price of code: y = m.predict(input_fn=lambda:input_fn(df_predict), as_iterable=True) print ('Predictions: {}'.format(str(y))) The output of the following is """ However, the

[issue28718] '*' matches entire path in fnmatch.translate

2016-11-16 Thread Jim Nasby
New submission from Jim Nasby: A '*' in fnmatch.translate is converted into '.*', which will greedily match directory separators. This doesn't match shell behavior, which is that * will only match file names: decibel@decina:[14:07]~$ls ~/tmp/*/1|head ls: /Users/decibel/tmp/*/1: No such file

[issue28717] rounding error in % operator

2016-11-16 Thread William McIlhagga
New submission from William McIlhagga: '%.1f' % 0.25 yields the string '0.2' '%.1f' % 0.75 yields the string '0.8' This is wrong. -- messages: 280984 nosy: William McIlhagga priority: normal severity: normal status: open title: rounding error in % operator type:

Printing a generator returns "", need to print its values

2016-11-16 Thread vmahajan
I am running Python2.7, wherein I am running the following price of code: y = m.predict(input_fn=lambda:input_fn(df_predict), as_iterable=True) print ('Predictions: {}'.format(str(y))) The output of the following is """ However, the desired output must be in the format [1 0 0 1 1 0 0 1]. Can

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: How about just the ASCII repr of the 256 decoded characters in CSV? I don't think the list of 2-tuple results is useful. For these single-byte codepages it's always 1 byte consumed. -- ___ Python tracker

[issue28715] Check result of PyUnicode_AsUTF8

2016-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _PyUnicode_AsString is just an outdated alias to PyUnicode_AsUTF8. -- ___ Python tracker ___

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Profiling give you only approximate results. In normal execution the effect of your changes can be opposite. Could you please provide benchmarks without using profiling? -- nosy: +serhiy.storchaka ___ Python

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Eryk. Could you please run following script and attach the output? import codecs codepages = [424, 856, 857, 864, 869, 874, 932, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1257, 1258] for cp in codepages: table = [] for i in range(256):

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Eryk Sun
Eryk Sun added the comment: Serhiy, single-byte codepages map every byte value, even if it's just to a Unicode C1 control code [1]. For example: import ctypes kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) MB_ERR_INVALID_CHARS = 0x0008 def

Re: Farewell to Rob Collins

2016-11-16 Thread Sean Son
Rest in Peace Rob On Wed, Nov 16, 2016 at 12:48 PM, Ben Finney wrote: > "M.-A. Lemburg" writes: > > > Rob was a true Pythonista from the heart. He will always be remembered > > for his humor, great spirit and kindness. > > Robert and I had many

[issue28716] Fractions instantiation revisited

2016-11-16 Thread R. David Murray
Changes by R. David Murray : -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId

2016-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual -> Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId ___ Python tracker

[issue28685] Optimizing list.sort() by performing safety checks in advance

2016-11-16 Thread Elliot Gorokhovsky
Elliot Gorokhovsky added the comment: So thanks for pointing out that perf has a --compare_to option: it turns out I had calculated the times wrong! Specifically, I had used (ref-dev)/ref while I should have used ref/dev which is what perf --compare_to uses. Anyway, the actual times are

[issue28670] PEP 235: Implement on every POSIX system, and clean up the C code for `import'

2016-11-16 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___

[issue28685] Optimizing list.sort() by performing safety checks in advance

2016-11-16 Thread Elliot Gorokhovsky
Changes by Elliot Gorokhovsky : Added file: http://bugs.python.org/file45508/fastsort.patch ___ Python tracker ___

[issue28716] Fractions instantiation revisited

2016-11-16 Thread Wolfgang Maier
New submission from Wolfgang Maier: I've spent a bit of time lately trying to optimize the instantiation of Fractions. This is related to Issue22464, but instead of focusing on constructing Fractions from ints, my attempts revolve around improving instantiation from strings, floats and

[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2016-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2016-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6dd22ed7140e by Serhiy Storchaka in branch '3.6': Issue #28701: _PyUnicode_EqualToASCIIId and _PyUnicode_EqualToASCIIString now https://hg.python.org/cpython/rev/6dd22ed7140e New changeset 44874b20e612 by Serhiy Storchaka in branch 'default': Issue

[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2016-11-16 Thread STINNER Victor
STINNER Victor added the comment: _PyUnicode_EqualToASCII-runtime-check.diff LGTM. -- ___ Python tracker ___

Re: Access to the caller's globals, not your own

2016-11-16 Thread Rob Gaddi
Steven D'Aprano wrote: > On Tuesday 15 November 2016 15:55, Dan Sommers wrote: > >> On Mon, 14 Nov 2016 16:20:49 +1100, Steven D'Aprano wrote: >> >>> import library >>> SPAMIFY = False # only affects this module, no other modules >>> result = library.make_spam(99) >> >> I must be missing

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Codecs are strict by default in Python. Call MultiByteToWideChar() with the MB_ERR_INVALID_CHARS flag as Python does. You also could use _codecs.code_page_decode(). -- ___ Python tracker

Re: Farewell to Rob Collins

2016-11-16 Thread Ben Finney
"M.-A. Lemburg" writes: > Rob was a true Pythonista from the heart. He will always be remembered > for his humor, great spirit and kindness. Robert and I had many conversations about the Bazaar version control system, and I owe to him my passion for distributed version

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Ned Deily
Ned Deily added the comment: I'm not qualified to offer a technical opinion on Windows matters like this so, for 3.6, I leave it to your discretion, Steve. If you do decide to push this change, please do so before 3.6.0b4 on Monday. -- ___ Python

[issue28715] Check result of PyUnicode_AsUTF8

2016-11-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The function PyUnicode_AsUTF8() can fail, but not all callers check for error. Proposed patch adds missed checks. In some places the code is rewritten to not use PyUnicode_AsUTF8() at all. -- components: Extension Modules, Interpreter Core files:

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Steve Dower
Steve Dower added the comment: No idea which is faster, but the tables have better compatibility. However, I'm not sure that changing the tables in already released versions is a great idea, since it could "corrupt" programs without warning. Adding the release managers to weigh in - my gut

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: ... On the other hand, I am happy to use these Win32 functions if they are faster, but still the table should be made correct in the first place. (See also issue28343 (936) and issue28693 (950) for problems with DBCS Chinese code pages.) --

ANN: eGenix mxODBC 3.3.6 - Python ODBC Database Interface

2016-11-16 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Python ODBC Database Interface Version 3.3.6 mxODBC is our commercially supported Python extension providing

tox-2.5.0: little fixes and improvements

2016-11-16 Thread holger krekel
hi all, tox-2.5.0 was just released to pypi, see https://tox.readthedocs.org for docs and the changelog below for details. Many thanks to Oliver Bestwalter, Ronny Pfannschmidt, Bruno Oliveira, Lukasz Rogalski, John Vandenberg, Florian Bruhin and all others

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: Update: the test script at issue28712 can be modified to show this issue too. -- ___ Python tracker ___

[issue28693] No HKSCS support in Windows cp950

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: Update: the test script at issue28712 can be modified to show this issue too. -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-11-16 Thread Mingye Wang
Changes by Mingye Wang : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

ANN: eGenix mxODBC 3.3.6 - Python ODBC Database Interface

2016-11-16 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Python ODBC Database Interface Version 3.3.6 mxODBC is our commercially supported Python extension providing

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Mingye Wang
Mingye Wang added the comment: Yes, it's a table issue. My suggested fix is to replace them all with WindowsBestFit tables, where MS currently redirects https://msdn.microsoft.com/en-us/globalization/mt767590 visitors to. These old "WINDOWS" tables appear abandoned since long ago. --

[issue28670] PEP 235: Implement on every POSIX system, and clean up the C code for `import'

2016-11-16 Thread Michael Witten
Michael Witten added the comment: * Bugs, by their very nature, are often obscure; some of the worst in history have lain dormant, unseen, for years or perhaps even decades. Unsurprisingly, then, this bug is also a corner case that would be unknowingly triggered in practice only rarely;

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Steve Dower
Steve Dower added the comment: So is this a bug in the hardcoded encoding tables in Python? I briefly considered making them all use the OS functions, but then they'll be inconsistent with other platforms (where the tables should work fine). Do you have a proposed fix? That will help

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2016-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch adds checks in debug mode that the right argument of _PyUnicode_EqualToASCIIString and _PyUnicode_EqualToASCIIId is ASCII-only string. -- Added file: http://bugs.python.org/file45505/_PyUnicode_EqualToASCII-runtime-check.diff

[issue28713] Recent tutorial for recent Python3 still uses IOError.

2016-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3375c111d1ff by Kushal Das in branch '3.6': Closes #28713 uses OSError in the tutorial https://hg.python.org/cpython/rev/3375c111d1ff New changeset 15e5e476e4a1 by Kushal Das in branch 'default': Closes #28713 uses OSError in the tutorial

Re: __debug__ http://stackoverflow.com/questions/15305688

2016-11-16 Thread eryk sun
On Wed, Nov 16, 2016 at 8:39 AM, Steven D'Aprano wrote: > On Wednesday 16 November 2016 16:21, Veek M wrote: > >> Trying to make sense of that article. My understanding of debug was >> simple: >> 1. __debug__ is always True, unless -O or -OO >> 2. 'if' is

Re: Access to the caller's globals, not your own

2016-11-16 Thread Antoon Pardon
Op 16-11-16 om 09:36 schreef Steven D'Aprano: > On Tuesday 15 November 2016 15:55, Dan Sommers wrote: > >> On Mon, 14 Nov 2016 16:20:49 +1100, Steven D'Aprano wrote: >> >>> import library >>> SPAMIFY = False # only affects this module, no other modules >>> result = library.make_spam(99) >> I must

[issue28713] Recent tutorial for recent Python3 still uses IOError.

2016-11-16 Thread Kushal Das
Kushal Das added the comment: This following one line change should fix this one. -- keywords: +patch nosy: +kushal.das Added file: http://bugs.python.org/file45504/issue28713.patch ___ Python tracker

  1   2   >