Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package wheel contains unexpected Python files #5

Open
dahlia opened this issue Dec 20, 2017 · 1 comment
Open

Package wheel contains unexpected Python files #5

dahlia opened this issue Dec 20, 2017 · 1 comment

Comments

@dahlia
Copy link
Contributor

dahlia commented Dec 20, 2017

It contains slack_handler/__init__.py and slack_logger/__init__.py besides slack_logger.py.

$ pip3 download slack-logger==0.3.0
Collecting slack-logger==0.3.0
  Using cached slack_logger-0.3.0-py3-none-any.whl
  Saved ./slack_logger-0.3.0-py3-none-any.whl
Successfully downloaded slack-logger
$ tar xvfz slack_logger-0.3.0-py3-none-any.whl
x slack_logger.py
x slack_handler/__init__.py
x slack_logger/__init__.py
x slack_logger-0.3.0.dist-info/DESCRIPTION.rst
x slack_logger-0.3.0.dist-info/metadata.json
x slack_logger-0.3.0.dist-info/top_level.txt
x slack_logger-0.3.0.dist-info/WHEEL
x slack_logger-0.3.0.dist-info/METADATA
x slack_logger-0.3.0.dist-info/RECORD

slack_logger/__init__.py is even not a duplicate of slack_logger.py, but a previous version of it:

$ diff slack_logger.py slack_logger/__init__.py | head -n 10
8c8
<     def __init__(self, url, username=None, icon_url=None, icon_emoji=None, channel=None, mention=None):
---
>     def __init__(self, url, username=None, icon_url=None, icon_emoji=None, channel=None):
16d15
<         self.mention = mention and mention.lstrip('@')
19,20d17
<         text = self.format(record)
<
24c21

The worst problem is that import slack_logger doesn't see slack_logger.py but slack_logger/__init__.py which is outdated:

>>> import slack_logger
>>> slack_logger.SlackHandler('https://...', mention='U012ABC34')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'mention'
@junhwi
Copy link
Owner

junhwi commented Dec 20, 2017

@dahlia Sorry, there was a problem when I packaging wheel.
I just uploaded a new version to pypi. Can you try the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants