Commit Graph

4 Commits

Author SHA1 Message Date
Daniel Watkins
258b9fb821 Add IOBase to types fcntl will accept as files (#1556)
* Remove unused typing import from stdlib/3/fcntl.pyi

* Add IOBase to types fcntl will accept as files

Anything that implements a fileno() method is acceptable (per
https://github.com/python/cpython/blob/master/Objects/fileobject.c#L168-L173),
and IOBase fits the bill.

Fixes #1548.
2017-08-28 21:29:57 -07:00
Guido van Rossum
bf501353a0 Hopeful fix for fcntl stubs -- change return values back to Any. 2016-03-22 12:21:17 -07:00
Jakub Stasiak
7f9276c87c Improve Python 3 fcntl stub
This patch:

* Adds some constants that although undocumented are exposed by the
  module
* Modifies the signature of fcntl() to match reality
* Adds missing function stubs
* Modifies few existing constant declarations to match the repository
  conventions

I believe the stub is complete now (and if it's not there isn't much
missing).
2016-03-17 02:43:18 +01:00
Guido van Rossum
8c2118bace Move contents of builtins/* to stdlib/*. This simplifies finding stubs. 2016-01-12 12:53:18 -08:00