Re: OpenSSL error

2018-09-06 Thread dieter
Peng Yu writes: > ... > from OpenSSL import rand, crypto, SSL > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenSSL/SSL.py", > line 118, in > SSL_ST_INIT = _lib.SSL_ST_INIT > AttributeError: 'module' object has no attribute 'SSL_ST_INIT' That

[issue34585] Don't use AC_RUN_IFELSE to determine float endian

2018-09-06 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: +yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes

2018-09-06 Thread Vladimir Matveev
Vladimir Matveev added the comment: file URI scheme is covered by RFC8089, specifically https://tools.ietf.org/html/rfc8089#appendix-E.3.2. -- nosy: +v2m ___ Python tracker

[issue34599] improve performance of _Py_bytes_capitalize()

2018-09-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 593bb30e82eded7f2ec02f7d1aa49742e6962113 by Benjamin Peterson (Sergey Fedoseev) in branch 'master': closes bpo-34599: Improve performance of _Py_bytes_capitalize(). (GH-9083)

Re: don't quite understand mailing list

2018-09-06 Thread Marko Rauhamaa
mm0fmf : > On 06/09/2018 21:06, Ethan Furman wrote: >> On 09/06/2018 12:42 PM, Reto Brunner wrote: >>> What do you think the link, which is attached to every email you >>> receive from the list, is for? Listinfo sounds very promising, >>> doesn't it? >>> >>> And if you actually go to it you'll

Re: Debug script under pdb, how to avoid a bunch of errors caused by the exit()?

2018-09-06 Thread Jach Fong
I tried the following tests under pdb, 1. WinPython 3.6.6 on Vista, still saw those errors. 2. Python 3.4 on Win7, still saw those errors. 3. Python 3.6.3 on Win7, it's fine, no errors. Hmmm... seems both Python and OS are related? --Jach Peter via Python-list at 2018/9/7 AM 06:33 wrote: I'm

[issue28617] Why isn't "in" called a comparison operation?

2018-09-06 Thread wim glenn
Change by wim glenn : -- pull_requests: +8545 stage: commit review -> patch review ___ Python tracker ___ ___ Python-bugs-list

Re: Object-oriented philosophy

2018-09-06 Thread Steven D'Aprano
On Thu, 06 Sep 2018 22:00:26 +0100, MRAB wrote: > On 2018-09-06 21:24, Michael F. Stemper wrote: [...] >>try: >> P_0s = xmlmodel.findall( 'RatedPower' )[0].text >> self.P_0 = float( P_0s ) >>except: [...] > A word of advice: don't use a "bare" except, i.e. one that doesn't >

Re: don't quite understand mailing list

2018-09-06 Thread Steven D'Aprano
On Thu, 06 Sep 2018 13:06:22 -0700, Ethan Furman wrote: > On 09/06/2018 12:42 PM, Reto Brunner wrote: > >> What do you think the link, which is attached to every email you >> receive from the list, is for? Listinfo sounds very promising, doesn't >> it? >> >> And if you actually go to it you'll

Re: PEP 526 - var annotations and the spirit of python

2018-09-06 Thread Abdur-Rahmaan Janhangeer
hey, greetings, how did you come across this thread? Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius -- https://mail.python.org/mailman/listinfo/python-list

Re: Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Steven D'Aprano
On Thu, 06 Sep 2018 11:50:17 -0700, Viet Nguyen via Python-list wrote: > If I do this "aList = enumerate(numList)", isn't it > stored permanently in aList now? Yes, but the question is "what is *it* that is stored? The answer is, it isn't a list, despite the name you choose. It is an enumerate

Re: PEP 526 - var annotations and the spirit of python

2018-09-06 Thread sjatkins
On Sunday, July 1, 2018 at 10:06:49 AM UTC-7, Abdur-Rahmaan Janhangeer wrote: > was viewing pep526, so, finally, python cannot do without hinting the type > as other languages? > will python finally move to > int x = 3 where int is a pre annotation? > > i am not arguing it's usefulness but

Re: Cross platform mutex to prevent script running more than instance?

2018-09-06 Thread eryk sun
On Tue, Sep 4, 2018 at 5:47 PM, Cameron Simpson wrote: > > The downside with mkdir, and also with pd files really, is that a program or > OS abort can leave them lying around. Being persistent objects, some kind of > cleanup is needed. While the OP needs a cross-platform solution, if it's just

