Re: C Python extension to export an Function

2016-09-01 Thread Christian Gollwitzer
Am 01.09.16 um 14:30 schrieb Ganesh Pal: On Thu, Sep 1, 2016 at 12:32 PM, dieter wrote: Ganesh Pal writes: Iam pretty new to C Python extension , I was able to export few simple modules to python and it look like the cool thing to do ... Maybe,

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2016-09-01 Thread STINNER Victor
STINNER Victor added the comment: @Nathaniel, Antoine: last ping before timeout :-p -- ___ Python tracker ___

Re: C Python extension to export an Function

2016-09-01 Thread Stefan Behnel
Ganesh Pal schrieb am 01.09.2016 um 14:30: > On Thu, Sep 1, 2016 at 12:32 PM, dieter wrote: >> Ganesh Pal writes: >>> Iam pretty new to C Python extension , I was able to export few simple >>> modules to python and it look like the cool thing to do ... >> >> Maybe, it is a good idea to have a look

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-01 Thread kevinconway
kevinconway added the comment: Added a comment to the .accept() loop with a reference to the issue. -- Added file: http://bugs.python.org/file44321/multi-accept-3.patch ___ Python tracker

[issue27364] Deprecate invalid unicode escape sequences

2016-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think "invalid escape sequence '\?'" would look cleaner than "invalid escape sequence '?'". -- ___ Python tracker

[issue27364] Deprecate invalid unicode escape sequences

2016-09-01 Thread Emanuel Barry
Emanuel Barry added the comment: Ping. I'd like to get this merged in time for 3.6. Is there anything I can do to speed up the review? Since the change itself is very straightforward, I think this would make sense to merge it now and then fix the invalid escapes that are found during the beta

Re: C Python extension to export an Function

2016-09-01 Thread Ganesh Pal
On Thu, Sep 1, 2016 at 12:32 PM, dieter wrote: > Ganesh Pal writes: > > > Iam pretty new to C Python extension , I was able to export few simple > > modules to python and it look like the cool thing to do ... > > Maybe, it is a good idea to have a look

[issue27928] Add hashlib.scrypt

2016-09-01 Thread Christian Heimes
New submission from Christian Heimes: OpenSSL 1.1 has EVP_PBE_scrypt(). hashlib.scrypt() is a low-hanging fruit for Python 3.6. I have a working patch with some tests. I need to write more tests and documentation: https://github.com/tiran/cpython/commits/feature/openssl110_scrypt --

Re: Issues with "twistd" in Twisted 16.4.0

2016-09-01 Thread juraseg
Also, I've tried to find anything in Twisted bug tracker, but I can't find my way in there. -- https://mail.python.org/mailman/listinfo/python-list

Issues with "twistd" in Twisted 16.4.0

2016-09-01 Thread juraseg
Hi all I couldn't find Twisted-specific group, so posting here. Recently Twisted 16.4.0 got released. Yesterday I've tried to upgrade it for my apps and got an error. I've created simple example, which demonstrates it. File service.tac: # You can run

attrs 16.1.0

2016-09-01 Thread Hynek Schlawack
I’m happy to announce that attrs 16.1.0 hit PyPI: https://pypi.org/project/attrs/ attrs is the Python package that will bring back the joy of writing classes by relieving you from the drudgery of implementing object protocols (aka dunder methods). Its main goal is to help you to write concise

[issue27919] Deprecate and remove extra_path distribution kwarg

2016-09-01 Thread Nick Coghlan
Nick Coghlan added the comment: I think there are two time frames to look at here: 1. How do we make it easier for folks to work with existing packages like the newrelic one? For that, it may make sense for at least setuptools to override extra_path when using installation targets other then

[issue27921] f-strings: do not allow backslashes

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

[issue27691] X509 cert with GEN_RID subject alt name causes SytemError

2016-09-01 Thread Christian Heimes
Christian Heimes added the comment: A GEN_RID is an OID plus some opaque data. It's up to an application to understand an OID and interpret its data. The value of a GEN_RID can be as simple as an int or UTF-8 strings or as complex as a nested ASN.1 struct for Kerberos principals. I have

