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

Minor improvements to setup.py #4

Merged
merged 1 commit into from
Dec 4, 2016
Merged

Conversation

agronholm
Copy link
Contributor

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

@codecov-io
Copy link

codecov-io commented Dec 3, 2016

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

@njsmith
Copy link
Member

njsmith commented Dec 4, 2016

no longer in beta?

Heh, good catch.

@@ -6,15 +8,14 @@
name="async_generator",
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

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

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

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
@njsmith
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?

@agronholm
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.

@njsmith
Copy link
Member

njsmith commented Dec 6, 2016

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

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

Successfully merging this pull request may close these issues.

3 participants