Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#59886 closed defect (fixed)

Consider re-enabling HAVE_POLL in python

Reported by: grimreaper (Eitan Adler) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: python python36 python37

Description

In https://trac.macports.org/ticket/18376 we disabled poll(2) for python due to bugs in apple's implementation. As far as I could tell:

1) Poll is no longer disabled in any fix file in modern mac versions https://opensource.apple.com/source/python/python-109.200.2/2.7/fix/ 2) The buggy version of poll was fixed ∴./a.out poll() works ∴sw_vers ProductName: Mac OS X ProductVersion: 10.14.6 BuildVersion: 18G2022

3) and has worked since at least 10.12.2: https://github.com/curl/curl/issues/1057#issuecomment-271866997

Further some python software explicitly looks for "PollSelector" instead of relying on the default.

Change History (3)

comment:1 Changed 5 years ago by reneeotten (Renee Otten)

Please check the recent updates of the Python ports where Joshua only disabled poll for 10.8 and older. I’ve made the same change a few days also in Python 3.8. So I think this should already work for as you’d like.

Version 0, edited 5 years ago by reneeotten (Renee Otten) (next)

comment:2 in reply to:  description Changed 5 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Replying to grimreaper:

1) Poll is no longer disabled in any fix file in modern mac versions https://opensource.apple.com/source/python/python-109.200.2/2.7/fix/

And yet, on 10.14:

% /usr/bin/python
Python 2.7.16 (default, Oct 16 2019, 00:34:56) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import select
>>> select.poll
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'poll'

But as Renee said, this is already enabled in MacPorts python on OS versions where it works properly:

% /opt/local/bin/python3.7
Python 3.7.6 (default, Dec 21 2019, 22:11:17) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import select
>>> select.poll
<built-in function poll>

comment:3 Changed 5 years ago by grimreaper (Eitan Adler)

My apologies for the false report: I had last tested a few weeks ago and only recently filed the ticket. Belated thanks for the fixes.

Note: See TracTickets for help on using tickets.