Re: Variables visibility for methods

2016-09-01 Thread juraseg
среда, 31 августа 2016 г., 14:09:16 UTC+7 пользователь ast написал: > Hello > > I made few experiments about variables visibility > for methods. > > class MyClass: > a = 1 > def test(self): > print(a) > > obj = MyClass() > obj.test() > > Traceback (most recent call last): >

how to set paramiko to use ssh version 1?

2016-09-01 Thread meInvent bbird
how to set paramiko to use ssh version 1? -- https://mail.python.org/mailman/listinfo/python-list

[issue27866] ssl: get list of enabled ciphers

2016-09-01 Thread Christian Heimes
Christian Heimes added the comment: KEA stands for key exchange algorithm. -- ___ Python tracker ___ ___

[issue27927] argparse: default propagation of formatter_class from ArgumentParser() to SubParsers

2016-09-01 Thread Benjamin Giesers
New submission from Benjamin Giesers: It would be nice to propagate the formatter_class defined in argparse.ArgumentParser() to added SubParsers by default. Currently one has to define the formatter_class for each subparser again and again. Example: parser =

[issue27866] ssl: get list of enabled ciphers

2016-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: What does "kea" mean? Key exchange? -- nosy: +pitrou ___ Python tracker ___

[issue27926] ctypes is too slow to convert a Python list to a C array

2016-09-01 Thread Tom Cornebize
New submission from Tom Cornebize: It is much faster to construct a Python array from the list and then cast this array, rather than using the "standard" constructor. See attached file to compare the performances. This issue was previously asked on Stackoverflow:

[issue27691] X509 cert with GEN_RID subject alt name causes SytemError

2016-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't comment on this, as I don't even know what a "registered id" is, sorry :-/ -- ___ Python tracker ___

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Christian, thanks a lot for doing this! Do you plan to change the SSLContext constructor and make the protocol argument optional? It sounds like that would be a logical followup to the OpenSSL API changes. -- ___

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-01 Thread Martin Panter
Martin Panter added the comment: Thanks for the patches. I left you some comments in the code review. I expect there would be more bits of the docs that need fixing. Doc/library/functions.rst definitely; the tutorial is worth checking too. There may also be example code floating around using

[issue27376] Add mock_import method to mock module

2016-09-01 Thread Michael Foord
Michael Foord added the comment: Before you spend any more time on this, my current thinking is that this is a bit too specialised to belong in the standard library. I'll wait and see if a preponderance of core devs and other users disagree with me before I close this though. --

[issue23591] enum: Add Flags and IntFlags

2016-09-01 Thread Vedran Čačić
Vedran Čačić added the comment: Sure, errors should never pass silently. This function shouldn't be called with nonpositive arguments. And there is no highbit of 0 (and there are infinitely many of negative numbers;). ValueError is probably best - though IndexError can also be argued for,

[issue27376] Add mock_import method to mock module

2016-09-01 Thread Michael Foord
Michael Foord added the comment: It's not a use case I've specifically had but I can see its use. I'm uncertain of whether that means it belongs in the module or not. Let me see if I can get some more eyes on this bug. -- ___ Python tracker

[issue23591] enum: Add Flags and IntFlags

2016-09-01 Thread STINNER Victor
STINNER Victor added the comment: As noticed by veky on the review, _high_bit() is slow and can be optimized using int.bit_length(). Attached bit_length.patch implements this. _high_bit(0) returns -1. Maybe an exception must be raised if the argument is < 1? (also fail for negative number)

[issue27376] Add mock_import method to mock module

2016-09-01 Thread Eyal Posener
Eyal Posener added the comment: Thanks for the review, Michael. About the use case: I use it for a process with loads code and inspect it's classes and methods. When I run this process, not always I have all the dependencies of the inspected code, so I found myself mocking all those packages

[issue27376] Add mock_import method to mock module

