17
0
Files
python-typeshed/python-typeshed.spec

81 lines
2.3 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-typeshed
#
- Update to version 0.0.1+git.20200310.5162c536: * Make attributes of inspect.ArgSpec optional in Python 3 (#3838) * Make PathMatcher correctly exclude paths on windows / any OS without / seperators (#3837) * email.mime: add policy arguments (#3827) * select: various fixes (#3833) * os: fix platform availability (#3832) * Have datetime.{date,datetime} define __new__ instead of __init__. (#3829) * configparser: add undocumented parameter to SectionProxy.get (#3826) * asyncio: add arguments to subprocess_shell (#3825) * zipfile.ZipFile: fix fp, extract (#3828) * Add parser stubs (#3822) * stdlib/3/ast: add visit_* methods to NodeVisitor (#3796) * Update imghdr's what() to broadly accept readable binaries instead of BinaryIO (#3811) * statistics: fix median_grouped, NormalDist.samples (#3818) * argparse: allow passing a callable to ArgumentParser (#3821) * asyncore: various fixes (#3820) * textwrap: various fixes (#3819) * pdb: various fixes (#3817) * builtins: add mod to various power functions (#3816) * imghdr: h can be None (#3815) * string: various fixes (#3814) * urllib: various fixes (#3813) * bring back attribute types in warnings.WarningMessage (#3810) * Add six.moves.collections_abc. (#3812) * Improve an annotation in tornado stubs (#3809) * Fix stubs for pymysql (#3781) * Make `frozenset` covariant (#3808) * Mark some obviously incomplete stubs as incomplete (#3807) * Add venv module stub (#3783) * Fix some issues in cryptography (#3802) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typeshed?expand=0&rev=13
2020-03-11 12:20:59 +00:00
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define modname typeshed
Name: python-typeshed
Version: 0.0.1+git.20200312.b44cd294
Release: 0
Summary: Static type information for python modules
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/python/typeshed
Source0: %{modname}-%{version}.tar.xz
Source1: python-typeshed-rpmlintrc
BuildRequires: fdupes
# For tests
BuildRequires: mypy
BuildRequires: python-rpm-macros
BuildRequires: python3-base
BuildRequires: python3-flake8
BuildRequires: python3-flake8-bugbear
Accepting request 676202 from home:mcepl:branches:devel:languages:python - Update to version 0.0.1+git.1550076324.0989d950: * Fix groupby with key=None (#2794) * root_path cannot be None (#2792) * Added `Optional[]` around the `itertools.groupby()` `key` attribute to allow `None` to pass the type (#2790) * Fix Flask.config annotation (#2787) * Add stubs for HTTP Handler classes in py2/urllib2 & py3/urllib.request (#2710) * Make AsyncGenerator.aclose() properly return Awaitable[None] (#2786) * Add type hints for orjson (#2747) * Some small tweaks to Werkzeug stubs: (#2784) * Make `NamedTuple` accept `Text` names (#2762) * decorators.pyi: Add overload to option() (#2671) * __init__.pyi: Add __getitem__() to stat_result() (#2753) * Support *contiguous attributes of memoryview. (#2755) * Use a more accurate type for jwt.decode (#2765) * Fix signature of asyncio.create_server. (#2763) * Improve the stubs in charset.pyi under python3. (#2768) * requests.auth.AuthBase.__call__ deals with PreparedRequest. (#2759) * Support the errors arg in codecs factory functions. (#2752) * gflags: Add DEFINE_multi_enum. (#2783) * Add types to some cross-platform functions in the platform library (#2781) * Make SyntaxError.offset be optional (again) (#2782) * Update models.pyi (#2780) * Update stubgen link and add a bit more info (#2779) * Add hidden and deprecated click.Command options (#2778) * Add type annotation for collections.deque.__iadd__ (#2774) * pkg_resources: fix stub for get_metadata_lines (#2776) * pkg_resources Add PKG_INFO str attribute for Distribution class (#2775) * Create stubs for Flask (#2740) * builtins.pyi: Update __iadd__() and imul() in class list (#2754) * Fix six.raise_from value type (#2746) * Add SSLCertVerificationError fields (#2745) * logging: inherit TimedRotatingFileHandler from Handler (#2738) * Add missing explicit Optional to stubs for the xml.etree package. (#2734) * Fix `logging.getLevelName()` type hints (#2730) * add back StopIteration.value in Python 3 (#2744) * As of Python 3.6 dump_stats method allows PathLike object to be passed. (#2741) * Make metavar in argparse be Optional (#2739) * Fix type of indent in JSONEncoder (#2737) * Make ZipFile.NameToInfo use Text as the key type (#2736) * Fix the type of ord on python 2 (#2735) * Use a more accurate type for predicates in itertools (#2732) * Add SSLCertVerificationError for 3.7+ (#2729) * Update sqlite3 types to include extensions (#2728) * Use overlapped signatures of _winapi functions (#2723) * Fix unittest.TestCase assert methods' argument names (#2724) * Add stubs to classes in zipfile to better enable subclassing (#2707) * LoggerAdapter.log argument lvl -> level (#2722) * Sync attr stubs from attrs github repo (#2720) * Fixing type for asyncio.StreamWriter reader init parameter (#2719) * Make appropriate ast methods generic (#2715) * Add missing `currentframe` to `logging` module (#2712) * Merge Python 2 and 3 builtins.pyi (#2533) * Complete unittest.TextTestResult stubs (#2700) * Add missing attributes of type (#2544) * socket: Some more address typing (#2695) * Set correct type for _subparsersaction.choices (#2702) * Make mypy aware of IMapUnorderedIterator (#2701) * loop argument to asyncio.ensure_future is Optional (#2708) * Add stubs for six.ensure_{binary,str,text} functions (#2704) * Add Str.kind field to typed_ast stubs (#2699) * Add members marker and unsafe_name to pkg_resources.Requirement (#2693) * Add stubs for tabulate (#2384) * bytes/bytearray.startswith fixes (#2696) * Add missing ENOTSUP alias to errno (#2692) * Add pynamodb.models.Model.get_attribute and narrow down the type (#2689) * Logging (#2687) * macpath, os/path, posixpath and ntpath should basically be the same files (#2637) * Fix typo for `Message.add_attachment` in message.pyi (#2697) * Move posix.stat_result to os.stat_result on python 3 (#2683) * Task.current_task() and Task.all_tasks() have an optional loop parameter (#2690) * urllib2: timeout: int -> Optional[float] (#2685) * Fix signature of ConfigParser's dict_type argument (#2684) * Add get_loop() to asyncio.Future [Python 3.7] (#2680) * Add contextlib.nullcontext [Python 3.7]. (#2677) * Fix property annotation in `third_party/2and3/boto/connection.pyi` (#2675) * decimal.pyi: Add overload for Decimal.__round__() (#2674) * Fix signature of TypedDict has_key() (#2672) * Add 'Literal[...]' to typing_extension stubs (#2664) * Add mypy fallback class for TypedDict methods to mypy_extensions (#2670) * Guidelines for incomplete stubs (#2661) * Tweak how ast.pyi imports typing (#2668) * ast.pyi: Fix return type of generic_visit() (#2667) * [protobuf] add deterministc option (#2666) * Replace Loader with PEP 451 _Loader protocol in _importlib_modulespec.pyi annotations. (#2626) * builtins.pyi: Return complex from __(r)pow__() (#2662) * Make contribution guidelines state when to use (and not use) 'Any' (#2540) * Reference black, split long functions (#2651) * itertools.pyi: Allow omitting repeat argument in Python 3 (#2659) * Stop inheriting Sized in collection ABCs (#2658) * Revert "Move Sized earlier in the bases of Sequence (#2602)" (#2657) * Properly type the ToJsonString method of time well known types in google protobuf (#2656) * decorators.pyi: Add Any angument to Callable[] (#2654) * Revert "fix list concatenation (#2404)" (#2653) * Re-export pyexpat instead of using check_consistency (#2649) * staticmethod and classmethod can wrap any callable (#2650) * Unicode fixes for url2pathname() and pathname2url() (#2555) * Fix handling of logging args (#2635) * threading.pyi: Add currentThread for all versions (#2647) * [gflags] add known_only arg to __call__ (#2646) * __init__.pyi: Fix dump() (#2640) * yaml: Add __version__ attribute (#2636) * types.CodeType.co_filename isn't Optional. (#2639) * Improve overloads of parse_args() -- it never returns None (#2643) * Change argument type for xml.etree.ElementTree.iselement() to object (#2642) * Add stubs for the faulthandler stdlib module (#2627) * Add posix attributes for Python 3 (#2631) * Fix return type of datetime.datetime.dst (#2634) * Add __getnewargs__ to float, int, bool, str, bytes, unicode (#2632) * Added cyaml.pyi (#2613) * zipfile.ZipInfo.__init__ is the same on 2/3 (#2628) * Remove unneeded ignores (#2624) * sudo is not required anymore (#2618) * add __setattr__ to optparse.Values (#2622) * Update types for requests.adapters (#2614) * Add some distutils.dist.Distribution attrs (#2620) * Add stub for pytz.VERSION (#2619) * Added logging port constants to logging.handlers stub (#2617) * Accept upstream stubs when receiving no response (#2608) * Merge Python 2 and 3 versions of itsdangerous (#2564) * Add complete annotations to builtins.compile. (#2606) * Let ctypes._CData.from_buffer[_copy] accept any buffer object (#2610) * Replace non-ellipsis default arguments (#2550) * Fix stub for SpooledTemporaryFile (#2452) * Allow array[int] as a valid input to struct.unpack(). (#2586) * Document the Python 3.7 variant of subprocess.check_output (#2592) * Fix return annotation for asyncio.as_completed() (#2600) * Relax type for click.echo. (#2607) * Add optimize parameter to builtins.compile. (#2605) * Fix two small issues in `ctypes.Array` stubs (#2599) * Fix the return type for unittest.TestCase.run() (#2603) * Move Sized earlier in the bases of Sequence (#2602) * Expand Python 2's urllib.addbase definition. (#2601) * Annotate some missing http client and urllib APIs. (#2582) * Add missing stubs for multiprocessing.connection module. (#2596) * unittest.TestCase.assertRaises(): BaseException (#2594) * Fix typo in typing.pyi (#2595) * fix list concatenation (#2404) * Add options and extensions to google protobuf messages. (#2589) * Strengthen typing of datetime methods of Google protobuf's Timestamp. (#2590) * Simplify base64 input and output parameters. (#2587) * deque init() optional maxlen (#2585) * Make inspect.unwrap() stop argument optional. (#2583) * Add context manager to tarfile.TarFile (#2579) * Correct the param type for mapPriority (#2578) * Remove label descriptions from CONTRIBUTING (#2572) * Make _winapi.SetNamedPipeHandleState args Optional (#2571) * Add overrides for the methods 'readlines' and 'writelines' in TextIOBase. (#2551) * unittest: Complete assertRaisesRegex (#2568) * correct parse_args namespace attribute (#2566) * Remove version guard (#2565) * Remove third_party/3/enum.py (#2563) * Fix return annotation for loop.call_later() and loop.call_at() (#2559) * Fix return of patch() and patch.multiple() (#2520) * Make SyntaxError.offset be optional (#2557) * Fix py3 types of inspect.FullArgSpec.var(args|kw) (#2556) * Make backlog parameter optional in listen method (#2553) * Add is_dir method to ZipInfo class (#2554) * Flake8 fixes (#2549) * Fix email.parser.BytesParser and BytesHeaderParser method args (#2548) * Update to flake8 3.6.0 (#2547) * Allow json.dump to dump to BinaryIO again (#2546) * Make os.dup2 return int on Python 3.7 (#2543) * os.DirEntry.stat() accepts a follow_symlinks keyword argument (#2538) * Annotate jwt.algorithms (#2532) * fix lint error (#2541) * Annotate werkzeug wrap_file() and FileWrapper (#2519) * Rework .travis.yml and run with Python 3.7 where possible (#2536) * Makes enums accept objects in the argument type (#2539) * Fix typo in mmap const (#2537) * Add attributes to int and float (#2529) * Fix pytype test output (#2534) * Add cr_await, cr_code, cr_frame and cr_running to Coroutine (#2530) * Update PyJWT's exceptions (#2522) * Fix return type of ast.NodeTransformer.generic_visit (#2486) * loop argument for set_event_loop() is optional, it can be None (#2525) * Add UserString and UserList data attribute (#2518) * Add stub for pathlib2.Path.__div__ (#2507) * ImportFrom level cannot be optional (#2517) * click.option's defined type as return type of callable (#2505) OBS-URL: https://build.opensuse.org/request/show/676202 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typeshed?expand=0&rev=3
2019-02-14 17:42:39 +00:00
BuildRequires: python3-flake8-pyi
- Update to version 0.0.1+git.20191209.a06abc5d: * Make fieldnames of csv.DictReader Optional (#3534) * Update orjson stub from orjson repository(#3532) * Update stub for socket module (#3451) * Use Literal to improve SpooledTemporaryFile (#3526) * random: fix type for sample (#3525) * add raw property to BufferedIOBase (#3483) * Minor fixes to cryptography (x509) (#3520) * Simplify `WatchedFileHandler.__init__` (#3506) * Improve warnings stubs (#3501) * padding can take an int or an object (PSS.MAX_LENGTH) (#3521) * __future__: add _Feature.compiler_flag (#3522) * A few return annotations for redis client (#3517) * SMTPChannel.push() accepts str (#3516) * Optional initial-value parameter for itertools.accumulate() (#3503) * In python versions 3.7 and above, re-export Pattern and Match (#3510) * builtins.print: make sep and end Optional (#3468) (#3511) * Add ImportError constructor arguments (#3512) * Fix the signature of unittest.TestCase.assertLogs #3513 (#3514) * asyncio/future.pyi - wrap_future loop keyword arg (#3507) * Change return type of Message.get_payload() to Any (#3504) * Modulefinder stubs (#3497) * Type socketserver's RequestHandlerClass as a callable. (#3422) * add no_type_check_decorator stub for #2884 (#3460) * Add mailcap module (#3482) * mailbox: Fix signature of Mailbox.update method (#3493) * Refactor warnings.catch_warning to be a class. (#3499) * Fix type hints in Template class (#3491) * mailbox: Couple small fixes (#3490) * timeout argument to urllib.request.urlopen is Optional (#3487) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typeshed?expand=0&rev=10
2019-12-12 12:33:18 +00:00
#BuildRequires: python3-pytype
BuildRequires: python3-typed-ast
Recommends: mypy
Provides: python3-typeshed = %{version}
Obsoletes: python3-typeshed < %{version}
Provides: python2-typeshed = %{version}
Obsoletes: python2-typeshed < %{version}
BuildArch: noarch
%description
Typeshed models function types for the Python standard library
and Python builtins, as well as third party packages.
This data can e.g. be used for static analysis, type checking or
type inference.
This package stores the typedata in %{_datadir}/typeshed
%prep
%autosetup -p1 -n %{modname}-%{version}
rm -r stdlib/2
rm -rv stdlib/*/typing.pyi
%build
# Nothing to build
%install
mkdir -p %{buildroot}/%{_datadir}/typeshed
for dir in stdlib third_party ; do
cp -r $dir %{buildroot}/%{_datadir}/typeshed/$dir
done
%fdupes %{buildroot}%{_datadir}/typeshed
%check
tests/mypy_test.py || /bin/true
tests/pytype_test.py || /bin/true
%files
%doc CONTRIBUTING.md README.md
%license LICENSE
%{_datadir}/typeshed
%changelog