[issue32911] Doc strings no longer stored in body of AST

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 941ec210aaef517cf818b043ec28345962f78465 by Serhiy Storchaka in branch 'master': bpo-32911: Add the historical note about the magic number. (GH-7273) https://github.com/python/cpython/commit/941ec210aaef517cf818b043ec28345962f78465

[issue32911] Doc strings no longer stored in body of AST

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d6bbb57855da3f92521edd901f49705be46fb203 by Serhiy Storchaka in branch '3.7': bpo-32911: Update the historical note about the magic number. (GH-7272) https://github.com/python/cpython/commit/d6bbb57855da3f92521edd901f49705be46fb203

[issue33700] [doc] Old version picker don't understand language tags in URL

2018-05-31 Thread Julien Palard
Julien Palard added the comment: Hi Larry, bringing you in, I'd like your word on this. -- nosy: +larry ___ Python tracker ___ ___

[issue33706] Segfault in command line processing due to buffer over-read

2018-05-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core nosy: +vstinner priority: normal -> critical versions: +Python 3.8 ___ Python tracker ___

[issue33479] Document tkinter and threads

2018-05-31 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: @markroseman I'm about 50% okay with your changes. Could you create a PR against my branch so we can work out the specifics? -- ___ Python tracker

[issue33706] Segfault in command line processing due to buffer over-read

2018-05-31 Thread Christoph Gohlke
Change by Christoph Gohlke : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33677] Fix signatures of tp_clear handlers

2018-05-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Марк Коренберг
New submission from Марк Коренберг : https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event : Class implementing event objects. An event manages a flag that can be set to true with the set() method and reset to false with the clear() method. The -> wait() <- method blocks

[issue33707] Doc:

2018-05-31 Thread Марк Коренберг
Марк Коренберг added the comment: Sorry, I did not -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale

2018-05-31 Thread Ivan Pozdeev
New submission from Ivan Pozdeev : This causes test_ntpath and test_posixpath to fail in subj. Sample failure: == FAIL: test_expandvars_nonascii (__main__.NtCommonTest)

[issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale

2018-05-31 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- keywords: +patch pull_requests: +6903 stage: -> patch review ___ Python tracker ___ ___

[issue33677] Fix signatures of tp_clear handlers

2018-05-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +6902 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33677] Fix signatures of tp_clear handlers

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0fe3be03926c3468ed4c10980d1a030c8ef4e37e by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196) (GH-7269)

[issue33641] Add links to RFCs

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 55d9e865cb3b50587c17c8a7beee090c4ac8d535 by Serhiy Storchaka in branch '3.6': [3.6] bpo-33641: Convert RFC references into links. (GH-7103) (GH-7276) https://github.com/python/cpython/commit/55d9e865cb3b50587c17c8a7beee090c4ac8d535

[issue33706] Segfault in command line processing due to buffer over-read

2018-05-31 Thread Christoph Gohlke
New submission from Christoph Gohlke : When testing Python 3.7.0b5 x64 (and betas before) on Windows 10, I occasionally get segfaults when passing a program as string on the command line. The shortest command to reproduce this on my system is `python.exe -c 1` with heap detection turned on

[issue2504] Add gettext.pgettext() and variants support

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you have a use case for lpgettext() and like? -- ___ Python tracker ___ ___ Python-bugs-list

[issue33677] Fix signatures of tp_clear handlers

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset db1074244d2c12961799f6f9353ae191f59cc497 by Serhiy Storchaka in branch '2.7': [2.7] bpo-33677: Fix the signature of tp_clear handler for deque. (GH-7196). (GH-7277)

Re: Problem with OrderedDict - progress report

2018-05-31 Thread Frank Millman
"Frank Millman" wrote in message news:pemchs$r12$1...@blaine.gmane.org... So working backwards, I have solved the first problem. I am no nearer to figuring out why it fails intermittently in my live program. The message from INADA Naoki suggests that it could be inherent in CPython, but I am

[issue29272] test_logging hangs if /etc/hosts only aliases "localhost" to ::1

2018-05-31 Thread KMiNT21
KMiNT21 added the comment: The same bug for me: 3.6.5 and 3.6.4 -hangs on test_logging forever. Thanks to this report - I've commented some lines in /etc/host and after 'test_logging' passed OK! -- nosy: +KMiNT21 ___ Python tracker

[issue33641] Add links to RFCs

