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

Fix unicode issue when generating migration with py2 or py3 #359

Merged
merged 1 commit into from
Mar 19, 2019
Merged

Fix unicode issue when generating migration with py2 or py3 #359

merged 1 commit into from
Mar 19, 2019

Conversation

mounirmesselmeni
Copy link
Contributor

Running makemigrations on Python 3 will generate a new migration because of Query.connection.help_text which is not unicode on Python 2 which lead to a migration file with byte see explorer/migrations/0006_query_connection.py

migrations.AddField(
            model_name='query',
            name='connection',
            field=models.CharField(help_text=b'Name of DB connection (as specified in settings) to use for this query. Will use EXPLORER_DEFAULT_CONNECTION if left blank', max_length=128, null=True, blank=True),
        ),

Adding from __future__ import unicode_literals will solve this problem but I've to add the right migration any way so that Django will not try generate a new one using Python3.

I have also added minor fixes to use @six.python_2_unicode_compatible

I hope this will be merged and released as soon as possible.

@mounirmesselmeni
Copy link
Contributor Author

@chrisclark This is basically doing the same as #353 but fixing some unicode compatibility with Python 3 and the reason behind the missing migration is only with Python 3, as in Python 2 there is no migration generated.
Any chance getting this merged and released soon.

@chrisclark
Copy link
Collaborator

Great change. Approved and merged. I will try to do a release in the next 30 days.

@chrisclark chrisclark merged commit c092010 into explorerhq:master Mar 19, 2019
@mounirmesselmeni
Copy link
Contributor Author

Hello @chrisclark , Any chances releasing this soon? :)

@saz
Copy link

saz commented Jul 19, 2019

@chrisclark Can you make a new release?

@saz saz mentioned this pull request Jul 19, 2019
@meIias
Copy link
Contributor

meIias commented Jul 23, 2019

Hi all, just wanted to give a heads-up that we are actively working towards a new release and you can expect it soon.

@lociii
Copy link
Contributor

lociii commented Aug 21, 2019

Hey @meIias,

any news about the release? We're checking for missing migrations doing a dry-run when deploying our software and have to work around the missing one for this library.
Would be great to be able to get rid off the workaround.

Thanks!

@MattFisher
Copy link
Contributor

I don't want to pester, but is the new release going to come out soon? We've got an open PR to do a migration check in CI that's waiting on this fix.
Thanks for an awesome tool!

@meIias
Copy link
Contributor

meIias commented Sep 23, 2019

Sorry for the delay folks! the latest version 1.1.3 should be live as of today!

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