Giter Club home page Giter Club logo

cup's Introduction

house.baidu.com

cup's People

Contributors

0xflotus avatar b3ef avatar chetkhatri avatar endyul avatar francis95-han avatar hjlarry avatar jamieslome avatar liu0208xuan avatar mythmgn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cup's Issues

安装3.0aplha时报错

安装3.0aplha时报错。执行python3 setup.py install后出现以下信息:
Traceback (most recent call last):
File "setup.py", line 20, in
author = import(name).version.AUTHOR
File "/mnt/test/CUP-3.0-alpha/cup/init.py", line 28, in
from cup import net
File "/mnt/test/CUP-3.0-alpha/cup/net/init.py", line 20
from cup.net import async
^
SyntaxError: invalid syntax
None

raise cup.err.NoSuchFileOrDir("file not exist.")

File "test.py", line 9, in test
raise cup.err.NoSuchFileOrDir("file not exist.")
File "/usr/local/lib/python2.7/dist-packages/cup/err.py", line 124, in init
super(NoSuchFileOrDir, self).init(msg)
File "/usr/local/lib/python2.7/dist-packages/cup/err.py", line 116, in init
super(self.class, self).init(msg)
File "/usr/local/lib/python2.7/dist-packages/cup/err.py", line 116, in init
super(self.class, self).init(msg)
File "/usr/local/lib/python2.7/dist-packages/cup/err.py", line 116, in init
super(self.class, self).init(msg)
File "/usr/local/lib/python2.7/dist-packages/cup/err.py", line 116, in init
super(self.class, self).init(msg)
......

RuntimeError: maximum recursion depth exceeded while calling a Python object

cup.net.async 主动关闭对端socket后可能面临的问题

Describe the bug 清晰简洁的BUG描述

冠南,我找到问题的原因了,场景是这样的
1)client (ip, 60000)-》 master , connection是 (ip, 45002),这个context在 master 里面是没有的,所以新建了一个新的context
2)master 读完了client给发的消息后,要post_msg给client, post_msg 里面dst_addr=ip,60000, 这个context 在master里面也没有,所以建立新的context
3) client 进程退出后connection reset by peer,master清理掉connection((ip, 45002)
4) 新启动client进程,client (ip, 60000)-》 master, connection (ip, 45005), 读取client消息后,master post_msg给dst_addr=ip,60000, 这个context因为之前没有清理,因此一直在master _peer2context 中,但是socket其实已经坏了,所以返回的是connect reset by peer

To Reproduce 怎么去复现这个问题?
Steps to reproduce the behavior:

Screenshots 截图或者其他方式可以辅助其他人理解
If applicable, add screenshots to help explain your problem.

`cup.shell.ShellExec().run` incompatible with python3.9

Describe the bug 清晰简洁的BUG描述

File "/home/work/anaconda3/lib/python3.9/site-packages/cup/shell/oper.py", line 576, in run
    if cmdthd.isAlive():
AttributeError: 'Thread' object has no attribute 'isAlive'

Python3.9 removed isAlive() method from threading.Thread module, replaced by is_alive().

To Reproduce 怎么去复现这个问题?
Steps to reproduce the behavior:

shelltool = cup.shell.ShellExec()

shelltool.run("echo hello", timeout=None)

Screenshots 截图或者其他方式可以辅助其他人理解
If applicable, add screenshots to help explain your problem.

cup.net.asyn py3 compatibility

Is your feature request related to a problem? Please describe.
简洁描述下新feature的内容

cup.net.asyn py3 compatibility, specifically the default unicode character for python "str"

Describe the solution you'd like
描述下你想要什么样的解决方案

Describe alternatives you've considered
是否有其他替代方案

Additional context
可以辅助其他人理解你的信息

python3不兼容unicode

#log.py
def _fail_handle(msg, e):
    if not isinstance(msg, unicode):
        msg = msg.decode('utf8')
    print('{0}\nerror:{1}'.format(msg, e))

cup bufferpool, add extendibility

Is your feature request related to a problem? Please describe.
简洁描述下新feature的内容

cup bufferpool cannot be extended. Add extendibility to it.

Describe the solution you'd like
描述下你想要什么样的解决方案

Describe alternatives you've considered
是否有其他替代方案

Additional context
可以辅助其他人理解你的信息

logo proposal

Hi @baidulegal am a graphics designer. I want to know, if you want me to create a new logo for your project.

Publish to Pypi

After we publish this package to PYPI, Users can install the package by the command below easily

pip install cup # or other name

cup.shell.async_run 执行耗时长达13s

Describe the bug 清晰简洁的BUG描述
cup.shell.async_run 执行耗时长达20s

To Reproduce 怎么去复现这个问题?
Steps to reproduce the behavior:

Screenshots 截图或者其他方式可以辅助其他人理解
If applicable, add screenshots to help explain your problem.
截图是cup.res.linux.Process children 函数,基本时间消耗在这个部分:
image

INFO: 2019-05-06 15:42:11,498 * [111144:139769870788352] [init.py:141] linux process instance inited
INFO: 2019-05-06 15:42:24,901 * [111144:139769870788352] [linux.py:661] process_num:1302

Support Py3

Is your feature request related to a problem? Please describe.
简洁描述下新feature的内容

Support py3

Describe the solution you'd like
描述下你想要什么样的解决方案

调研python3和python2区别, 并开启支持python3

Describe alternatives you've considered
是否有其他替代方案

Additional context
可以辅助其他人理解你的信息

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.