Skip to content

add c variant for old str formatting #130

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
merged 4 commits into from
Dec 6, 2018
Merged

Conversation

andgrew
Copy link

@andgrew andgrew commented Dec 4, 2018

Its important for example for:
print(datetime.now())
And may be checked in this way:
"%c" % 107 # gives letter 'k'
and this:
"%c" % "k" # gives letter 'k' too

@andgrew
Copy link
Author

andgrew commented Dec 4, 2018

I see, that it fails. Thinking its due to a different text editor settings. But cant check it locally now. Command 'python setup.py develop' fails with message 'unsupported Go version , Grumpy requires at least 1.9...'. But my go version is go1.10.3 linux/amd64.

@alanjds
Copy link

alanjds commented Dec 4, 2018

I see, that it fails.

Yeah, but is about formating: gofmt is a bit picky, but can fix the code for you: https://travis-ci.org/grumpyhome/grumpy/jobs/463174672#L847

gofmt found errors, run: gofmt -w /home/travis/gopath/src/github.com/grumpyhome/grumpy/grumpy-runtime-src/runtime/*.go

Just run the provided line gofmt -w grumpy-runtime-src/runtime/*.go and it should fix.

Command 'python setup.py develop' fails with message 'unsupported Go version , Grumpy requires at least 1.9...'. But my go version is go1.10.3 linux/amd64.

Strange. What linux are you using? How you installed Go? Can you please share the output of $ which go; go version; env | grep GO ?

Copy link

@alanjds alanjds left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution.

I will add a test before merging, but you can do it to make the merge occur sooner.

You can take a look on str_test.go if possible?

@alanjds alanjds requested a review from a team December 4, 2018 23:32
@andgrew
Copy link
Author

andgrew commented Dec 5, 2018

Yes, I wanted to add a test. I got it how the tests work. I'm running on another system now. Further I will understand, why I had problem in windows linux subsystem (Debian).

@alanjds alanjds merged commit e6e6ead into grumpyhome:master Dec 6, 2018
@alanjds
Copy link

alanjds commented Dec 6, 2018

Thanks for the test.

I wanted to explore the Windows Linux Subsystem too. Good to know that it messed with your Go versions.

In theory it should work and no Windows port would be needed at all, but lets see...

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