[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry, I misread the traceback itself as if it's from pip. It's from html5lib being incompatible with 3.9 as per the latest release on 1.0.1 (Dec 7, 2017) . There is an issue to request new release with the fix at

[issue38729] mock.create_autospec generates incorrect signature for some decorated methods

2019-11-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: If I understand this correctly, when an autospec of a class is created the attributes themselves of the given class are autospecced. During autospec of attributes it's modelled upon __call__'s signature for the given attributes [0]. Here you are

[issue38741] Definition of multiple ']' in header configparser

2019-11-07 Thread Mark
New submission from Mark : in example header is "[i love [python] lang]" parse as "i love [python", only up to the first character ']'. now saving works correctly, but reading does not -- messages: 356225 nosy: @mark99i priority: normal severity: normal status: open title: Definition

[issue38740] Line count mis match between open() vs sys.stdin api calls

2019-11-07 Thread Thamme Gowda
Change by Thamme Gowda : Added file: https://bugs.python.org/file48702/line_break_err.txt ___ Python tracker ___ ___ Python-bugs-list

[issue38740] Line count mis match between open() vs sys.stdin api calls

2019-11-07 Thread Thamme Gowda
New submission from Thamme Gowda : I ran into a line count mismatch bug and I narrowed it down to 9 lines where the line break handling is causing an issue. Please find the attachment named line_break_err.txt to reproduce the below. $ md5sum line_break_err.txt

Questions on working with unittest.IsolatedAsyncioTestCase

2019-11-07 Thread Mond Wan
Hello all, I would like to ask for helps on working with **unittest.IsolatedAsyncioTestCase**. Q1: How to handle asyncio.CancelledError inside IsolatedAsyncioTestCase. My test is hanging up if there are futures being cancelled some how. Is there a way for me to configure

[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-11-07 Thread Gustavo
Gustavo added the comment: I was able to fix this problem quickly following these easy guide: First, you need to press the keys Win + R to open the Run dialog, there type the command msiexec /unreg and hit Enter Now, open the Run dialog again and this time, type the command msiexec

[issue38736] argparse: wrong type from get_default when type is set

2019-11-07 Thread paul j3
paul j3 added the comment: get_default just returns the default attribute as it is stored in the Action. Defaults are stored as given. During parsing the Action's default is placed in the args namespace at the start. At the end, it checks if the value in the namespace is a string that

[issue38730] 2.7 modern compiler warnings

2019-11-07 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: collections removed ABC access in 3.9. It seems you are using an older version of pip. Please update to the latest version which has the vendored html5lib package fixed. -- nosy: +xtreak ___ Python

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Travis Lazar
Travis Lazar added the comment: Forgot to include that this was built on an aarch64 (Ampere eMAG) system. -- ___ Python tracker ___

[issue38739] pyperformance html5lib cannot import Mapping (and fails)

2019-11-07 Thread Travis Lazar
New submission from Travis Lazar : When running pyperformance html5lib test, the application crashes with "ImportError: cannot import name 'Mapping' from 'collections' (/py3buildpath/lib/python3.9/collections/__init__.py)" To reproduce: 1 - Build Python from source. I produced with git

[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-07 Thread Jake Tesler
Jake Tesler added the comment: @vstinner PR created :) https://github.com/python/cpython/pull/17088 -- ___ Python tracker ___ ___

[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-07 Thread Jake Tesler
Change by Jake Tesler : -- keywords: +patch pull_requests: +16596 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17088 ___ Python tracker ___

Re: Using Makefiles in Python projects

2019-11-07 Thread Cameron Simpson
On 08Nov2019 10:30, David wrote: On Fri, 8 Nov 2019 at 09:43, Cameron Simpson wrote: [...] _help: @echo '_build: make $(py_static_bundle)' @echo '_deploy_tip: formally deploy the current tip to the dev host dev tree:' @echo '_sync_dev: rsync the

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: I heard that for debuggers, the PEP 523 is really useful. I recall a huge speedup thanks to this PEP in Jetbrain: https://blog.jetbrains.com/pycharm/2017/03/inside-the-debugger-interview-with-elizaveta-shashkova/ --

Re: Using Makefiles in Python projects

2019-11-07 Thread David
On Fri, 8 Nov 2019 at 09:43, Cameron Simpson wrote: [...] > _help: > @echo '_build: make $(py_static_bundle)' > @echo '_deploy_tip: formally deploy the current tip to the dev > host dev tree:' > @echo '_sync_dev: rsync the current working files into the

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread Brett Cannon
Brett Cannon added the comment: PEP 523 was to give user code the ability to change the eval function. While the work was motivated by our JIT work, supporting debugging was another motivating factor: https://www.python.org/dev/peps/pep-0523/#debugging. There's no C API because at the time

Re: How execute at least two python files at once when imported?

2019-11-07 Thread Cameron Simpson
On 08Nov2019 00:52, Greg Ewing wrote: Cameron Simpson wrote: Spencer's modules run unconditional stuff in addition to defining classes. That may cause trouble. It will -- because of the import lock, they won't run simultaneously in the same process. I was unsure as to how serialised this

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-11-07 Thread Guido van Rossum
Guido van Rossum added the comment: Yes, that's likely where the change should be made. I think if the *first* token encountered is either NL or COMMENT the parse should be abandoned by the tokenizer. -- ___ Python tracker

Re: Using Makefiles in Python projects

2019-11-07 Thread Cameron Simpson
On 07Nov2019 22:20, Vitaly Potyarkin wrote: What do you think of using Makefiles for automating common chores in Python projects? Like linting, type checking and testing? I do use one for some things. (Not linting, which I'll describe lower down.) I do like to use it for what make's

Re: Using Makefiles in Python projects

2019-11-07 Thread Grant Edwards
On 2019-11-07, Skip Montanaro wrote: > In short, if you have to type a command more than once, you need a > Makefile. It will save you time and serve as documentation to > yourself and others about how the various pieces of your project fit > together. Definitely. Some of the projects I work

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: Slower by percents, not in the factor of times. I guess for tests it is satisfactory. -- ___ Python tracker ___

Re: Using Makefiles in Python projects

2019-11-07 Thread Skip Montanaro
On Thu, Nov 7, 2019 at 1:24 PM Vitaly Potyarkin wrote: > > What do you think of using Makefiles for automating common chores in > Python projects? Like linting, type checking and testing? Kinda unsure why this needs to be asked (says the guy who's used Make longer than Python and nearly as long

Re: Can't run easy_install even though setuptools is installed

2019-11-07 Thread Cameron Simpson
On 07Nov2019 21:38, Chris Green wrote: I'm a bit flummoxed. I'm trying to install a Python package from pypi.org, it says it should be installed by running "easy_install onkyo-eiscp" but I just get "easy_install: command not found" when I try that. I do have setuptools installed on my system

Can't run easy_install even though setuptools is installed

2019-11-07 Thread Chris Green
I'm a bit flummoxed. I'm trying to install a Python package from pypi.org, it says it should be installed by running "easy_install onkyo-eiscp" but I just get "easy_install: command not found" when I try that. I do have setuptools installed on my system and I can see "easy_install.py" in the

[issue16576] ctypes: structure with bitfields as argument

2019-11-07 Thread Vinay Sajip
Change by Vinay Sajip : -- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.7, Python 3.2 ___ Python tracker ___ ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +16594 pull_request: https://github.com/python/cpython/pull/17084 ___ Python tracker ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +16595 pull_request: https://github.com/python/cpython/pull/17085 ___ Python tracker ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset befa032d8869e0fab4732d910f3887642879d644 by Serhiy Storchaka (Dong-hee Na) in branch 'master': bpo-22367: Add tests for fcntl.lockf(). (GH-17010) https://github.com/python/cpython/commit/befa032d8869e0fab4732d910f3887642879d644 --

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue38738. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38738] Fix formatting of True and False

2019-11-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16593 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17083 ___ Python tracker

Re: can't install http module

2019-11-07 Thread Chris Angelico
On Fri, Nov 8, 2019 at 6:34 AM Tony van der Hoff wrote: > > > > On 07/11/2019 19:00, Chris Angelico wrote: > > On Fri, Nov 8, 2019 at 5:47 AM tony van der Hoff > > wrote: > >> > >> Hi, > >> I'm attempting to install (among other things) the "http" module on my > >> debian10 box, and am

[issue38738] Fix formatting of True and False

2019-11-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR fixes some issues with True and False in the documentation: * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in

Re: can't install http module

2019-11-07 Thread Tony van der Hoff
On 07/11/2019 19:00, Chris Angelico wrote: On Fri, Nov 8, 2019 at 5:47 AM tony van der Hoff wrote: Hi, I'm attempting to install (among other things) the "http" module on my debian10 box, and am encountering the following problem: Can you link to the documentation for the package you're

Using Makefiles in Python projects

2019-11-07 Thread Vitaly Potyarkin
What do you think of using Makefiles for automating common chores in Python projects? Like linting, type checking and testing? I've come up with a reusable Makefile for automating virtual environment management in Python projects. I think it can be useful for simplifying the onboarding of new

[issue38737] StreamReaderProtocol.eof_received() should return True only for _SSLProtocolTransport

2019-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: StreamReaderProtocol is tightly coupled with builtin asyncio transports. Even worse, it is an internal class actually. If you want a code to operate with custom transports -- perhaps you need to reimplement streams for them as well. -- resolution:

Re: can't install http module

2019-11-07 Thread Chris Angelico
On Fri, Nov 8, 2019 at 5:47 AM tony van der Hoff wrote: > > Hi, > I'm attempting to install (among other things) the "http" module on my > debian10 box, and am encountering the following problem: > Can you link to the documentation for the package you're trying to install? Python already ships

can't install http module

2019-11-07 Thread tony van der Hoff
Hi, I'm attempting to install (among other things) the "http" module on my debian10 box, and am encountering the following problem: ## tony@tony-lx:~/_pycharm/pygallery$ python3 -m pip install http Collecting http   Using cached

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In some cases "a true value" and "a false value" are used in the documentation. But in most cases it is just "true" and "false". -- ___ Python tracker

[issue38737] StreamReaderProtocol.eof_received() should return True only for _SSLProtocolTransport

2019-11-07 Thread Anthony Baire
New submission from Anthony Baire : We developed an alternate asyncio TLS transport based on GnuTLS (https://pypi.org/project/aio-gnutls-transport/). In this project we want to support half-closed TLS connections (WriteTransport.write_eof()). Unfortunately StreamReaderProtocol won't

Re: psutil.boot_time() ... doesn't ?

2019-11-07 Thread Chris Angelico
On Fri, Nov 8, 2019 at 1:24 AM R.Wieser wrote: > > Chris, > > > Yes, but even if it's not recorded as a timestamp but as an > > uptime counter, that counter can be referenced against the > > current time in UTC. > > Absolutily. Though the keyword here is "can". My "could easily imagine" >

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Mark Dickinson
Mark Dickinson added the comment: [Terry] > A correct failure message, correct both as English and Python, should be > something like 'bool(x) is not True'. I see 'x is not true' as an informal > English equivalent of the full claim. I'm not clear whether you're suggesting having

RE: Syntax Suggestion: Pass Function Definition as Argument

2019-11-07 Thread David Raymond
Here is it rewritten using the proposal: ``` #Definition def myFoo (str1, str2, foo, str = " "): print( foo(str = str1), foo(str = str2) ) #Call myFoo ("hello", "world!"): str = list(str)[0].upper() + str[1:] return str ``` Are you looking for multi-line

[issue38673] REPL shows continuation prompt (...) when comment or space entered

2019-11-07 Thread Anders Lorentsen
Anders Lorentsen added the comment: As a person without much experience, it sounded like a simple enough task, but having dug a bit, I found it quite complicated. It seems to me that the interpreter loop (in the standard REPL, that you get when you start ./python, blocks for input somewhere

Re: Python 3.8 install

2019-11-07 Thread Terry Reedy
On 11/7/2019 11:59 AM, MRAB wrote: On 2019-11-07 13:52, Daniel wrote: How to install Python 3.8 on top of Python 3.6? Don't do that. If you're using Windows, you install into a separate folder, usually called Python36 for Python 3.6 and Python38 for Python 3.8. Both the Windows and macOS

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: When Python started to emulate the other languages? Who cares about what other languages do? Python uses `raise` instead of `throw`, even if `throw` is much more popular in the most used languages, only because `raise` in English has more sense. And IMHO a

Re: Syntax Suggestion: Pass Function Definition as Argument

2019-11-07 Thread Stephen Waldron
Thanks Antoon. I do suppose that it is kind of wrong to say the only way is to "reference its [the function's] name" as an argument, however the point I was trying to make was that it isn't possible to pass a function that is either not in some way previously defined or a reference to something

Re: Syntax Suggestion: Pass Function Definition as Argument

2019-11-07 Thread Stephen Waldron
Thanks Antoon. I do suppose that it is kind of wrong to say the only way is to "reference its [the function's] name" as an argument, however the point I was trying to make was that you cannot pass a function that is either not in some way previously defined or a reference to something

Re: Python 3.8 install

2019-11-07 Thread MRAB
On 2019-11-07 13:52, Daniel wrote: How to install Python 3.8 on top of Python 3.6? Don't do that. If you're using Windows, you install into a separate folder, usually called Python36 for Python 3.6 and Python38 for Python 3.8. -- https://mail.python.org/mailman/listinfo/python-list

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Julia syntax looks well thought out, so I suggest to borrow it. -- ___ Python tracker ___ ___

[issue30587] Mock with spec object does not ensure method call signatures

2019-11-07 Thread Ben Reilly
Change by Ben Reilly : -- nosy: +breilly_box ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: > See the branch here: > https://github.com/jaketesler/cpython/tree/fix-mp-native-id Can you please create a PR? -- ___ Python tracker ___

[issue36084] Threading: add builtin TID attribute to Thread objects

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: Jake created bpo-38707. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: By the way, it's still possible to access directly ts->interp if you include "pycore_pystate.h" header, which requires to define Py_BUILD_CORE_MODULE. This header is an internal header. -- ___ Python tracker

Re: return a ctypes object to C

2019-11-07 Thread Arnaud Loonstra
On 31-10-2019 15:39, Arnaud Loonstra wrote: On 31-10-2019 14:44, Thomas Jollans wrote: On 31/10/2019 14.13, Arnaud Loonstra wrote: On 30-10-2019 09:32, Arnaud Loonstra wrote: Hi all, I'm trying to wrap my head around the ctypes API. I have a C structure I wish to create in Python and then

[issue31842] pathlib: "Incorrect function" during resolve()

2019-11-07 Thread maciozo
maciozo added the comment: Same error occurs when attempting to resolve a path on an ImDisk RAM disk: >>> pathlib.Path("T:\\").resolve() Traceback (most recent call last): File "", line 1, in File "C:\Users\maciozo\AppData\Local\Continuum\miniconda3\envs\brainboxes\lib\pathlib.py",

[issue2986] difflib.SequenceMatcher not matching long sequences

2019-11-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +16592 pull_request: https://github.com/python/cpython/pull/17082 ___ Python tracker ___

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The user expects what they read in the documentation of what they learn in other programming languages. If we update the documentation their expectation will change. As for other programming languages, Bash has an option for stripping all leading tab

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread Fabio Zadrozny
Fabio Zadrozny added the comment: @Mark I don't want to change the original function code, I just want to change the code to be executed in the frame (i.e.: as breakpoints change things may be different). Changing the actual function code is a no-go since changing the real function code

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread Mark Shannon
Mark Shannon added the comment: Victor, I don't think this is a regression. `PyThreadState` is an internal opaque data structure, which means we are free to change it. That the `eval_frame` is hard to access is a feature not a bug, as it discourages misuse and enables us to remove it easily,

[issue36876] Global C variables are a problem.

2019-11-07 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: -yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38613] Optimize some set operations in dictkeys object

2019-11-07 Thread Inada Naoki
Inada Naoki added the comment: New changeset 6cbc84fb99acb33dd659d7adb29a20adbe62b74a by Inada Naoki in branch 'master': bpo-38613: Optimize set operations of dict keys. (GH-16961) https://github.com/python/cpython/commit/6cbc84fb99acb33dd659d7adb29a20adbe62b74a --

[issue38613] Optimize some set operations in dictkeys object

2019-11-07 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

Re: SSL/TLS in Python using STARTTLS and ssl/ssltelnet and telnetlib

2019-11-07 Thread Grant Edwards
On 2019-11-07, Jon Ribbens via Python-list wrote: > On 2019-11-07, Veek M wrote: >> Could someone suggest some introductory reading material that will allow >> me to use 'telnetlib' with 'ssl' or 'ssltelnet'. >> (currently using Pan since Knode is dropped on Debian) >> >> I'm trying to write

[issue38736] argparse: wrong type from get_default when type is set

2019-11-07 Thread Erik Ahlén
New submission from Erik Ahlén : The type of the object returned by get_default isn't converted to the specified type supplied to add_argument. I would expect the type to be the same. -- components: Library (Lib) files: test.py messages: 356194 nosy: Erik Ahlén priority: normal

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: Excuse me for the spam, but against make it the default behavior I have a simple consideration: what will expect a person that reads the code, that doesn't know Python? IMHO it expects that the string is *exactly* like it's written. The fact that it will be

[issue38730] 2.7 modern compiler warnings

2019-11-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 9f94e52e8d38092520a3bfb1bf1ef9cbb0836584 by Benjamin Peterson in branch '2.7': bpo-38730: Remove usage of stpncpy as it's not supported on MSVC 2008. (GH-17081)

[issue38730] 2.7 modern compiler warnings

2019-11-07 Thread Benjamin Peterson
Change by Benjamin Peterson : -- pull_requests: +16591 pull_request: https://github.com/python/cpython/pull/17081 ___ Python tracker ___

[issue38730] 2.7 modern compiler warnings

2019-11-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset f32bcf8c27f3681407707bbb029323eb340d3c4b by Benjamin Peterson in branch '2.7': [2.7] bpo-38730: Fix -Wstringop-truncation warnings. (GH-17075) https://github.com/python/cpython/commit/f32bcf8c27f3681407707bbb029323eb340d3c4b --

[issue38661] Changes to tkinter result in (unexpected) widget map call return changes wrt. 3.7

2019-11-07 Thread Juliette Monsel
Change by Juliette Monsel : -- nosy: +j-4321-i ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Syntax Suggestion: Pass Function Definition as Argument

2019-11-07 Thread Antoon Pardon
On 7/11/19 14:36, Stephen Waldron wrote: > Hi, I'm new to the group and to Python, so forgive me if I make any faux-pas > here. As I can tell, the only way to pass a function as an argument is to > reference its name as follows: > > def foo1(message): > print(message) > > def foo2(foo,

Re: psutil.boot_time() ... doesn't ?

2019-11-07 Thread R.Wieser
Chris, > Yes, but even if it's not recorded as a timestamp but as an > uptime counter, that counter can be referenced against the > current time in UTC. Absolutily. Though the keyword here is "can". My "could easily imagine" considers the other possibility. I guess I should sit down sometime

Python 3.8 install

2019-11-07 Thread Daniel
How to install Python 3.8 on top of Python 3.6? -- Este email foi escaneado pelo Avast antivírus. https://www.avast.com/antivirus -- https://mail.python.org/mailman/listinfo/python-list

Syntax Suggestion: Pass Function Definition as Argument

2019-11-07 Thread Stephen Waldron
Hi, I'm new to the group and to Python, so forgive me if I make any faux-pas here. As I can tell, the only way to pass a function as an argument is to reference its name as follows: def foo1(message): print(message) def foo2(foo, message): print("Your function says:") foo(message)

[issue38732] Adding relp support as a new logging handler

2019-11-07 Thread Vinay Sajip
Vinay Sajip added the comment: Why does this need to be in the stdlib, useful though it may be for some use cases? As I understand it, RELP is mainly for communication between rsyslog servers, not specifically/especially for client-rsyslog communication. From the PyRELP link you posted,

[issue38716] logging: rotating handlers set namer and rotator null

2019-11-07 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38735] PYTHONPYCACHEPREFIX fails when importing a module from the root ("/")

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: The bug occurs on this line: if sys.pycache_prefix is not None: if not _path_isabs(head): head = _path_join(_os.getcwd(), head) if head[1] == ':' and head[0] not in path_separators: # < HERE head = head[2:]

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-07 Thread Gregory Ewing
Oscar Benjamin wrote: In Python the original exception message plus traceback is often very informative (to a programmer!) about the problem. That's okay, exception chaining preserves the whole traceback if you want to dig down that far. Catching and reraising can mean that you end up

[issue38735] PYTHONPYCACHEPREFIX fails when importing a module from the root ("/")

2019-11-07 Thread Ned Batchelder
New submission from Ned Batchelder : On the manylinux docker images, the current directory is "/". If I create a file there and try to import it with PYTHONPYCACHEPREFIX set, I get a stack trace: $ docker run -it --init --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 bash [root@29d75403d7d1

Re: How execute at least two python files at once when imported?

2019-11-07 Thread Gregory Ewing
Cameron Simpson wrote: Spencer's modules run unconditional stuff in addition to defining classes. That may cause trouble. It will -- because of the import lock, they won't run simultaneously in the same process. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: I merged my change, I close the issue. The change is a little bit backward incompatible, so I prefer to not backport it. PyErr_Occurred() checks tstate==NULL for 9 years, there is no urgency to change it :-) It can wait for Python 3.9. --

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: In 2018 with bpo-26558, I fixed Py_FatalError() to no longer access the current exception of the current Python thread state, if the current thread doesn't not hold the GIL: commit 3a228ab17c2a9cffd1a2f15f30d6209768de20a6 Author: Victor Stinner Date: Thu

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset d12d0e7c0fe2b49c40ac4d66365147c619d6c475 by Victor Stinner in branch 'master': bpo-38733: PyErr_Occurred() caller must hold the GIL (GH-17080) https://github.com/python/cpython/commit/d12d0e7c0fe2b49c40ac4d66365147c619d6c475 --

[issue3605] Py_FatalError causes infinite loop

2019-11-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset d12d0e7c0fe2b49c40ac4d66365147c619d6c475 by Victor Stinner in branch 'master': bpo-38733: PyErr_Occurred() caller must hold the GIL (GH-17080) https://github.com/python/cpython/commit/d12d0e7c0fe2b49c40ac4d66365147c619d6c475 --

Re: SSL/TLS in Python using STARTTLS and ssl/ssltelnet and telnetlib

2019-11-07 Thread Jon Ribbens via Python-list
On 2019-11-07, Veek M wrote: > Could someone suggest some introductory reading material that will allow > me to use 'telnetlib' with 'ssl' or 'ssltelnet'. > (currently using Pan since Knode is dropped on Debian) > > I'm trying to write something that will download the NNTP headers over > TLS.

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +16589 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17080 ___ Python tracker ___

[issue3605] Py_FatalError causes infinite loop

2019-11-07 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16590 pull_request: https://github.com/python/cpython/pull/17080 ___ Python tracker ___

[issue38734] Python 3.7 and 3.8 in Windows Store do not start under git bash

2019-11-07 Thread Paul Anton Letnes
New submission from Paul Anton Letnes : Python 3.7 and 3.8 installed from the Windows Store do not start under git bash. Rather, they give some variation of this error message: bash: /c/Users/pa/AppData/Local/Microsoft/WindowsApps/python: Permission denied However, the permissions are

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-11-07 Thread Marco Sulla
Marco Sulla added the comment: Anyway there's something strange in string escaping and `inspect.cleandoc()`: >>> a = """ ... \nciao ... bello ... \ ciao ... """ >>> print(inspect.cleandoc(a)) ciao bello \ ciao >>> print("\ ciao") \ ciao I expected: >>> print(inspect.cleandoc(a))

Re: SSL/TLS in Python using STARTTLS and ssl/ssltelnet and telnetlib

2019-11-07 Thread Colin McPhail via Python-list
> On 7 Nov 2019, at 03:24, Veek M wrote: > > Could someone suggest some introductory reading material that will allow > me to use 'telnetlib' with 'ssl' or 'ssltelnet'. > (currently using Pan since Knode is dropped on Debian) > > I'm trying to write something that will download the NNTP

[issue36876] Global C variables are a problem.

2019-11-07 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 9def81aa52adc3cc89554156e40742cf17312825 by Vinay Sajip in branch 'master': bpo-36876: Moved Parser/listnode.c statics to interpreter state. (GH-16328) https://github.com/python/cpython/commit/9def81aa52adc3cc89554156e40742cf17312825 --

[issue38733] PyErr_Occurred(): tstate must be non-NULL

2019-11-07 Thread STINNER Victor
New submission from STINNER Victor : bpo-3605 modified PyErr_Occurred() to return NULL if the current Python thread state ("tstate") is NULL: commit 8e0bdfd1d473ddffaf3501768678f8a970019da8 Author: Jeffrey Yasskin Date: Thu May 13 18:31:05 2010 + Make PyErr_Occurred return NULL if

Re: psutil.boot_time() ... doesn't ?

2019-11-07 Thread R.Wieser
Dennis, > Which is probably... last file system modification time Nope. Its from a file it saves at shutdown, and which gets updated once an hour (I also thought of that one, but the once-an-hour update threw a wrench into it). > There is no way for a freshly booted system to differentiate

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Petr Viktorin
Petr Viktorin added the comment: Generally, „true“ and „false“ refer to „truthiness“, while the actual ``True`` and ``False`` literals should be capitalized. And in monospace font if possible. I think this is a good convention, but it's quite subtle, and I don't think it's explicitly

[issue38731] bad input crashes py_compile library

2019-11-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38732] Adding relp support as a new logging handler

2019-11-07 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38732] Adding relp support as a new logging handler

2019-11-07 Thread Marco
New submission from Marco : Hello, a pyrelp module was released to send messages over RELP to a RELP server, such as rsylog: https://github.com/mathias-nyman/pyrelp https://github.com/rsyslog/librelp It should be very useful the possibility to add this feature as a logging handler. A

OT language barrier, was: How execute at least two python files at once when imported?

2019-11-07 Thread Christian Gollwitzer
Am 06.11.19 um 17:34 schrieb Igor Korot: On Wed, Nov 6, 2019 at 10:22 AM Spencer Du wrote: Sorry if I haven't stated my requirements clearly. I just wanted a way to import at least two python files in parallel and I wanted to know how this can be done or a reason why its bad as stated in

[issue38731] bad input crashes py_compile library

2019-11-07 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +berker.peksag stage: -> needs patch type: crash -> behavior versions: +Python 3.9 ___ Python tracker ___

  1   2   >