[issue34585] Don't use AC_RUN_IFELSE to determine float endian

2018-09-06 Thread Ross Burton
Change by Ross Burton : -- pull_requests: +8543 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Debug script under pdb, how to avoid a bunch of errors caused by the exit()?

2018-09-06 Thread Peter via Python-list
I'm on 3.7.0 on Win 10, and get a different result. No traceback. Perhaps it's a bug in 3.4 that was fixed subsequently. C:\test> py -m pdb bugInPDB.py > c:\test\buginpdb.py(1)() -> password = 'bad' (Pdb) tbreak 3 Breakpoint 1 at c:\test\buginpdb.py:3 (Pdb) cont Deleted breakpoint 1 at

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Tim Peters
Tim Peters added the comment: No, there's no requirement that run lengths on the stack be ordered in any way by magnitude. That's simply one rule timsort uses, as well as 2-merge and various other schemes discussed in papers. powersort has no such rule, and that's fine. Regardless, rules

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Koos Zevenhoven
Koos Zevenhoven added the comment: And by "looking at" Timsort, I mean reading your explanation. The motivation for merge ordering and so on was already quite clear from there. But that motivation does not imply that the stack has to be monotonous in run length, although memory

[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-09-06 Thread pms.coder
pms.coder added the comment: I have the same issue on Debian 9: == CPython 3.8.0a0 (heads/master:874809e, Sep 6 2018, 23:31:00) [GCC 6.3.0 20170516] == Linux-4.9.0-6-amd64-x86_64-with-glibc2.17 little-endian == cwd: /home/xxx/xxx/cpython/git/cpython/build/test_python_55266 == CPU count: 4 ==

[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-09-06 Thread Erik Janssens
Erik Janssens added the comment: for what's it worth, I've observed similar crashes under these strange circumstances : - the crashes don't appear in python 3.4, but they do in 3.5 (maybe due to switch in msvc runtime) - the crashes do appear when run as script, the exact same commands in

Re: don't quite understand mailing list

2018-09-06 Thread Gene Heskett
On Thursday 06 September 2018 16:44:20 mm0fmf wrote: > On 06/09/2018 21:06, Ethan Furman wrote: > > On 09/06/2018 12:42 PM, Reto Brunner wrote: > >> What do you think the link, which is attached to every email you > >> receive from the list, is for? Listinfo sounds very promising, > >> doesn't

[issue34217] windows: cross compilation fails due to headers with uppercase

2018-09-06 Thread Erik Janssens
Change by Erik Janssens : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

Re: ModuleNotFoundError: No module named 'encodings'

2018-09-06 Thread Thomas Jollans
On 09/06/2018 09:46 PM, Jason Qian via Python-list wrote: Hi Need some help. I have a C++ application that invokes Python. ... Py_SetPythonHome("python_path"); This isn't actually a line in your code, is it? For one thing, Py_SetPythonHome expects a wchar_t*... Py_Initialize(); This

Re: Object-oriented philosophy

2018-09-06 Thread MRAB
On 2018-09-06 21:24, Michael F. Stemper wrote: On 2018-09-06 09:35, Rhodri James wrote: On 06/09/18 15:04, Michael F. Stemper wrote: Net net is that the only thing that ended up being common was the __init__ methods. Two of the classes have identical __init__ methods; the third has a superset

Re: don't quite understand mailing list

2018-09-06 Thread Ethan Furman
On 09/06/2018 01:44 PM, mm0fmf wrote: Seriously if someone has a swanky signature advertising that they are a rocket scientist viz. "Software Contractor, Missiles and Fire Control" and yet doesn't know what a language runtime is or how mailing lists work then they are asking for that kind of

Re: don't quite understand mailing list

2018-09-06 Thread Chris Angelico
On Fri, Sep 7, 2018 at 6:44 AM, mm0fmf wrote: > On 06/09/2018 21:06, Ethan Furman wrote: >> >> On 09/06/2018 12:42 PM, Reto Brunner wrote: >> >>> What do you think the link, which is attached to every email you receive >>> from the list, is for? Listinfo sounds very promising, doesn't it? >>> >>>

Re: don't quite understand mailing list

2018-09-06 Thread mm0fmf
On 06/09/2018 21:06, Ethan Furman wrote: On 09/06/2018 12:42 PM, Reto Brunner wrote: What do you think the link, which is attached to every email you receive from the list, is for? Listinfo sounds very promising, doesn't it? And if you actually go to it you'll find: "To unsubscribe from

Re: Object-oriented philosophy

2018-09-06 Thread Michael F. Stemper
On 2018-09-06 12:32, Stefan Ram wrote: > "Michael F. Stemper" writes: >> Is there really any benefit to this change? Yes, I've eliminated >> some (a few lines per class) duplicate code. On the other hand, >> I've added the parent class and the (probably small, but not >> non-existent) overhead of

Re: Object-oriented philosophy

2018-09-06 Thread Michael F. Stemper
On 2018-09-06 10:40, Abdur-Rahmaan Janhangeer wrote: > Also, get someone, preferrable a python engineer to review your code. Sounds like an advertisement to me. -- Michael F. Stemper Why doesn't anybody care about apathy? -- https://mail.python.org/mailman/listinfo/python-list

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Koos Zevenhoven
Koos Zevenhoven added the comment: Sorry, I meant that the funny code in the "power" computation in powersort is a logarithmic measure. But I don't know where that came from. I just looked at Timsort and now figuring out how powersort is different. --

Re: Object-oriented philosophy

2018-09-06 Thread Michael F. Stemper
On 2018-09-06 09:35, Rhodri James wrote: > On 06/09/18 15:04, Michael F. Stemper wrote: >> Net net is that the only thing that ended up being common was the >> __init__ methods. Two of the classes have identical __init__ >> methods; the third has a superset of that method. The other methods >> all

Re: Object-oriented philosophy

2018-09-06 Thread Michael F. Stemper
On 2018-09-06 09:34, Marko Rauhamaa wrote: > "Michael F. Stemper" : > >> Since the three classes all had common methods (by design), I >> thought that maybe refactoring these three classes to inherit from >> a parent class would be beneficial. I went ahead and did so. >> (Outlines of before and

Re: don't quite understand mailing list

2018-09-06 Thread Ethan Furman
On 09/06/2018 12:42 PM, Reto Brunner wrote: What do you think the link, which is attached to every email you receive from the list, is for? Listinfo sounds very promising, doesn't it? And if you actually go to it you'll find: "To unsubscribe from Python-list, get a password reminder, or change

Re: Object-oriented philosophy

2018-09-06 Thread Rob Gaddi
On 09/06/2018 09:07 AM, Thomas Jollans wrote: On 2018-09-06 17:40, Abdur-Rahmaan Janhangeer wrote: Also, get someone, preferrable a python engineer to review your code. Does anyone here know anyone who would refer to themselves as a "Python engineer" with a straight face? I merely ask... --

ModuleNotFoundError: No module named 'encodings'

2018-09-06 Thread Jason Qian via Python-list
Hi Need some help. I have a C++ application that invokes Python. ... Py_SetPythonHome("python_path"); Py_Initialize(); This works fine on Python 3.6.4 version, but got errors on Python 3.7.0 when calling Py_Initialize(), Fatal Python error: initfsencoding: unable to load the file system codec

Re: don't quite understand mailing list

2018-09-06 Thread Reto Brunner
On Thu, Sep 06, 2018 at 07:10:10PM +, VanDyk, Richard T wrote: > Can you please take me off the mailing list or prevent questions from coming > to me. Can you advise me on my problem or point me in the right direction? > Thanks. > https://mail.python.org/mailman/listinfo/python-list What do

Re: Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Viet Nguyen via Python-list
On Thursday, September 6, 2018 at 12:12:20 PM UTC-7, David Raymond wrote: > The actual "enumerate" object is really just holding a current index and a > reference to the original list. So if you alter the original list while > you're iterating through it you'll see the changes. If you want a

Re: Object-oriented philosophy

2018-09-06 Thread Thomas Jollans
On 2018-09-06 17:40, Abdur-Rahmaan Janhangeer wrote: > Also, get someone, preferrable a python engineer to review your code. Does anyone here know anyone who would refer to themselves as a "Python engineer" with a straight face? I merely ask... -- Thomas --

don't quite understand mailing list

2018-09-06 Thread VanDyk, Richard T
Greetings; I sent in a question on how to install robot framework on python 3.7 using pip (or any other way). None of the commands on the >>> seem to work for me. I was asked to update the c/c++ runtime which I don't know what that means. I was also asked to subscribe to the mailing list. I did

Re: Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Chris Angelico
On Fri, Sep 7, 2018 at 4:50 AM, Viet Nguyen via Python-list wrote: >> Because it's not an enumerated list, it's an enumerated iterator. >> Generally, you'll just use that directly in the loop: >> >> for i, value in enumerate(numbers): >> >> There's generally no need to hang onto it from one loop

[issue34590] "Logging HOWTO" should share an example of best practices for using logging in a library

2018-09-06 Thread Nathaniel Manista
Nathaniel Manista added the comment: Something... related, that may perhaps belong in a separate issue, but that I want to at least mention here because it would be solved if logging-in-libraries best practices were authoritatively documented and exemplified: it's just too consarn easy to

RE: Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread David Raymond
The actual "enumerate" object is really just holding a current index and a reference to the original list. So if you alter the original list while you're iterating through it you'll see the changes. If you want a full copy then you can just wrap it with list() Python 3.7.0 (v3.7.0:1bf9cc5093,

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Tim Peters
Tim Peters added the comment: The notion of cost is that merging runs of lengths A and B has "cost" A+B, period. Nothing to do with logarithms. Merge runs of lengths 1 and 1000, and it has cost 1001. They don't care about galloping, only about how the order in which merges are performed

Re: Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Viet Nguyen via Python-list
On Thursday, September 6, 2018 at 10:34:19 AM UTC-7, Chris Angelico wrote: > On Fri, Sep 7, 2018 at 3:26 AM, Viet Nguyen via Python-list > wrote: > numList > > [2, 7, 22, 30, 1, 8] > > > aList = enumerate(numList) > > > for i,j in aList:print(i,j) > > > > 0 2 > > 1 7 > > 2 22 > > 3

[issue34594] Some tests use hardcoded errno values

2018-09-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset b03c2c51909e3b5b5966d86a2829b5ddf2d496aa by Benjamin Peterson (Zackery Spytz) in branch 'master': closes bpo-34594: Don't hardcode errno values in the tests. (GH-9076)

[issue34561] Replace list sorting merge_collapse()?

2018-09-06 Thread Koos Zevenhoven
Koos Zevenhoven added the comment: So it looks like we're working with a logarithmic measure of the "cost". I'm operating largely based on your description of Timsort in the link in msg324597, which the paper also refers to. But since the paper is sorting an array of Java ints (not

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

2018-09-06 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +8542 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34599] improve performance of _Py_bytes_capitalize()

2018-09-06 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +8541 stage: -> patch review ___ Python tracker ___ ___

[issue34599] improve performance of _Py_bytes_capitalize()

2018-09-06 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : Currently _Py_bytes_capitalize() checks case before using conversion table, performance can be improved by using conversion table unconditionally. Benchmarks: $ python -m perf timeit --compare-to ~/tmp/cpython-master-venv/bin/python -s "b =

Re: Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Chris Angelico
On Fri, Sep 7, 2018 at 3:26 AM, Viet Nguyen via Python-list wrote: numList > [2, 7, 22, 30, 1, 8] > aList = enumerate(numList) > for i,j in aList:print(i,j) > > 0 2 > 1 7 > 2 22 > 3 30 > 4 1 > 5 8 > for i,j in aList:print(i,j) > Because it's not an enumerated list, it's

Why emumerated list is empty on 2nd round of print?

2018-09-06 Thread Viet Nguyen via Python-list
>>> numList [2, 7, 22, 30, 1, 8] >>> aList = enumerate(numList) >>> for i,j in aList:print(i,j) 0 2 1 7 2 22 3 30 4 1 5 8 >>> for i,j in aList:print(i,j) >>> -- https://mail.python.org/mailman/listinfo/python-list

[issue34597] Python needs to check existence of functions at runtime for targeting older macOS platforms

2018-09-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: The primary Python.org installer supports 10.9 and later by way of being compiled on 10.9, and there is also an installer that supports 10.6. There currently is no promise that building on 10.13 results in code that works on earlier versions of macOS.

[issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero

2018-09-06 Thread Eric Wieser
Eric Wieser added the comment: Pinging again, for lack of a clearer path forward -- ___ Python tracker ___ ___ Python-bugs-list

[issue34305] inspect.getsourcefile and inspect.getcomments do not work with decorated functions

2018-09-06 Thread Eric Wieser
Eric Wieser added the comment: Pinging, as recommended by https://devguide.python.org/pullrequest/#reviewing. -- ___ Python tracker ___

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +8540 stage: -> patch review ___ Python tracker ___ ___

Re: Debug script under pdb, how to avoid a bunch of errors caused by the exit()?

2018-09-06 Thread Oscar Benjamin
On Thu, 6 Sep 2018 at 10:59, Jach Fong wrote: > > Here the script file, test0.py: > -- > password = 'bad' > if password == 'bad': > print('bad password') > exit() > else: > print('good password') > > print('something else to do') >

OpenSSL error

2018-09-06 Thread Peng Yu
Hi, I got the following error. Does anybody know how to fix it? Thanks. $ pip Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 7, in from pip._internal import main File

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
Naitree Zhu added the comment: Ok, I see. Thank you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34598] How to fix? Error in Kali linux python 2.7 - Collecting pip From cffi callback : Traceback (most recent call last): File "/usr/local/lib/pytho

2018-09-06 Thread andy polandski
New submission from andy polandski : root@kali:~# python get-pip.py Collecting pip >From cffi callback : Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 309, in wrapper _lib.X509_up_ref(x509) AttributeError: 'module' object has no

Re: fsxNet Usenet gateway problem again

2018-09-06 Thread Thomas Jollans
On 2018-09-06 15:50, Michael Torrie wrote: > On 09/05/2018 02:30 PM, Chris Angelico wrote: >> I don't think this was spamming the list with the same question; a >> glitch somewhere in a netnews server appears to be re-posting some old >> posts. > > I wonder why this bbs gateway in New Zealand

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +ezio.melotti, michael.foord, rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Zachary Ware
Zachary Ware added the comment: I think we should make the same change on all branches (why would we fix it in maintenance branches just to break it in the next major release?), in which case it's just one PR to master and our backport bot (and/or the merging core dev) will take care of it

[issue34590] "Logging HOWTO" should share an example of best practices for using logging in a library

2018-09-06 Thread Tim Lesher
Change by Tim Lesher : -- nosy: +tlesher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
Naitree Zhu added the comment: Hi @zach.ware, Just to make sure I'm getting this right (first time contributing to cpython...) Now I need to open 4 PRs at GitHub, - 1 PR to master branch, with following changes: raise TypeError when `reason` is not a string. (Include unit test.) - 3 PRs to

Re: Object-oriented philosophy

2018-09-06 Thread Abdur-Rahmaan Janhangeer
Also, get someone, preferrable a python engineer to review your code. yours, Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius -- https://mail.python.org/mailman/listinfo/python-list

Re: Object-oriented philosophy

2018-09-06 Thread Rhodri James
On 06/09/18 15:04, Michael F. Stemper wrote: Net net is that the only thing that ended up being common was the __init__ methods. Two of the classes have identical __init__ methods; the third has a superset of that method. The other methods all have completely different implementations. This

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Zachary Ware
Zachary Ware added the comment: "Unconditionally" :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
Naitree Zhu added the comment: What would be a good default reason? How about the function name? if isinstance(reason, types.FunctionType): reason = reason.__name__ For example, from unittest import TestCase, skip class Test(TestCase): @skip def

[issue34597] Python needs to check existence of functions at runtime for targeting older macOS platforms

2018-09-06 Thread Zorg
New submission from Zorg : If one wants to compile Python and embed it in their applications, or more generally, deploy the framework / libraries to older systems, then Python needs to check the existence of functions at runtime that are unavailable to Python's supported minimum OS. For

EuroPython 2018: Videos for Friday available

2018-09-06 Thread M.-A. Lemburg
We are pleased to announce the third and last batch of cut videos from EuroPython 2018 in Edinburgh, Scotland, UK. * EuroPython 2018 YouTube Playlist * https://www.youtube.com/watch?v=UXSr1OL5JKo=0s=130=PL8uoeex94UhFrNUV2m5MigREebUms39U5 In the last batch, we have included all

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

2018-09-06 Thread Stefan Krah
Stefan Krah added the comment: pypy3 actually took over the terse exceptions, but without the conditions. They'd also need error codes from libmpdec now. huge = Decimal('9' * 99) huge.quantize(Decimal('0.1')) Traceback (most recent call last): File "", line 1, in File

[issue31371] Remove deprecated tkinter.tix module

2018-09-06 Thread Zachary Ware
Zachary Ware added the comment: We missed the boat for 3.7 anyway. With the PEP 4 argument, I won't push any further for ripping Tix out completely before 2020, but if something happens to break building it on Windows before then my fix will be to remove it from the Windows build.

Re: Object-oriented philosophy

2018-09-06 Thread Marko Rauhamaa
"Michael F. Stemper" : > Since the three classes all had common methods (by design), I > thought that maybe refactoring these three classes to inherit from > a parent class would be beneficial. I went ahead and did so. > (Outlines of before and after are at the end of the post.) > > Net net is

[issue32310] Remove _Py_PyAtExit from Python.h

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: It's unclear if this change is going to break anything. In case of doubt, I chose to reject the change. Note: I'm working on a project to rework and cleanup the C API, see: https://pythoncapi.readthedocs.io/

[issue30985] Set closing variable in asyncore at close

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: I reject the issue. It doesn't seem possible to set the closing attribute without breaking backward compatibility. See discussion: https://github.com/python/cpython/pull/2804 -- resolution: -> rejected stage: -> resolved status: open -> closed

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Zachary Ware
Zachary Ware added the comment: It could be interesting to enable uncalled `skip` by setting a default reason of "Unconditional skip" when the argument is a function. Do note that decorating with an uncalled `skip` does actually work to skip the test currently, but the test is marked as

Object-oriented philosophy

2018-09-06 Thread Michael F. Stemper
Over the summer, I've been working on a simulation. After months of design and redesign, I finally coded it up in two days over Labor Day weekend. Works great. The core of the simulation is a set of models of three different types of electrical loads (characterized based on how they respond to

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
Naitree Zhu added the comment: Well, I personally can not think of any. I think `reason` should normally just be string. If that is ok, I'll be happy to submit a PR that restricts reason to be a string. -- ___ Python tracker

fsxNet Usenet gateway problem again

2018-09-06 Thread Michael Torrie
On 09/05/2018 02:30 PM, Chris Angelico wrote: > I don't think this was spamming the list with the same question; a > glitch somewhere in a netnews server appears to be re-posting some old > posts. I wonder why this bbs gateway in New Zealand keeps doing this. Seems like someone contacts the

[issue34542] [TLS] Update test certs to future proof settings

2018-09-06 Thread Christian Heimes
Christian Heimes added the comment: New changeset 2d3f2dc9f8376415a31a6de260ccbe6a86f2816d by Christian Heimes (Miss Islington (bot)) in branch '3.7': bpo-34542: Update test certs and keys (GH-8997) (GH-9007) https://github.com/python/cpython/commit/2d3f2dc9f8376415a31a6de260ccbe6a86f2816d

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: Is there a use-case for reason to be anything but a string? -- nosy: +steven.daprano ___ Python tracker ___

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-06 Thread Naitree Zhu
New submission from Naitree Zhu : When using @skip decorator, `reason` argument is required. But one could easily overlook that and use it like so: class SomeTest(TestCase): @skip def test_method(self): # ... The test actually passes when running with

Re: CURSES WINDOWS

2018-09-06 Thread Anssi Saari
Peter via Python-list writes: >>     from _curses import * >> ModuleNotFoundError: No module named '_curses' Oh yes, I tested in Cygwin and maybe it doesn't count? But for Windows there's a curses wheel available at https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses --

[issue32055] Reconsider comparison chaining for containment tests

2018-09-06 Thread Tal Einat
Tal Einat added the comment: Has this been discussed on python-dev? If so, what was the result? -- nosy: +taleinat ___ Python tracker ___

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2018-09-06 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Thanks for the discussion. Since I tried to join the efforts here in 2016 two years ago I was (and still am) enthusiastic, and willing to invest quite a bit of energy. Still, we have missed the 3.6 and 3.7 releases to change something about the fact

[issue17239] XML vulnerabilities in Python

2018-09-06 Thread Matej Cepl
Matej Cepl added the comment: > I suggest to: > > * close bpo-17318 as a duplicate of this issue (bpo-17239) > * close bpo-24238 > * close this issue +1 from me. -- ___ Python tracker

[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-06 Thread Pekka Klärck
Pekka Klärck added the comment: You are obviously right with how `__instancecheck__` and `__subclasscheck__` work. We'd either need something like `__rinstancecheck__` and `__rsubclasscheck__` or `isinstance` and `issubclass` needed to handle this using `types.resolve_bases`, `__origin__`,

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Tal Einat added the comment: Thanks for the suggestion and the original patch, Wouter! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue30977] reduce uuid.UUID() memory footprint

2018-09-06 Thread Tal Einat
Tal Einat added the comment: New changeset 3e2b29dccc3ca9fbc418bfa312ad655782e250f2 by Tal Einat in branch 'master': bpo-30977: make uuid.UUID use __slots__ (GH-9078) https://github.com/python/cpython/commit/3e2b29dccc3ca9fbc418bfa312ad655782e250f2 --

Re: Any SML coders able to translate this to Python?

2018-09-06 Thread Marko Rauhamaa
Chris Angelico : > The request was to translate this into Python, not to slavishly > imitate every possible semantic difference even if it won't actually > affect behaviour. I trust Steven to be able to refactor the code into something more likable. His only tripping point was the meaning of the

[issue34586] collections.ChainMap should have a get_where method

2018-09-06 Thread Zahari Dim
Zahari Dim added the comment: I believe an argument for including this functionality in the standard library is that it facilitates writing better error messages and thus better code. Some results that are returned when one searches for *python ChainMap* are: -

[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-06 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > but even then types in the typing could themselves implement > `__instancecheck__` and `__subclasscheck__` and retain the old behavior. It doesn't work that way. `__instancecheck__` and `__subclasscheck__` tweaks the behaviour of superclass (i.e. the

Debug script under pdb, how to avoid a bunch of errors caused by the exit()?

2018-09-06 Thread Jach Fong
Here the script file, test0.py: -- password = 'bad' if password == 'bad': print('bad password') exit() else: print('good password') print('something else to do') When running it under Python3.4 Windows Vista, no problem at all.

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think you have to worry about %T being used by other formatting functions. If (heaven forbid) dates were ever supported by PyUnicode_FromFormat(), there would have to be a way to switch from "normal" argument processing to argument-specific

Re: Any SML coders able to translate this to Python?

2018-09-06 Thread Chris Angelico
On Thu, Sep 6, 2018 at 7:22 PM, Antoon Pardon wrote: > On 06-09-18 10:50, Chris Angelico wrote: >> On Thu, Sep 6, 2018 at 6:44 PM, Marko Rauhamaa wrote: >>> Chris Angelico : >>> On Thu, Sep 6, 2018 at 2:29 PM, Marko Rauhamaa wrote: > Marko Rauhamaa (Marko Rauhamaa): >> Steven

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: Oh, PyUnicode_FromFormat() has %A to format as ASCII, whereas printf() already has %A but for a different meaning: a, A For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh.p+-;

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: I cannot find %T in printf() manual pages on Fedora 28 (Linux). I can find it in the strftime() documentation: %T The time in 24-hour notation (%H:%M:%S). (SU) But I don't think that it's an issue since printf() and strftime() formatters are

Re: Any SML coders able to translate this to Python?

2018-09-06 Thread Antoon Pardon
On 06-09-18 10:50, Chris Angelico wrote: > On Thu, Sep 6, 2018 at 6:44 PM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> On Thu, Sep 6, 2018 at 2:29 PM, Marko Rauhamaa wrote: Marko Rauhamaa (Marko Rauhamaa): > Steven D'Aprano : >> I have this snippet of SML code which I'm trying

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
STINNER Victor added the comment: My previous attempt to fix that issue, 7 years ago: bpo-10833 :-) See also bpo-7330 where I implemented width and precision (ex: "%5.3s") in PyUnicode_FromFormat(). -- ___ Python tracker

Re: Any SML coders able to translate this to Python?

2018-09-06 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Sep 6, 2018 at 6:44 PM, Marko Rauhamaa wrote: > And even more idiomatically, Python doesn't require a new scope just > for a new variable. So a much more idiomatic translation would be to > simply ensure that the inner variable can't collide, and then ignore > the

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +8539 stage: -> patch review ___ Python tracker ___ ___

  1   2   >