2016-09-01 Thread Michael Foord
Michael Foord added the comment: Is this for mocking out runtime dependencies that aren't available at test time? It seems like a good way of masking bugs! I'd be happier with a (or at least an option) to specify the imports that should be mocked. The use case should be mentioned in the docs.

[issue27376] Add mock_import method to mock module

2016-09-01 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker ___

[issue27925] Nicer interface to convert hashlib digests to int

2016-09-01 Thread Steven D'Aprano
New submission from Steven D'Aprano: hashlib digests should have a nicer interface to allow conversion to ints. Currently we write int(x.hexdigest(), 16) which is less than obvious and easy to get wrong. It would be nice to be able to just say int(x) (that's my strong preference) or

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-09-01 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, you do this "It's going to be freed in the dealloc method unless your alter that part too". If this is done I admit this is more clean. Patch LGTM. -- ___ Python tracker

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Xiang what do you think about changing the isolation_levels list to > begin_statements list This is interesting suggestion. Indeed, this simplifies the code. Thanks Aviv. -- Added file: http://bugs.python.org/file44318/issue27881_v4.patch

Re: The Joys Of Data-Driven Programming

2016-09-01 Thread Gregory Ewing
Paul Moore wrote: Is there any "make replacement" out there that focuses more on named sets of actions (maybe with prerequisite/successor type interdependencies), and less on building file dependency graphs? Possibly Gradle might qualify. I only have a hazy understanding of it (basically just

Re: What's the best way to minimize the need of run time checks?

2016-09-01 Thread Chris Angelico
On Thu, Sep 1, 2016 at 5:12 PM, Gregory Ewing wrote: > Chris Angelico wrote: > >> You might have won the 100m dash, except that we couldn't verify your >> velocity of locomotion without a... run time check. Badumtish. > > > All is not lost. You just need to devise a

Re: What's the best way to minimize the need of run time checks?

2016-09-01 Thread Gregory Ewing
Chris Angelico wrote: You might have won the 100m dash, except that we couldn't verify your velocity of locomotion without a... run time check. Badumtish. All is not lost. You just need to devise a type system capable of proving that his time is faster than any other runner in all possible

Re: [OT] Altair

2016-09-01 Thread Gregory Ewing
Grant Edwards wrote: The file containing the list of coordinates generated by a CAD program for holes in a circuit board is still often referred to as a "drill tape". Yep, and we talk about "core" memory, use a "tape archive" program to produce compressed files, and have "drives" with no

[issue27918] Running test suites without gui but still having windows flash

2016-09-01 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file44315/issue27918.patch ___ Python tracker ___

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-01 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file44317/pep467_doc_changes.patch ___ Python tracker ___

[issue27923] PEP 467 -- Minor API improvements for binary sequences

2016-09-01 Thread Martin Panter
Martin Panter added the comment: Here is what I did. (You could probably do this yourself, but never mind :) hg pull -r{default,2.7,3.5} hg update default # Update to the latest public revision hg import --no-commit "$(xclip -o)" # Apply your patch on top hg diff -p > pep467.patch # Make a

Re: C Python extension to export an Function

2016-09-01 Thread dieter
Ganesh Pal writes: > Iam pretty new to C Python extension , I was able to export few simple > modules to python and it look like the cool thing to do ... Maybe, it is a good idea to have a look at "cython". "cython" is a compiler. It translates Python code enhanced with

[issue27918] Running test suites without gui but still having windows flash

2016-09-01 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file44314/issue27918.patch ___ Python tracker ___

Re: [OT] Altair

2016-09-01 Thread Gregory Ewing
Christopher Reimer wrote: The first time I came across a paper tape reader when I visited the university as a teenager in 1984. A CNC machine read the paper tape to drill six holes in a piece of metal. I think that would have just been called NC (Numerical Control). CNC (Computer Numerical

C Python extension to export an Function

2016-09-01 Thread Ganesh Pal
Hi Team, Iam on python 2.7 and Linux. Iam pretty new to C Python extension , I was able to export few simple modules to python and it look like the cool thing to do , but Iam stuck for with a problem now , Iam not able to figure out how to export fun_addr_from_addr() to Python. I would need

<    1   2