Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Minor improvements to setup.py #4

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

Merged
njsmith merged 1 commit into python-trio:master from agronholm:setup_py
Dec 4, 2016
Merged

Conversation

@agronholm
Copy link
Contributor

@agronholm agronholm commented Dec 3, 2016

I assume that as of at least v1.3, this is no longer in beta?

Copy link

codecov-io commented Dec 3, 2016
edited
Loading

Current coverage is 100% (diff: 100%)

Merging #4 into master will not change coverage

@@ master #4 diff @@
===================================
 Files 5 5 
 Lines 512 512 
 Methods 0 0 
 Messages 0 0 
 Branches 0 0 
===================================
 Hits 512 512 
 Misses 0 0 
 Partials 0 0 

Powered by Codecov. Last update d190466...5c12c09

Copy link
Member

njsmith commented Dec 4, 2016
edited
Loading

no longer in beta?

Heh, good catch.

version=__version__,
description="Async generators for Python 3.5",
long_description=open("README.rst").read(),
long_description=Path(__file__).with_name("README.rst").read_text('utf-8'),
Copy link
Member

@njsmith njsmith Dec 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Contributor Author

@agronholm agronholm Dec 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figures out the path to setup.py, even if it's not in the current directory, and then changes the file name of the path to README.rst and finally reads the file contents as UTF-8 (the explicit encoding is necessary on Anaconda installs [like on RTD] where str.decode() for some incomprehensible reason does not default to utf-8!).
In the early days of my most popular project, APScheduler, I got a PR from someone who was doing RPM packaging of APScheduler. They were complaining that apscheduler's setup.py assumes that the working directory is the project directory, which apparently is not always the case. This line avoids that by not assuming anything about the CWD (and it closes the properly too, not that it really matters in the case of setup.py).

Copy link
Member

@njsmith njsmith Dec 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assumes that the working directory is the project directory, which apparently is not always the case.

......wuuut. really? .....I'm suddenly paranoid about all my packages. really? yikes.

@njsmith njsmith merged commit 4caabc8 into python-trio:master Dec 4, 2016
Copy link
Member

njsmith commented Dec 4, 2016

Anything else you need, or should I roll a 1.3 release to get the yield_ change out for you?

Copy link
Contributor Author

I took a stab at adding type hints but I wasn't sure what types to put where, so I gave up for now. I've already released v1.3 of asyncio_extras which now depends on async_generator.

Copy link
Member

njsmith commented Dec 6, 2016

'kay, v1.4 is up on pypi (not sure why I said 1.3 above)

agronholm reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@njsmith njsmith njsmith left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /