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

Fixes #135 - TypeError in Python 3 on Windows #138

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smsearcy
Copy link

Fixes #135 "TypeError: environment can have only strings" by using str() instead of b'' for preparing environment settings. Tested to make sure it works in both Python 2.7 and Python 3.4 on Windows.

@smsearcy smsearcy changed the title Issue 135 Fixes #135 - TypeError in Python 3 on Windows Apr 28, 2016
@TAGC
Copy link

TAGC commented Sep 21, 2016

pip install git+git://github.com/smsearcy/bumpversion.git@issue-135 for anyone who wants to use bumpversion with Python 3 until this gets merged into master. I can confirm that this works with Python 3.5.

@deisi
Copy link

deisi commented Oct 14, 2016

for me using pip install git+git://github.com/smsearcy/bumpversion.git@issue-135 doesnt help. It still fails with:

warning: LF will be replaced by CRLF in setup.cfg.
The file will have its original line endings in your working directory.
Traceback (most recent call last):
  File "c:\users\deiseroth\anaconda3\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\deiseroth\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\deiseroth\Anaconda3\Scripts\bumpversion.exe\__main__.py", line 9, in <module>
  File "c:\users\deiseroth\anaconda3\lib\site-packages\bumpversion\__init__.py", line 994, in main
    vcs.commit(message=commit_message)
  File "c:\users\deiseroth\anaconda3\lib\site-packages\bumpversion\__init__.py", line 73, in commit
    list(os.environ.items()) + [(b'HGENCODING', b'utf-8')]
  File "c:\users\deiseroth\anaconda3\lib\subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "c:\users\deiseroth\anaconda3\lib\subprocess.py", line 693, in run
    with Popen(*popenargs, **kwargs) as process:
  File "c:\users\deiseroth\anaconda3\lib\subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "c:\users\deiseroth\anaconda3\lib\subprocess.py", line 1224, in _execute_child
    startupinfo)
TypeError: environment can only contain strings

But I'm not sure if the pip install works at all. My pip freeze | grep bump shows:

bumpversion==0.5.3

I was expecting to see the git ref there but maybe I'm wrong.

@evanunderscore
Copy link

I just encountered this issue with Python 3.6.1 and pip install git+git://github.com/smsearcy/bumpversion.git@issue-135 resolved it for me.

@Nurdok
Copy link

Nurdok commented May 25, 2017

Is there a chance this will be fixed (the CI is failing) and merged? I use this version on Windows and I would love to go back to using the main branch version.

@Nurdok
Copy link

Nurdok commented May 25, 2017

Actually, it seems that the build is only failing because of Python 3.2, which is really dead and should not be supported anymore (it is no longer supported by pip). So this really can and should be merged.

@smsearcy
Copy link
Author

@Nurdok, I had another PR (#139) to deal with the failing Python 3.2 tests, but I think you're right, dropping Python 3.2 support makes more sense. Unfortunately it does not appear there has been any recent activity on this project.

@jwaschkau
Copy link

Works for me with Python3.4.4 x86 Windows

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.

6 participants