2018-05-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33532] test_multiprocessing_forkserver: TestIgnoreEINTR.test_ignore() fails on Travis CI

2018-05-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Did your PR fix the issue? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33707] Doc:

2018-05-31 Thread Марк Коренберг
New submission from Марк Коренберг : https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event : Class implementing event objects. An event manages a flag that can be set to true with the set() method and reset to false with the clear() method. The -> wait() <- method blocks

[issue33698] `._pth` does not allow to populate `sys.path` with empty entry

2018-05-31 Thread Vladimir Chebotarev
Vladimir Chebotarev added the comment: Unfortunately this is not true: "Blank lines and lines beginning with # are skipped." (https://docs.python.org/3/library/site.html#index-1) I'm not sure we should change this behavior as it would make huge impact on usage of `pth` files by users

[issue33698] `._pth` does not allow to populate `sys.path` with empty entry

2018-05-31 Thread Paul Moore
Paul Moore added the comment: You could add the line import sys; sys.path.insert(0, '') to a .pth file. The documentation you pointed out states that lines starting with "import" are executed... -- ___ Python tracker

EuroPython 2018: First list of accepted sessions available

2018-05-31 Thread Alexander C. S. Hendorf
We have received an amazing collection of 376 proposals. Thank you all for your contributions! Given the overwhelming quality of the proposals, we had some very difficult decisions to make. Nonetheless we are happy to announce we have published the first 120+ sessions.

[issue33712] OrderedDict can set an exception in tp_clear

2018-05-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The tp_clear handler of OrderedDict can set an exception when fail to allocate a nodes cache for an empty dict. An exception in tp_clear is not expected and caused a crash in the garbage collector. In the master branch it will cause just writing a

Why exception from os.path.exists()?

2018-05-31 Thread Marko Rauhamaa
This surprising exception can even be a security issue: >>> os.path.exists("\0") Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.6/genericpath.py", line 19, in exists os.stat(path) ValueError: embedded null byte Most other analogous

[issue33713] memoryview can set an exception in tp_clear

2018-05-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The tp_clear handler of memoryview can set an exception when fail to release the buffer. An exception in tp_clear is not expected and caused a crash in the garbage collector. In the master branch it will cause just writing a traceback to stderr (see

[issue33714] module can set an exception in tp_clear

2018-05-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The tp_clear handler of the module object calls a custom clear function if the PyModuleDef.m_clear field is set. This function can set an exception which will be leaked to the garbage collector. An exception in tp_clear is not expected and caused a

[issue33713] memoryview can set an exception in tp_clear

2018-05-31 Thread Stefan Krah
Stefan Krah added the comment: Could you please show how tp_clear() can be called when self->exports > 0? It should not happen. #33622 is a big issue with many commits. Would it be possible to extract the relevant part? -- nosy: +pitrou ___

[issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x

2018-05-31 Thread STINNER Victor
New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/58/builds/932 == FAIL: test_wait_result (test.test_multiprocessing_spawn.WithManagerTestCondition)

[issue33713] memoryview can set an exception in tp_clear

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know how to reproduce a failure in tp_clear(). I just can't prove that it never fails. Maybe it is needed a bug in the implementation of the buffer protocol in third-party extension. If it should not happen then we can just add

EuroPython 2018: First list of accepted sessions available

2018-05-31 Thread Alexander C. S. Hendorf
We have received an amazing collection of 376 proposals. Thank you all for your contributions! Given the overwhelming quality of the proposals, we had some very difficult decisions to make. Nonetheless we are happy to announce we have published the first 120+ sessions.

[RELEASE] Python 3.7.0b5 bonus beta!

2018-05-31 Thread Ned Deily
A 3.7 update: Python 3.7.0b5 is now the final beta preview of Python 3.7, the next feature release of Python. 3.7.0b4 was intended to be the final beta but, due to some unexpected compatibility issues discovered during beta testing of third-party packages, we decided to revert some changes in how

[issue33687] uu.py calls os.path.chmod which doesn't exist

2018-05-31 Thread Timo Furrer
Change by Timo Furrer : -- keywords: +patch pull_requests: +6908 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue33687] uu.py calls os.path.chmod which doesn't exist

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would be nice to add a test. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33622] Fix and improve errors handling in the garbage collector

2018-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue33712, issue33713 and issue33714 for three cases in the stdlib where an exception can be set in the tp_clear handler. This caused a crash in the garbage collector, or can be just silenced if failed at the shutdown stage. In the master branch it

[issue33687] uu.py calls os.path.chmod which doesn't exist

2018-05-31 Thread Timo Furrer
Timo Furrer added the comment: I've added a test and updated the PR. -- nosy: +tuxtimo ___ Python tracker ___ ___ Python-bugs-list

[issue33716] test_concurrent_futures.test_crash() failed on x86 Windows7 3.7

2018-05-31 Thread STINNER Victor
New submission from STINNER Victor : x86 Windows7 3.7: http://buildbot.python.org/all/#/builders/111/builds/299 test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ... 26.57s ok ... test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ...

[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-05-31 Thread Stefan Krah
Stefan Krah added the comment: How would #33627 support the theory that this is a bug in _decimal? As I read it, #33627 is in test_complex, which supports the "unrelated random" theory. -- ___ Python tracker

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Timo Furrer
Timo Furrer added the comment: It seems like it's pointing to the correct location, it's just that depending on the size of your screen the "wait" section is too far to the bottom and therefore it can't quite scroll to the heading of the wait heading so that it's on top of your screen ;)

[issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale

2018-05-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Pink Floyd: is there anybody in here?

2018-05-31 Thread Peter J. Holzer
On 2018-05-31 00:06:37 +, Steven D'Aprano wrote: > On Wed, 30 May 2018 21:53:05 +0100, Ben Bacarisse wrote: > > Rob Gaddi writes: > >> On 05/30/2018 09:34 AM, Paul Rubin wrote: > >>> I think Usenet posts are no longer getting forwarded to the mailing > >>> list, but now I wonder if this is

[issue2504] Add gettext.pgettext() and variants support

2018-05-31 Thread Cheryl Sabella
Cheryl Sabella added the comment: No, I didn't have a use case for the l* functions. I included them just as a result of applying the entire patch from 2010. I also didn't know if further discussion was needed before excluding them. -- ___

[issue33711] Could not find externals/db-* in msi.py on license generation

2018-05-31 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: ... can be built with such a glaring mistake in the script. -- ___ Python tracker ___ ___

[issue33709] test.support.FS_NONASCII returns incorrect result in Windows with non-US locale

2018-05-31 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- pull_requests: +6904 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Timo Furrer
Timo Furrer added the comment: The link to the set method is also wrong. It points to https://docs.python.org/3/library/stdtypes.html#set instead of https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event.set -- ___ Python tracker

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Timo Furrer
Timo Furrer added the comment: I'm working on a patch :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33710] Deprecate gettext.lgettext()

2018-05-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Using gettext.lgettext() is the one of two right ways of doing translation in Python 2. In Python 2, gettext.gettext() returns a raw 8-bit string as it was written in the translation file. Since different translation files can use different encodings,

[issue33600] [EASY DOC] Python 2: document that platform.linux_distribution() has been removed

2018-05-31 Thread Timo Furrer
Change by Timo Furrer : -- keywords: +patch pull_requests: +6906 stage: -> patch review ___ Python tracker ___ ___

[issue33711] Could not find externals/db-* in msi.py on license generation

2018-05-31 Thread Ivan Pozdeev
New submission from Ivan Pozdeev : c:\Users\Sasha\Documents\cpython\Tools\msi>python msi.py Traceback (most recent call last): File "msi.py", line 1372, in add_files(db) File "msi.py", line 956, in add_files generate_license() File "msi.py", line 928, in generate_license

[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-05-31 Thread Stefan Krah
Stefan Krah added the comment: On Wed, May 30, 2018 at 10:34:01PM +, STINNER Victor wrote: > Fatal Python error: Segmentation fault > Current thread 0x2b52f7326400 (most recent call first): > > Is it a bug in the _decimal module? These kinds of errors are often completely random in

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Марк Коренберг
Марк Коренберг added the comment: NO! it points to asyncio.wait() but should point to asyncio.Event.wait() -- ___ Python tracker ___

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Timo Furrer
Timo Furrer added the comment: Yes, sorry, my bad. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33447] Asynchronous lambda syntax

2018-05-31 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: Just wanted to add another use-case. In a project I'm working on, we are building a lot of graphs using code like this: ``` nodes = [ Node('node-name1', children=[...], classifier=has_foo), Node('node-name2',

[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-05-31 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 500a419a7a68c32650717b213f0f5ab0461bb16b by T. Wouters in branch '3.6': [3.6] bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (GH-5337) (#6536)

[issue33708] Doc: Asyncio's Event documentation typo.

2018-05-31 Thread Timo Furrer
Change by Timo Furrer : -- keywords: +patch pull_requests: +6905 stage: -> patch review ___ Python tracker ___ ___

[issue33668] Wrong behavior of help function on module

2018-05-31 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Adding Yury as an inspect expert. I don't think this is something urgent, we can probably postpone this to 3.7.1. -- nosy: +yselivanov ___ Python tracker

[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-05-31 Thread Stefan Krah
Stefan Krah added the comment: test_datetime passes here with nearly identical conditions as on the CI (Ubuntu 14.04, clang, same random seed): Using random seed 987845 Run tests in parallel using 4 child processes 0:00:01 load avg: 1.70 [ 1/415] test_html passed 0:00:01 load avg: 1.88 [

Re: Indented multi-line strings

2018-05-31 Thread Terry Reedy
On 5/31/2018 10:39 AM, Dan Strohl via Python-list wrote: This is of course not a problem if the *trailing* quote determines the indentation: a_multi_line_string = i''' Py- thon ''' I get the point, but it feels like it would be a pain to use, and it

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-31 Thread Eric Snow
Eric Snow added the comment: New changeset 110bc01407ac8c75545d0386577c6e17254d97d9 by Eric Snow in branch 'master': bpo-33615: Temporarily disable a test that is triggering crashes on a few buildbots. (gh-7288)

[issue33615] test__xxsubinterpreters crashed on x86 Gentoo Refleaks 3.x

2018-05-31 Thread Eric Snow
Eric Snow added the comment: New changeset 110bc01407ac8c75545d0386577c6e17254d97d9 by Eric Snow in branch 'master': bpo-33615: Temporarily disable a test that is triggering crashes on a few buildbots. (gh-7288)

Re: Why exception from os.path.exists()?

2018-05-31 Thread Terry Reedy
On 5/31/2018 8:03 AM, Marko Rauhamaa wrote: This surprising exception can even be a security issue: >>> os.path.exists("\0") Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.6/genericpath.py", line 19, in exists os.stat(path)

[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2018-05-31 Thread Timo Furrer
Change by Timo Furrer : -- nosy: +tuxtimo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33668] Wrong behavior of help function on module

2018-05-31 Thread Timo Furrer
Change by Timo Furrer : -- nosy: +tuxtimo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30618] readlink for pathlib paths

2018-05-31 Thread Timo Furrer
Change by Timo Furrer : -- nosy: +tuxtimo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33668] Wrong behavior of help function on module

2018-05-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Re: Re: The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

2018-05-31 Thread Paul St George
That's what I wanted! But, I didn't know the question because I didn't know the answer. On 30/05/2018 23:09, Karsten Hilbert wrote: On Wed, May 30, 2018 at 11:01:17PM +0200, Peter J. Holzer wrote: On 2018-05-30 22:08:45 +0200, Paul St George wrote: Ha! No, my question was clumsy. If I

Re: Sorting and spaces.

2018-05-31 Thread Peter Otten
Tobiah wrote: > I had a case today where I needed to sort two string: > > ['Awards', 'Award Winners'] > > I consulted a few sources to get a suggestion as to > what would be correct. My first idea was to throw them > through a Linux command line sort: > > Awards > Award Winners > > Then I

Re: Why exception from os.path.exists()?

2018-05-31 Thread Marko Rauhamaa
Terry Reedy : > On 5/31/2018 8:03 AM, Marko Rauhamaa wrote: >> Is the behavior a bug? Shouldn't it be: >> >> >>> os.path.exists("\0") >> False > > Please open an issue on the tracker if there is not one for this > already. issue 33721 created Marko --

[issue33711] Could not find externals/db-* in msi.py on license generation

2018-05-31 Thread Ned Deily
Change by Ned Deily : -- nosy: +steve.dower, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Problem with OrderedDict - progress report

2018-05-31 Thread Chris Angelico
On Fri, Jun 1, 2018 at 12:37 AM, Frank Millman wrote: > "Steven D'Aprano" wrote in message news:peorib$1f4$2...@blaine.gmane.org... >> >> >> On Thu, 31 May 2018 10:05:43 +0200, Frank Millman wrote: >> >> > From the interpreter session below, you will see that adding a key while >> > processing

Re: Why exception from os.path.exists()?

2018-05-31 Thread Grant Edwards
On 2018-05-31, Paul Moore wrote: > On 31 May 2018 at 15:01, Chris Angelico wrote: >> Can someone on Windows see if there are other path names that raise >> ValueError there? Windows has a whole lot more invalid characters, and >> invalid names as well. > > On Windows: > os.path.exists('\0')

[issue33668] Wrong behavior of help function on module

2018-05-31 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Hm, replacing the return with a random string, this leads to another crash: Traceback (most recent call last): File "", line 1, in File "/Users/ilevkivskyi/src/cpython/Lib/_sitebuiltins.py", line 103, in __call__ return pydoc.help(*args, **kwds)

Re: Override built in types... possible? or proposal.

2018-05-31 Thread Rob Gaddi
On 05/31/2018 07:49 AM, Dan Strohl wrote: Is it possible to override the assignment of built in types to the shorthand representations? And if not, is it a reasonable thought to consider adding? For example, right now, if I do: test = "this is a string", I get back str("this is a string").

Re: Indented multi-line strings (was: "Data blocks" syntax specification draft)

2018-05-31 Thread Chris Angelico
On Fri, Jun 1, 2018 at 12:39 AM, Dan Strohl via Python-list wrote: >> This is of course not a problem if the *trailing* quote determines the >> indentation: >> >> a_multi_line_string = i''' >>Py- >> thon >> ''' > > I get the point, but it feels like it would be a

[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-05-31 Thread Matthew Barnett
Matthew Barnett added the comment: It also raises a ValueError on Windows. For other invalid paths on Windows it returns False. -- nosy: +mrabarnett ___ Python tracker ___

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-05-31 Thread Steve Dower
Steve Dower added the comment: I need to stop working on this right now, but here's the locals layout in a normal release build in r_object: @rdi @rdip = 0x0034`655ea3d0 0034`65403f60 @rsp+0x0080 v =

[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-05-31 Thread pacujo
New submission from pacujo : os.path.exists() returns True or False for all imaginable string arguments except for one that contains NUL ("\0") (Linux). This behavior is not documented in the library. Moreover, it can easily lead to accidents if an externally supplied pathname were to

Re: Why exception from os.path.exists()?

2018-05-31 Thread Chris Angelico
On Fri, Jun 1, 2018 at 12:51 AM, MRAB wrote: > On 2018-05-31 14:38, Marko Rauhamaa wrote: >> >> Chris Angelico : >>> >>> Do you have an actual use-case where it is correct for an invalid path >>> to be treated as not existing? >> >> >> Note that os.path.exists() returns False for other types of

[issue33722] Document builtins in mock_open

2018-05-31 Thread Jay Crotts
New submission from Jay Crotts : The examples on using mock_open only include instances where objects are mocked in the REPL, so '__main__'.open is replaced. Commonly objects are mocked for use in other test modules, so builtins.open would be used instead. A note about this in the

RE: Override built in types... possible? or proposal.

2018-05-31 Thread Dan Strohl via Python-list
> > > > I am envisioning something in the header like an import statement > > where I could do; > > > > override str=my_string > > override list=my_list > > > > This would only be scoped to the current module and would not be > imported when that module was imported. > > > > Thoughts? > > > > Dan

Re: Override built in types... possible? or proposal.

2018-05-31 Thread Terry Reedy
On 5/31/2018 10:49 AM, Dan Strohl via Python-list wrote: Is it possible to override the assignment of built in types to the shorthand representations? By which I presume you mean literals and overt (non-comprehension) displays. So you wish that Python should be even more dynamic. (Some

How do I list only the methods I define in a class?

2018-05-31 Thread bruceg113355
How do I list only the methods I define in a class? For example: class Produce(): def __init__ (self): print (dir (Produce)) def apples(self): pass def peaches(self): pass def pumpkin (self): pass The print (dir(Produce)) statement

[issue32392] subprocess.run documentation does not have **kwargs

2018-05-31 Thread Tobias Kunze
Change by Tobias Kunze : -- keywords: +patch pull_requests: +6916 stage: needs patch -> patch review ___ Python tracker ___ ___

Python library to break text into words

2018-05-31 Thread beliavsky--- via Python-list
I bought some e-books in a Humble Bundle. The file names are shown below. I would like to hyphenate words within the file names, so that the first three titles are a_devils_chaplain.pdf atomic_accidents.pdf chaos_making_a_new_science.pdf Is there a Python library that uses intelligent guesses

[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-05-31 Thread Stefan Krah
Stefan Krah added the comment: A wild theory: Because of the new pervasive includes (-I/home/travis/multissl/openssl/1.1.0h/include -O3 -I/home/travis/multissl/openssl/1.1.0h/include) some module picks up a wrong header. But I just rebuilt

[issue33710] Deprecate gettext.lgettext()

2018-05-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: +1 - I'm actually surprise it's still there. ;) Given that the docs have a big red warning to avoid these in Python 3, let's start the process of removal. Don't forget to also deprecate ldgettext(), lngettext(), and ldngettext()

[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-31 Thread Paul Koning
Paul Koning added the comment: FYI, I'm the one who created this problem back in 2012. I just submitted a GDB patch for this, using PyImport_AppendInittab to define the built-in module at startup. I'm not sure how I missed this originally; perhaps the documentation was not as clear back

Re: Override built in types... possible? or proposal.

2018-05-31 Thread Steven D'Aprano
On Thu, 31 May 2018 09:51:30 -0700, Rob Gaddi wrote: > On 05/31/2018 07:49 AM, Dan Strohl wrote: >> Is it possible to override the assignment of built in types to the >> shorthand representations? And if not, is it a reasonable thought to >> consider adding? [...] > My problem with this idea

[issue33610] IDLE: Make multiple improvements to CodeContext

2018-05-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: 18. Error or bounds checking for maxlines entry. I believe this really a config dialog issue that applies to everything, but maxlines should be at least 1, with some reasonable max. In the meanwhile, we could check whether crazy entries (text, negatives,

Re: Attachments? Re: Indented multi-line strings (was: "Data blocks" syntax specification draft)

2018-05-31 Thread Abdur-Rahmaan Janhangeer
as this sig file is a common occurance, attaching the topic to the data blocks thread is not really necessary Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Fri, 1 Jun 2018, 01:49 Paul, wrote: > I have heard that attachments to messages are not allowed on this list, > which

[issue33726] Add short descriptions to PEP references in seealso

2018-05-31 Thread Andrés Delfino
New submission from Andrés Delfino : There are a couple of PEP references with no description in Simple/Compound Statements. Attached PR fixes this. -- assignee: docs@python components: Documentation messages: 318359 nosy: adelfino, docs@python priority: normal severity: normal

Re: ... (ellipsis)

2018-05-31 Thread Terry Reedy
On 5/31/2018 10:26 PM, Mike McClain wrote: I'm having understanding the use if the ellipsis. I keep reading that it is used in slices By numpy for numpy multidimensional arrays, which have their own __getitem__, which recognizes and gives meaning to ... -- Terry Jan Reedy --

Re: Python library to break text into words

2018-05-31 Thread Abdur-Rahmaan Janhangeer
Dietmar's answer is the best, piggybacking on search engines' algorithms and probably instead of a dictionary of english words, we'd need a dictionary of titles, making search much more efficient regards, Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ No need to re-invent the

[issue33727] Server.wait_closed() doesn't always wait for its transports to fihish

2018-05-31 Thread Yury Selivanov
New submission from Yury Selivanov : Server.wait_closed() currently does two checks: 1. if _sockets is None -- means that Server.close() was called 2. if self._waiters is None -- means that Server._wakeup() was called if (1) *or* (2) is true, wait_closed() just returns without waiting on

Re: Python library to break text into words

2018-05-31 Thread Abdur-Rahmaan Janhangeer
1-> search in dict, identify all words example : meaningsofoffers .. identified words : me an mean in meaning meanings so of of offer offers 2-> next filter duplicates, i.e. of above in a new list as the original list serves as chronological reference 3-> next chose the words whose lengths

[issue33726] Add short descriptions to PEP references in seealso

2018-05-31 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +6922 stage: -> patch review ___ Python tracker ___ ___

... (ellipsis)

2018-05-31 Thread Mike McClain
I'm having understanding the use if the ellipsis. I keep reading that it is used in slices but every time I use it I get 'Syntax error' in 2.7 if 'Type error' in 3.2. In python2.7: l=range(15) l[...:11] Syntax error l[3:...] Syntax error l[3:...:11] Syntax error In python3.2 it becomes 'Type

Re: version

2018-05-31 Thread Jorge Gimeno
Look at the six module On Thu, May 31, 2018, 7:57 PM Mike McClain wrote: > OK so I installed python 3.2, which is the latest available as a > package in Debian Wheezy, because I've seen so many folks say it's a > waste of time to play with Py2.7. > Immediately my python playground

  1   2   3   >