Project dependencies have API risk issues
PyDeps opened this issue · comments
Hi, In cheat.sh, inappropriate dependency versioning constraints can cause risks.
Below are the dependencies and version constraints that the project is using
wheel*
gevent*
flask*
requests*
pygments*
dateutils*
fuzzywuzzy*
redis*
colored<1.4.3
langdetect*
cffi*
polyglot*
PyICU*
pycld2*
colorama*
pyyaml*
python-Levenshtein*
pytest*
The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict.
The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.
After further analysis, in this project,
The version constraint of dependency gevent can be changed to >=1.2a1,<=21.12.0.
The above modification suggestions can reduce the dependency conflicts as much as possible,
and introduce the latest version as much as possible without calling Error in the projects.
The invocation of the current project includes all the following methods.
The calling methods from the gevent
subprocess.check_output
The calling methods from the all methods
text.encode self._cut_block _join_paragraphs chain.from_iterable entry.startswith remove_ansi os.path.isdir self.panela.read_ansi _limited_entry state.strip match.group frontend.html.visualize result.strip cls logging.Formatter my_file.write key.replace my_env.FNULL.FNULL.os.devnull.open.cmd.Popen.communicate re_version.match cache.delete get_all_styles RuntimeError cls.getattr text.group.strip _split_into_paragraphs os.path.abspath re_timestamp.match GitRepositoryAdapter.__init__ all_adapters.get language.split.strip _colorize requests.get get_topics_list os.environ.get os.remove vars.__subclasses__ adptr.repository_url adptr.save_state stream.feed topic_name.replace script_vim.file.close yaml.load answer_dict.get entry.endswith query_text.rstrip self.mask.append _format_section self.update _github_button last_query output.decode self._limit_exceeded obj.get_list isfile _find_supported_language answers.append hasattr calculate_color logging.StreamHandler adptr.fetch_command Popen filename.endswith _config_locations char.encode save_query adptr.get_updates_list_command abs process.communicate proc.communicate.decode _load_config_from_file error self.extend self._starting_page cls.local_repository_location logging.getLogger.addHandler CheatSheets.local_repository_location itertools.cycle beauty_options.get name.lower glob.glob vars join os.path.basename GITHUB_REPOSITORY.get stripped.startswith answer.keys options_meaning.items points.reverse data.encode topic.index _run_cmd newparts.append x.strip topic.endswith cls._repository_url.startswith parse_cmdline result.update topic.CONFIG.os.path.join.open.read line_content.strip basename lexer_class hashlib.md5 script_lines.append default_config.items self._process_line _colorize_line sys.setdefaultencoding logging.getLogger doctest.testmod _unindent_code _add_section_name answer.split ansiwrap.fill topic.split.lower _REDIS.delete textwrap.dedent _sanitize_dirnames text.startswith cmd.startswith locals rewrite_editor_section_name _get_filenames adapter.internal.UnknownPages accept_language.split block.strip all ANSI_ESCAPE.sub self._clear_counters_if_needed request.args.split route.self._adapter.is_found topic.lower NamedTemporaryFile keyword.split LANGUAGE_ALIAS.get paragraph.splitlines x.startswith text.group.endswith rgb_from_str match existing_locations.append self.page.append x.rstrip _run_vim_script datetime.utcnow sorted shutil.copymode language_adapter.get_list collections.Counter stderr_handler.addFilter fmt.comments.beautify x.decode.rstrip update_by_name _reverse_palette answer_lines.append Limits answers_found.append self.get_topics_list search_options.index hostname.endswith dirname key.split Router WSGIServer _get_abspath text.decode regexp.search block_name.strip wcswidth send_from_directory _rewrite_section_name range _visualize config.items sys.exit _answer_filter_by_keyword _line_type block_name.strip.split colored.bg parse_args get_answers request.url.split get_line groupby os.path.split self._extract_blocks requests.request lang.self.adapters.get_page CONFIG.get zip _commenting_script _answer_add_comments block_name.strip.strip.split language.strip Terminal256Formatter _render_html _sanitize_query regexp.subn adptr.local_repository_location self._is_block_separator answer.update self.in_field re.compile os.environ.copy answer_filename.open.read frontend.ansi.visualize end.lines.strip VIM_NAME.get re.sub super self._rosetta_get_list known_location.items _filter_by_keyword time.time _split_paragraphs _REDIS.set pyte.streams.ByteStream languages_data.LEXER.get Flask stderr_handler.setFormatter latencies.render filetype.startswith req.headers.getlist query.split language.split f.read start.lines.strip re.split CheatSheets.is_found code.lower line.strip self._parse_query find_answers_by_keyword dict colored.fg is_result_a_script _remove_initial_underscore dict.__init__ print now.re.sub.replace.replace self._format_page fatal supposed_lang.startswith get_request_ip logging.basicConfig request.args.get self._get_filetype state_filename.open.write type REDIS.delete from_.split fmt.comments.code_blocks self.handle_if_random_request colorize_internal self._adapter.items line_content.textwrap.fill.splitlines dict.__setitem__ sys.stderr.sys.stdout.args.Popen.wait self._load_rosetta_code_names __get_topic_type newdict.items self._get_stat empty_line isinstance text.group update_all links.append data.get color_style.Terminal256Formatter.lexer_class.answer.pygments_highlight.strip _html_wrapper seq.replace topic.lstrip sys.stdout.write sys.stdin.read now.re.sub.replace log script_vim.name.open.write result.append cache.get left_space.append points.append request_options.items answer_dict.update _colorize_ansi_answer self.copy SkipFlaskLogger line.endswith Panela _classify_lines bool path.startswith topic_list.remove Adapter.__init__ beautify language.split.split filename.open.write subprocess.Popen urlparse.parse_qs f.endswith _log args.items re.escape redirect min block_name.startswith pygments_highlight _update_adapter section_name.split all_adapters filename.startswith self.crop text.hashlib.md5.hexdigest cls.__subclasses__ block_name.replace _show_usage _extract_color_number _remove_empty_lines_from_beginning self._get_list srv.serve_forever screen.buffer.items adapter.adapter.all_adapters self._log_visit f.readlines part.startswith _parse_accept_language lang.split self._get_page_dict request.cookies.get max self._get_command UpstreamAdapter._get_page Template adptr.name k highlight dirname.split _wrap_lines message.rstrip by_name.adapter_class stdout.decode topic_type.self._adapter.is_cache_needed re.match request.get_data CONFIG.update _is_html_needed self.adapters.values datetime.utcnow.strftime request.headers.get.lower self.local_repository_location resp.raw.headers.items stderr.stdout.decode x.name block.append _back_color _load_config_from_environ x.decode with_metaclass log_query answer.strip Point calculate_bg fmt.internal.colorize_internal_firstpage_v1 Detector full_name.split set _process_text right_spaces self._report_excessive_visits Response topic_type.self._adapter.get_page_dict log_entry.encode line.strip.startswith self.put_point re.search req.form.items cheat_wrapper.cheat_wrapper os.path.exists adapter.all_adapters state_filename.open.read template.show logging.error CONFIG.rstrip subprocess.check_output left_spaces COLORS_JSON.open.read output.splitlines template.read line.rstrip urlparse.urlparse sys.stdout.flush reload f_cheat_sheet.readlines self._bg_colors.get script_lines.insert self._colors.get patch_all format possible_names.append self.get_list path.join topic.rstrip os.rename itertools.repeat any self._get_output_format proc.communicate open process_post_request self._read_cheatsheet color_mapping skip.append topic.startswith cls.AdapterMC.super.__repr__ jinja2.ChoiceLoader text.lstrip text.splitlines fetch_all postprocessing.postprocess json.dumps cls.get_state _proxy logging.info _time_caps textfile.name.open.read LIMITS.check_ip __main__ lang.self.adapters.is_valid os.chdir _cleanup_lines line.items location.known_location.repository_url _save_cheatsheet languages_data.get_lexer_name key.startswith show_usage output.endswith len redis.Redis textwrap.fill block_name.strip.strip answer_text.decode locale_q_pairs.append result.replace self._get_list_answer LearnXinY.local_repository_location self._get_limit adapter.internal.InternalPages main entry.split request_options.get highlighted_blocks.append sys.stderr.write answer.append answer.highlight.lstrip _fetch_locations __select_random_topic os.makedirs getattr cheat_wrapper re.subn _get_nested self.get_topic_type editor_name.editor_name_mapping.get json.loads CONFIG.os.path.join.open.read Config filename.open.read fout.write answer.splitlines _are_you_offline options.items jinja2.FileSystemLoader ip_addr.startswith int right_space.append _language_name self._get_page list os.path.dirname _rewrite_aliases answer.get tuple cache.put self._absolute_path stat.items filename.split _limited_answer textfile.name.open.write run process.extract search.match SO_NAME.get adptr.update_command path.dirname app.route os.path.join parsed.path.lstrip template.apply_mask stream.attach sys.path.append adptr.current_state_command get_answer_language key.replace.upper _parse_query _remove_empty_lines_from_end topic.replace self.panela.put_point options.parse_args random.choice self._get_task cls.__subclasses__.set.union topic.split _beautify textfile.file.close _REDIS.get str request.headers.get enumerate line.startswith colored.attr _all_subclasses pyte.screens.Screen lang.startswith _parse_options next dirname.startswith adptr.get_updates_list val.startswith
@developer
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.