[issue43435] Py_BuildValue("y#".... returns incomplete result

2021-03-08 Thread David Wood
David Wood added the comment: I have not gone to the extent of comparing the direct output against what python gets, although it appears to be incomplete. The following is my encrypt function which has been used successfully for many years in a separate c program, so I have high confidence

[issue43435] Py_BuildValue("y#".... returns incomplete result

2021-03-08 Thread Christian Heimes
Christian Heimes added the comment: What do you mean by "incomplete"? Does it return less data or invalid data? Could you please paste your implementation of encryptBlowfishCfb(), too? -- nosy: +christian.heimes ___ Python tracker

[issue43435] Py_BuildValue("y#".... returns incomplete result

2021-03-08 Thread David Wood
New submission from David Wood : I have a c function to encrypt values which returns an array of bytes. The function returns proper values outside of python. When used as a python function, the result is incomplete usually 10-20% of the time. If I add a sleep(1) call before returning from

Re: editor recommendations?

2021-03-08 Thread Russell
Cameron Simpson wrote: >>-- Emacs outshines all other editing software in approximately the same >>way that the noonday sun does the stars. It is not just bigger and >>brighter; it simply makes everything else vanish. ??? Neal Stephenson Neal Stephenson's book Cryptonomicon was the reason I

Re: How to implement logging for an imported module?

2021-03-08 Thread Richard Damon
On 3/8/21 4:16 AM, Robert Latest via Python-list wrote: > Joseph L. Casale wrote: >>> I couldn't find any information on how to implement logging in a library >>> that >>> doesn't know the name of the application that uses it. How is that done? >> That's not how it works, it is the opposite. You

[issue43285] ftplib use host from PASV response

2021-03-08 Thread confd0
confd0 added the comment: Any response here? If you need more information let me know. -- ___ Python tracker ___ ___

[issue43432] Add function `clear` to the `os` module

2021-03-08 Thread Eryk Sun
Eryk Sun added the comment: The idea of adding some kind of clear_screen() function in the os or shutil module was discussed extensively on python-ideas a few months ago: https://mail.python.org/archives/list/python-id...@python.org/thread/EWQ2BOL3WVZAU2V2MT3HLXN3AEBHANNZ

[issue43431] Subprocess timeout causes output to be returned as bytes in text mode

2021-03-08 Thread Eryk Sun
Eryk Sun added the comment: communicate() is incomplete, so decoding the output may fail. For example, say the encoding is UTF-8, and the last multibyte character sequence (2-4 bytes) is incomplete. Maybe communicate() should always set `stdout_bytes` and `stderr_bytes` attributes on the

[issue43432] Add function `clear` to the `os` module

2021-03-08 Thread parsa mpsh
Change by parsa mpsh : -- keywords: +patch pull_requests: +23550 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24784 ___ Python tracker ___

[issue43434] sqlite3.Connection(...) bypasses 'sqlite3.connect' audit hooks

2021-03-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch Added file: https://bugs.python.org/file49858/patch.diff ___ Python tracker ___

[issue43434] sqlite3.Connection(...) bypasses 'sqlite3.connect' audit hooks

2021-03-08 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : The module level connect method is guarded by PySys_Audit(), but sqlite3.Connection.__init__() is not. It is possible to bypass the module level connect() method simply by creating a new sqlite3.Connection object directly. Easily fixed by either

[issue43433] xmlrpc.client ignores query in URI ("?action=xmlrpc2") since python-3.9

2021-03-08 Thread OndrejPtak
Change by OndrejPtak : -- title: xmlrpc.client ignores query in URI ("?action=xmlrpc2") from python-3.9 -> xmlrpc.client ignores query in URI ("?action=xmlrpc2") since python-3.9 ___ Python tracker

[issue43433] xmlrpc.client ignores query in URI ("?action=xmlrpc2") from python-3.9

2021-03-08 Thread OndrejPtak
New submission from OndrejPtak : xmlrpc.client proxy behaviour changed and broke tools depending on URI containing query part. Last working version: https://github.com/python/cpython/blob/3.8/Lib/xmlrpc/client.py#L1417 Changed behaviour here:

[issue43432] Add function `clear` to the `os` module

2021-03-08 Thread parsa mpsh
New submission from parsa mpsh : I wanna add a new function named `clear` to the os module. This function runs the `clear` command in the os. but this function checks that is os windows, if yes, runs `cls`. I'm working on my patch. -- components: Library (Lib) messages: 388262 nosy:

[issue43353] Document that logging.getLevelName() can return a numeric value.

2021-03-08 Thread miss-islington
miss-islington added the comment: New changeset bbba28212ce0f58096a4043f32442c6e727b74fc by Mariusz Felisiak in branch 'master': bpo-43353: Document that logging.getLevelName() accepts string representation of logging level. (GH-24693)

Re: Choosable dependency

2021-03-08 Thread Manfred Lotz
On Sun, 7 Mar 2021 20:38:30 -0800 Dan Stromberg wrote: > I sometimes do things like: > > try: > import rtoml as toml > except ImportError: > import toml > Also a possibility. Thanks. > ...but I don't like it very much, because it tends to confuse static > analyzers like pyflakes and

[issue43420] Optimize rational arithmetics

2021-03-08 Thread Sergey B Kirpichev
Sergey B Kirpichev added the comment: On Sun, Mar 07, 2021 at 12:16:36PM +, Mark Dickinson wrote: > but not the "incompatible denominators" part. :-) The typical use there is > that those fractions have been converted from floats But there is no limits to use Fraction's for input, e.g.

Re: Choosable dependency

2021-03-08 Thread Thomas Jollans
On 06/03/2021 12:00, Manfred Lotz wrote: Let us say I have a package which reads a TOML file. I want to give the user of my package the choice to decide if he wants to use the toml, tomlkit or rtoml package. So, in case the user chose to use rtoml then there should be an import only for rtoml,

Re: editor recommendations?

2021-03-08 Thread Chris Green
Cameron Simpson wrote: > On 03Mar2021 10:00, Lele Gaifax wrote: > >Cameron Simpson writes: > >> My fingers know vim. Some others' fingers know emacs. > > > >Emacs has also an Evil[1] mode, that mimics some vi/vim features. > > Whenever I've tries emulate-vi modes they tend to lack some coner

Re: How to implement logging for an imported module?

2021-03-08 Thread Robert Latest via Python-list
Joseph L. Casale wrote: >> I couldn't find any information on how to implement logging in a library that >> doesn't know the name of the application that uses it. How is that done? > > That's not how it works, it is the opposite. You need to know the name of its > logger, and since you imported

gTTS in python

2021-03-08 Thread tommy yama
Hi, Anyone might be familiar with gTTS ? https://pypi.org/project/gTTS/ Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: neonumeric - C++ arbitrary precision arithmetic library

2021-03-08 Thread Mirko via Python-list
Am 07.03.2021 um 21:52 schrieb Avi Gross via Python-list: > The precedence example used below made a strange assumption that the > imaginary program would not be told up-front what computer language it was > being asked to convert from. That is not the scenario being discussed as we > have

[issue43332] Make http.client._tunnel send one byte string over the network

2021-03-08 Thread miss-islington
miss-islington added the comment: New changeset c6e7cf1ee09c88d35e6703c33a61eca7b9db54f3 by Miss Islington (bot) in branch '3.9': bpo-43332: Buffer proxy connection setup packets before sending. (GH-24780) https://github.com/python/cpython/commit/c6e7cf1ee09c88d35e6703c33a61eca7b9db54f3

<    1   2