Re: SIGSEGV and SIGILL inside PyCFunction_Call

2017-07-19 Thread dieter
Anders Wegge Keller writes: > ... > I have an ongoing issue with my usenet setup. I'm that one dude who don't > want to learn perl. That means that I have to build inn from source, so I > can enable the python interpreter. That's not so bad, and the errors that > show up have

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Steven D'Aprano
On Thu, 20 Jul 2017 12:40:08 +1000, Chris Angelico wrote: > On Thu, Jul 20, 2017 at 12:12 PM, Steve D'Aprano > wrote: >> On Thu, 20 Jul 2017 08:12 am, Gregory Ewing wrote: >> >>> Chris Angelico wrote: >> [snip overly complex and complicated string implementation] >>

scandir slower than listdir

2017-07-19 Thread Torsten Bronger
Hallöchen! With a 24,000 files directory on an SSD running Ubuntu, #!/usr/bin/python3 import os, time start = time.time() list(os.listdir("/home/bronger/.saves")) print("listdir:", time.time() - start) start = time.time() list(os.scandir("/home/bronger/.saves"))

[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 65c24c846797b93d7adb72fc400f95a570f43fa9 by terryjreedy in branch '3.6': [3.6] bpo-30917: IDLE: Add config.IdleConf unittests (GH-2691) (#2753) https://github.com/python/cpython/commit/65c24c846797b93d7adb72fc400f95a570f43fa9 --

[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2828 ___ Python tracker ___ ___

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fix worked: test_idle passed in build 897. http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/897/steps/test/logs/stdio I also included the fix of PR2769 in PR2753 (3.6 backport). -- resolution: -> fixed stage: -> resolved status:

[issue30973] Regular expression "hangs" interpreter

2017-07-19 Thread T Trindad
New submission from T Trindad: The following code "hangs" the interpreter: import re re.search(r"/\*\*((?:[^*]+|\*[^/])*)\*/", """ /** Copy Constructor **/ private EvaluationContext (EvaluationContext base) {""") Changing the regex to r"/\*\*((?:[^*]|\*[^/])*)\*/" makes

[issue30940] Documentation for round() is incorrect.

2017-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The documentation should be updated before converting round() to Argument Clinic, because this update should be backported to 3.6 and 3.5, while the conversion can be made only in 3.7. -- keywords: +easy stage: -> needs patch

[issue29144] Implicit namespace packages in Python 3.6

2017-07-19 Thread Nick Coghlan
Nick Coghlan added the comment: At the Python level, the rules are simple: the first directory on sys.path that contains an __init__.py file is identified as a self-contained package. It is then up to that __init__.py file to emulate namespace package behaviour (by extending __path__) if

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Chris Angelico
On Thu, Jul 20, 2017 at 12:12 PM, Steve D'Aprano wrote: > On Thu, 20 Jul 2017 08:12 am, Gregory Ewing wrote: > >> Chris Angelico wrote: > [snip overly complex and complicated string implementation] > An accurate description, but in my own defense, I had misunderstood

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Steve D'Aprano
On Thu, 20 Jul 2017 08:12 am, Gregory Ewing wrote: > Chris Angelico wrote: [snip overly complex and complicated string implementation] > +1. We should totally do this just to troll the RUE! You're an evil, wicked man, and I love it. -- Steve “Cheer up,” they said, “things could be worse.”

Re: Users of namedtuple: do you use the _source attribute?

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 12:59:36 AM UTC-5, Terry Reedy wrote: > Yes, No. The developers of the class agree that a trailing > underscore convention would have been better. 'source_' > etc. Which, while encroaching on the "this-is-a-reserved-symbol_" convention, would relieve the current

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Steve D'Aprano
On Thu, 20 Jul 2017 01:30 am, Random832 wrote: > On Tue, Jul 18, 2017, at 22:49, Steve D'Aprano wrote: >> > What about Emoji? >> > U+1F469 WOMAN is two columns wide on its own. >> > U+1F4BB PERSONAL COMPUTER is two columns wide on its own. >> > U+200D ZERO WIDTH JOINER is zero columns wide on its

Re: Combining every pair of list items and creating a new list.

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 5:19:56 AM UTC-5, Rahul K P wrote: > You can use a simple logic and list comprehension. > > so it will be like this > > lst = [1, 2, 3, 4, 5, 6, 7, 8] > print [lst[i:i+2] for i in range(0,len(lst),2)] No no no. Anybody can write code like that! To wow a professor

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Steve D'Aprano
On Thu, 20 Jul 2017 04:34 am, Mikhail V wrote: > It is also pretty obvious that these Caps makes it harder to read in general. > (more obvious that excessive diacritics, like in French) No it isn't. -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough,

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread Louie Lu
Louie Lu added the comment: Yes, Terry's patch fixed this. -- ___ Python tracker ___ ___ Python-bugs-list

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 9f9192afbb4e45d09f0d3d717b457d157dc46398 by terryjreedy in branch 'master': bpo-30968: Fix test_get_font in IDLE's test_config. (#2769) https://github.com/python/cpython/commit/9f9192afbb4e45d09f0d3d717b457d157dc46398 --

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2827 ___ Python tracker ___ ___

[issue29403] mock's autospec's behavior on method-bound builtin functions is broken

2017-07-19 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> backport needed ___ Python tracker ___

[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-19 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Ammar! -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker ___

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Ben Finney
Random832 writes: > On Tue, Jul 18, 2017, at 19:21, Gregory Ewing wrote: > > Random832 wrote: > > > What about Emoji? > > > U+1F469 WOMAN is two columns wide on its own. > > > U+1F4BB PERSONAL COMPUTER is two columns wide on its own. > > Emoji comes from Japanese 絵文字 -

[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset ae4dca7701ca77a37aa8c956450ff8e21fe6883e by Berker Peksag (Ammar Askar) in branch '3.6': [3.6] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755)

[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset aca493b7a337338fa20395fbc2d1895cb8093826 by Berker Peksag (Ammar Askar) in branch '3.5': [3.5] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755)

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Louie, I am fixing this (I believe). -- ___ Python tracker ___ ___

[issue30333] test_multiprocessing_forkserver: poll() failed on AMD64 FreeBSD CURRENT Non-Debug 3.5

2017-07-19 Thread Kubilay Kocak
Changes by Kubilay Kocak : -- nosy: +koobs ___ Python tracker ___ ___

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Wednesday, July 19, 2017 at 5:29:23 AM UTC-5, Rhodri James wrote: > when Acorn were developing their version of extended ASCII > in the late 80s, they asked three different University > lecturers in Welsh what extra characters they needed, and > got three different answers. And who would have

[issue29403] mock's autospec's behavior on method-bound builtin functions is broken

2017-07-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset 856cbcc12f2e4cca93af5dc7ed6bcea4dd942f10 by Berker Peksag (Aaron Gallagher) in branch 'master': bpo-29403: Fix mock's broken autospec behavior on method-bound builtin functions (GH-3)

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I merged pr2754 in pr2753, the 3.6 backport of pr2691. To avoid breaking 3.6 buildbots more than one test, I will hold off merging pr2753 until a fix is available. -- ___ Python tracker

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2826 ___ Python tracker ___ ___

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Wednesday, July 19, 2017 at 1:57:47 AM UTC-5, Steven D'Aprano wrote: > On Wed, 19 Jul 2017 17:51:49 +1200, Gregory Ewing wrote: > > > Chris Angelico wrote: > >> Once you NFC or NFD normalize both strings, identical strings will > >> generally have identical codepoints... You should then be

Re: rpy2

2017-07-19 Thread Larry Martell
On Wed, Jul 19, 2017 at 6:28 PM, Dennis Lee Bieber wrote: > On Wed, 19 Jul 2017 11:15:03 -0400, Larry Martell > declaimed the following: > >> >>/usr/bin/ld: cannot find -lr_utils >> >>But I could not find how to get libr_utils. >> > > Have

[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset ed014f7e135fe021837208960237d6c37afde5be by terryjreedy (Louie Lu) in branch 'master': bpo-30917: IDLE: Fix mock_config deepcopy to read_string (#2754) https://github.com/python/cpython/commit/ed014f7e135fe021837208960237d6c37afde5be --

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 10:37:18 PM UTC-5, Steve D'Aprano wrote: > On Wed, 19 Jul 2017 10:34 am, Mikhail V wrote: > > > Ok, in this narrow context I can also agree. > > But in slightly wider context that phrase may sound almost like: > > "neither geometrical shape is better than the other as

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 7:35:13 PM UTC-5, Mikhail V wrote: > ChrisA wrote: > >On Wed, Jul 19, 2017 at 6:05 AM, Mikhail V wrote: > >> On 2017-07-18, Steve D'Aprano wrote: > > > > _Neither system is right or wrong, or better than the > > > > other._ > > > > > >

[issue30972] Event loop incorrectly inherited in child processes.

2017-07-19 Thread Elvis Pranskevichus
New submission from Elvis Pranskevichus: The attached example shows that `asyncio.get_event_loop` still returns parent process' event loop in some cases. It appears that the fix in issue #29703 was incomplete: PARENT PID: 21947, LOOP: <_UnixSelectorEventLoop running=True closed=False

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 10:24:54 PM UTC-5, Steve D'Aprano wrote: > On Wed, 19 Jul 2017 10:08 am, Ben Finney wrote: > > > Gregory Ewing writes: > > > > > The term "emoji" is becoming rather strained these days. > > > The idea of "woman" and "personal computer"

[issue30971] Improve code readability of json.tool

2017-07-19 Thread Berker Peksag
Berker Peksag added the comment: I don't think most of the changes improve readability of json.tool. Everyone has their own preferences and it's usually not enough to justify code churn. Also, we don't need to add comments when the code itself is pretty descriptive: # Output JSON with

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Gregory Ewing
Chris Angelico wrote: * Strings with all codepoints < 256 are represented as they currently are (one byte per char). There are no combining characters in the first 256 codepoints anyway. * Strings with all codepoints < 65536 and no combining characters, ditto (two bytes per char). * Strings with

[issue30971] Improve code readability of json.tool

2017-07-19 Thread R. David Murray
R. David Murray added the comment: However, our general policy is that we don't make such changes unless we are also touching the code for other reasons. So I think using this PR as a base for your feature PRs, and then committing everything together if they are accepted, would be the way to

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Gregory Ewing
Grant Edwards wrote: Maybe it was a mistaken spelling of 'fortuned'? Most likely. Interestingly, several sites claimed to be able to tell me things about it. One of them tried to find poetry related to it (didn't find any, though). Another one offered to show me how to pronounce it, and it

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 10:07:41 PM UTC-5, Steve D'Aprano wrote: > On Wed, 19 Jul 2017 12:10 am, Rustom Mody wrote: [...] > > Einstein: If you can't explain something to a six-year- > > old, you really don't understand it yourself. > > > > [...] > > Think about it: it simply is nonsense. If

[issue27099] IDLE: turn builting extensions into regular modules

2017-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Either the hard-coding in the config test will have to be changed or it will have to be replaced by something adaptive. I have not quite decided yet. Once the new tests are merged, I expect to do some followup improvements. Equal important for this issue is

[issue29144] Implicit namespace packages in Python 3.6

2017-07-19 Thread Brett Cannon
Brett Cannon added the comment: Without looking into what changed, I say Python 3.6 being more strict in what is a namespace package is reasonable and setuptools needs to be better about installing pkg_resources-using __init__.py files. -- ___

[issue30490] Allow pass an exception to the Event.set method

2017-07-19 Thread pfreixes
pfreixes added the comment: More info about why here https://github.com/python/cpython/pull/1824#issuecomment-315903808 -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue27099] IDLE: turn builting extensions into regular modules

2017-07-19 Thread Charles Wohlganger
Charles Wohlganger added the comment: Changes to master have introduced tests with hardcoded values for what extensions are expected to be loaded by IDLE. Given that this patch turn all current extensions into mainlined modules, none of them are loaded as extensions and all of the related

[issue30971] Improve code readability of json.tool

2017-07-19 Thread Daniel Himmelstein
New submission from Daniel Himmelstein: In https://github.com/python/cpython/pull/2720, I propose code changes to the json.tool command line utility. These changes are entirely non-functional and instead focus on improving code readability, style, brevity, extensibility, and maintainability.

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2017-07-19 Thread Joshua Jay Herman
Joshua Jay Herman added the comment: Was this ever merged? I'm not sure whats happening. -- ___ Python tracker ___

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Terry Reedy
On 7/19/2017 4:28 AM, Steven D'Aprano wrote: On Tue, 18 Jul 2017 10:11:39 -0400, Random832 wrote: On Fri, Jul 14, 2017, at 04:15, Marko Rauhamaa wrote: Consider, for example, a Python source code editor where you want to limit the length of the line based on the number of characters more

Re: pyserial and end-of-line specification

2017-07-19 Thread Rob Gaddi
On 07/18/2017 12:53 PM, FS wrote: Thank you for your response Andre. I had tried some code like that in the document but it did not seem to work. However ever leaving my terminal for a time the code eventually wrote out the records so apparently there is some very deep buffering going on

Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Mikhail V
Steven D'Aprano wrote: >On Wed, 19 Jul 2017 10:34 am, Mikhail V wrote: >> Ok, in this narrow context I can also agree. >> But in slightly wider context that phrase may sound almost like: >> "neither geometrical shape is better than the other as a basis >> for a wheel. If you have polygonal

Re: Best way to assert unit test cases with many conditions

2017-07-19 Thread Rob Gaddi
On 07/19/2017 03:26 AM, Ganesh Pal wrote: Yes. Just assert each thing as it needs asserting. Asserting each sub test will fail the entire test, I want the to pass the test if any the sub test passes. If the sub test fail try all cases and fail for the last one. Example : def

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread MRAB
On 2017-07-19 09:29, Marko Rauhamaa wrote: Gregory Ewing : Marko Rauhamaa wrote: * a final "v" receives a superfluous "e" ("love") It's not superfluous there, it's preventing "love" from looking like it should rhyme with "of". I'm pretty sure that wasn't the

Re: Best way to assert unit test cases with many conditions

2017-07-19 Thread Terry Reedy
On 7/19/2017 8:24 AM, Peter Otten wrote: Ganesh Pal wrote: (1) I would want my subtest to have a *Condition* based on which it that would pass my entire test if any of the sub-test passed. If I understand correctly, you want assertTrue(subtest1 or subtest2 or subtest3 or subtest4 ...)

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Thomas Jollans
On 19/07/17 04:19, Rustom Mody wrote: > On Wednesday, July 19, 2017 at 3:00:21 AM UTC+5:30, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> Let me give you one concrete example: the letter "ö". In English, it >>> is (very occasionally) used to indicate diaeresis, where a pair of >>> letters is

[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2017-07-19 Thread Yury Selivanov
Yury Selivanov added the comment: > Better than trying to detect IPv6 compatibility beforehand would probably to > recognize the error and simply ignore it. +1 -- ___ Python tracker

[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2017-07-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Better than trying to detect IPv6 compatibility beforehand would probably to recognize the error and simply ignore it. Note: errno 99 is EADDRNOTAVAIL. Something like this could work (untested): diff --git a/Lib/asyncio/base_events.py

Re: Problem in installing module "pynamical"

2017-07-19 Thread Felipe Bastos Nunes
Hi! I have no experience on that, but I may ask something that might help: 1- are you aware that it's not safe to use pip directly? It could be safer to use pip install --user package. 2- Are you able to use virtualenv? This usually let me install packages my system has problems on working out.

Re: rpy2

2017-07-19 Thread Felipe Bastos Nunes
Hey, I have no experience on it, but maybe I'm able to help. How are you tryin to install it? Pip? 2 or 3? Virtualenv? Cya! Em qua, 19 de jul de 2017 10:22, Larry Martell escreveu: > Anyone here any experience with the rpy2 package? I am having trouble > getting it to

[issue30931] Race condition in asyncore may access the wrong dispatcher

2017-07-19 Thread Nir Soffer
Nir Soffer added the comment: Adding more info after discussion in github. After polling readable/writeable dispatchers, asyncore.poll(2) receive a list of ready file descriptors, and invoke callbacks on the dispatcher objects. If a dispatchers is closed and and a new dispatcher is created,

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Chris Angelico
On Thu, Jul 20, 2017 at 1:45 AM, Marko Rauhamaa wrote: > So let's assume we will expand str to accommodate the requirements of > grapheme clusters. > > All existing code would still produce only traditional strings. The only > way to introduce the new "super code points" is by

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Marko Rauhamaa
Chris Angelico : > Now, this is a performance question, and it's not unreasonable to talk > about semantics first and let performance wait for later. But when you > consider how many ASCII-only strings Python uses internally (the names > of basically every global function and

[issue30931] Race condition in asyncore wrongly closes channel

2017-07-19 Thread Jaume
Changes by Jaume : -- pull_requests: +2823 ___ Python tracker ___ ___

SIGSEGV and SIGILL inside PyCFunction_Call

2017-07-19 Thread Anders Wegge Keller
I have an ongoing issue with my usenet setup. I'm that one dude who don't want to learn perl. That means that I have to build inn from source, so I can enable the python interpreter. That's not so bad, and the errors that show up have been something that I have been able to figure out by myself.

[issue28638] Optimize namedtuple creation

2017-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, it looks like the standard `_pickle` and `pickle` solution would work here. -- ___ Python tracker ___

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Random832
On Tue, Jul 18, 2017, at 22:49, Steve D'Aprano wrote: > > What about Emoji? > > U+1F469 WOMAN is two columns wide on its own. > > U+1F4BB PERSONAL COMPUTER is two columns wide on its own. > > U+200D ZERO WIDTH JOINER is zero columns wide on its own. > > > What about them? In a monospaced font,

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Random832
On Tue, Jul 18, 2017, at 19:21, Gregory Ewing wrote: > Random832 wrote: > > What about Emoji? > > U+1F469 WOMAN is two columns wide on its own. > > U+1F4BB PERSONAL COMPUTER is two columns wide on its own. > > The term "emoji" is becoming rather strained these days. > The idea of "woman" and

Re: rpy2

2017-07-19 Thread Larry Martell
On Wed, Jul 19, 2017 at 10:49 AM, Felipe Bastos Nunes wrote: > Hey, I have no experience on it, but maybe I'm able to help. How are you > tryin to install it? Pip? 2 or 3? Virtualenv? python2.7, using pip, on Redhat 6, R version 3.3.3: Collecting rpy2 Using cached

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Chris Angelico
On Wed, Jul 19, 2017 at 11:42 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> Perhaps we don't have the same understanding of "constant time". Or >> are you saying that you actually store and represent this as those >> arbitrary-precision integers? Every

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread Louie Lu
Louie Lu added the comment: After checking source code, I found that is my fault on the test code. After the blocker PR 2754 been merged, I'll fix this issue. -- ___ Python tracker

[issue30965] Unexpected behavior of operator "in"

2017-07-19 Thread Mihai Cara
Mihai Cara added the comment: I am sure that some time ago I read that `in` is a comparison operator but I forgot it and I was thinking that (x in y) would be equivalent to (replaced with) the return value of y.__contains__(x). -- ___ Python

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Marko Rauhamaa
Grant Edwards : > On 2017-07-19, Gregory Ewing wrote: >> Grant Edwards wrote: >>>vacuum, continuum, squush, fortuuned >> >> Fortuuned? Where did you find that? > > It was in the scowl-7.1 wordlist I had laying around: > >

[issue30965] Unexpected behavior of operator "in"

2017-07-19 Thread Mihai Cara
Mihai Cara added the comment: Thank you! It was my fault: I was not expecting `in` to be a comparison operator. -- ___ Python tracker ___

[issue30970] return-value of filecmp.dircmp.report_*

2017-07-19 Thread R. David Murray
R. David Murray added the comment: Thanks for wanting to improve Python. However, the purpose of those function is to *print* the result. They intentionally do not have return values. All of the values that you would have these functions return are accessible via attributes already.

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Grant Edwards
On 2017-07-19, Gregory Ewing wrote: > Grant Edwards wrote: >>vacuum, continuum, squush, fortuuned > > Fortuuned? Where did you find that? It was in the scowl-7.1 wordlist I had laying around: http://wordlist.aspell.net/ However, the scowl website now claims

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-07-19 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: oh, I found a mistake. - replace Py_LIMITED_API with Py_BUILD_CORE on Include/pythread.h Py_tss_t definition -- ___ Python tracker

[issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__`

2017-07-19 Thread R. David Murray
R. David Murray added the comment: I think you change is appropriate given that the "equivalent to" for the built in iterators contains the 'is' expression. However, I also think we should drop that second whole paragraph, and in the previous paragraph say "...but are :term:`iterable`...".

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-07-19 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: Nick and Erik, thank you for the comments! I merged proposal into the PR. Well, I'm interested in the hide implementation detail for TSS API (lately, I've read the python-ideas thread "PEP: Hide implementation details in the C API" which Victor opened

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Marko Rauhamaa
Chris Angelico : > Perhaps we don't have the same understanding of "constant time". Or > are you saying that you actually store and represent this as those > arbitrary-precision integers? Every character of every string has to > be a multiprecision integer? Yes, although feel

rpy2

2017-07-19 Thread Larry Martell
Anyone here any experience with the rpy2 package? I am having trouble getting it to install, and I have posted to the rpy mailing list, put a question on SO, and even emailed the author, but I have received no replies. Before I post details I wanted to see if anyone here can possibly help me. --

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Chris Angelico
On Wed, Jul 19, 2017 at 10:13 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Wed, Jul 19, 2017 at 7:53 PM, Marko Rauhamaa wrote: >>> Here's a proposal: >>> >>>* introduce a building (predefined) class Text >>> >>>* conceptually,

[issue30970] return-value of filecmp.dircmp.report_*

2017-07-19 Thread Mihály Mirk
New submission from Mihály Mirk: The functions: filecmp.dircmp.report() filecmp.dircmp.report_partial_closure() filecmp.dircmp.report_full_closure() do not have return values -- messages: 298673 nosy: Mihály Mirk priority: normal pull_requests: 2822 severity: normal status: open

[issue30576] http.server should support HTTP compression (gzip)

2017-07-19 Thread R. David Murray
R. David Murray added the comment: Getting input from python ideas is a great idea :) -- ___ Python tracker ___

Re: Best way to assert unit test cases with many conditions

2017-07-19 Thread Peter Otten
Ganesh Pal wrote: > On Tue, Jul 18, 2017 at 11:02 PM, Dan Strohl wrote: > >> >> Like this: >> >> Def test_this(self): >> For i in range(10): >> with self.subTest('test number %s) % i): >> self.assertTrue(I <= 5) >> >> With the subTest() method, if

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Jul 19, 2017 at 7:53 PM, Marko Rauhamaa wrote: >> Here's a proposal: >> >>* introduce a building (predefined) class Text >> >>* conceptually, a Text object is a sequence of "real" characters >> >>* you can access each

[issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__`

2017-07-19 Thread Antti Haapala
Changes by Antti Haapala : -- pull_requests: +2820 ___ Python tracker ___ ___

[issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__`

2017-07-19 Thread Antti Haapala
New submission from Antti Haapala: The doc reference/expressions.srt says that > For user-defined classes which do not define __contains__() but do > define __iter__(), x in y is True if some value z with x == z is > produced while iterating over y. If an exception is raised during the >

[issue28638] Optimize namedtuple creation

2017-07-19 Thread STINNER Victor
STINNER Victor added the comment: General note about this issue: while the issie title is "Optimize namedtuple creation", it would be *nice* to not only optimization the creation but also attribute access by name: http://bugs.python.org/issue28638#msg298499 Maybe we can have a very fast C

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: -> terry.reedy components: +IDLE nosy: +louielu, terry.reedy ___ Python tracker ___

[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-19 Thread STINNER Victor
STINNER Victor added the comment: Please see bpo-30968: "test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x". -- nosy: +haypo ___ Python tracker

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Tests, Windows keywords: +buildbot nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.7 ___ Python tracker

[issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x

2017-07-19 Thread STINNER Victor
New submission from STINNER Victor: The build only contains one change: commit f776eb0f0e046f2fa3a96540bb42d8cf970f6c55 bpo-30917: IDLE: Add config.IdleConf unittests (#2691) Patch by Louie Lu. http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/893/steps/test/logs/stdio

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Chris Angelico
On Wed, Jul 19, 2017 at 7:53 PM, Marko Rauhamaa wrote: > Here's a proposal: > >* introduce a building (predefined) class Text > >* conceptually, a Text object is a sequence of "real" characters > >* you can access each "real" character by its position in O(1) > >

[issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds

2017-07-19 Thread STINNER Victor
STINNER Victor added the comment: > Anyone who thinks those objects stay alive too long can submit a PR for > SimpleQueue and Pool to close them eagerly. I started with SimpleQueue for the master branch: https://github.com/python/cpython/pull/2760 --

[issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds

2017-07-19 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2819 ___ Python tracker ___ ___

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rhodri James
On 19/07/17 09:17, Steven D'Aprano wrote: On Tue, 18 Jul 2017 16:37:37 +0100, Rhodri James wrote: (For the record, one of my grandmothers would have been baffled by this conversation, and the other one would have had definite opinions on whether accents were distinct characters or not,

Re: Best way to assert unit test cases with many conditions

2017-07-19 Thread Ganesh Pal
> > Yes. Just assert each thing as it needs asserting. > > Asserting each sub test will fail the entire test, I want the to pass the test if any the sub test passes. If the sub test fail try all cases and fail for the last one. Example : def test_this(self): if Sub_test_1():

[issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace

2017-07-19 Thread Elvis Stansvik
Elvis Stansvik added the comment: So feel free to close this issue. The use case was quite marginal anyway, and we can always instruct developers to run `build_ext --inplace` when they intend to use the distribution out of the source directory (and not have inplace=1 in setup.cfg, to allow

[issue30967] Crash in PyThread_ReInitTLS() in the child process after os.fork() on CentOS 6.5 (Python 2.7.13)

2017-07-19 Thread Thomas Mortensson
Thomas Mortensson added the comment: Indeed, #29640 seems remarkably similar. Will attempt to run attached POC code. Thank you very much for your help. -- ___ Python tracker

[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-19 Thread Utkarsh Upadhyay
Utkarsh Upadhyay added the comment: So it seems that running the experiments without `-utzdata` would be an acceptable fix (assuming that there are no other interesting time-zones worthy of explicit testing)? Can I help in the resolution of this issue, since resolution of

[issue23267] multiprocessing pool.py doesn't close inqueue and outqueue pipes on termination

2017-07-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think this issue is mistaken. The reader and writer objects are closed automatically when they are destroyed (see Connection.__del__). The only thing that may lack is a way to close them more eagerly. In any case, I'm closing as a duplicate of issue

  1   2   >