Re: [Django] #23455: migrations created with python2 break with python3

2014-12-12 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by Carl Meyer ):

 In [changeset:"f8b4cf4022aae460d7bbfb9510858baf37ae6c15"]:
 {{{
 #!CommitTicketReference repository=""
 revision="f8b4cf4022aae460d7bbfb9510858baf37ae6c15"
 [1.7.x] Revert "Fixed #23455 -- Forced related_name to be a unicode string
 during deconstruction."

 This reverts commit 45bd7b3bd9008941580c100b9fc7361e3ff3ff0d.

 This is a backport of 8aaf51f94c70e3cfcd2c75a0be1b6f55049d82d8 from
 master.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.b5371c2509d73b88fe988c4d5f58bf16%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-12-12 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by Carl Meyer ):

 In [changeset:"0a8b911582eee85ea6da0d40dd2c7b12de5a78b2"]:
 {{{
 #!CommitTicketReference repository=""
 revision="0a8b911582eee85ea6da0d40dd2c7b12de5a78b2"
 [1.7.x] Fixed #23455 -- Accept either bytes or text for related_name,
 convert to text.

 Backport of c72eb80d114fb5d90bd21b5549e8abd0bbd17f99 from master.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.6d7e8caef37c8536e031f04b4115ace3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-12-12 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by Carl Meyer ):

 In [changeset:"c72eb80d114fb5d90bd21b5549e8abd0bbd17f99"]:
 {{{
 #!CommitTicketReference repository=""
 revision="c72eb80d114fb5d90bd21b5549e8abd0bbd17f99"
 Fixed #23455 -- Accept either bytes or text for related_name, convert to
 text.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.a479d9036ecfcf964254c47b12f2455b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-12-12 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by Carl Meyer ):

 In [changeset:"8aaf51f94c70e3cfcd2c75a0be1b6f55049d82d8"]:
 {{{
 #!CommitTicketReference repository=""
 revision="8aaf51f94c70e3cfcd2c75a0be1b6f55049d82d8"
 Revert "Fixed #23455 -- Forced related_name to be a unicode string during
 deconstruction."

 This reverts commit 45bd7b3bd9008941580c100b9fc7361e3ff3ff0d.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.08f82bf50fb58dff0440f7b073f4880a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-12-11 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by charettes):

 It seems reasonable to me.

 I also think migrations should always preserve bytes/text and this
 shouldn't be special cased at the migration level but handled at the model
 one.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.71b33e944ca5df50a841395b614bfa6c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-12-11 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by carljm):

 Thanks to feedback from charettes on
 https://github.com/django/django/pull/3718, I've realized that this needs
 to be fixed somehow, we can't only revert the existing fix - the error
 message is too obscure.

 But I think a better fix would be for Django to just always convert
 `related_name` to text, not to do it specifically on deconstruction for
 migrations. Rationale:

 1) In general, the goal should be as much as possible to maintain uniform
 behavior between Python 2 and Python 3.

 2) With the current fix here, the situation is "on Python 2, related_name
 can be bytes or text; on Python 3 it must be text." Migrations generated
 on Python 2 and run on Python 3 expose this difference. So currently we
 work around it by ensuring that Python 2 stores `related_name` as text in
 migrations.

 3) With my proposed fix, we maintain better consistency. Migrations always
 preserves bytes/text, and Django always (regardless of Python version)
 supports setting `related_name` as either bytes or text, and converts it
 to text internally (since it needs that for interpolation).

 The effect on generated migrations in the end will be the same as the
 current fix; since `related_name` is converted to text, it will still be
 deconstructed as text. The most noticeable difference is that with my
 proposed fix, migrations generated on Django 1.7.0 under Python 2 won't
 need to be manually edited to work under Python 3, they'll just work.

 Is this reasonable, or am I missing something?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.8e73b8c9c0246a8e1144a985c71abf40%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-12-11 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by carljm):

 I think this change should probably be reverted, and we should avoid any
 auto-conversion that introduces a difference between real models and
 migration models. See further discussion on #23982.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.1b98f5e09fc95707765828978a6e8e37%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-25 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by Tim Graham ):

 In [changeset:"e8a08514de6b97de1fce13b6c6b24cf72d1d60d9"]:
 {{{
 #!CommitTicketReference repository=""
 revision="e8a08514de6b97de1fce13b6c6b24cf72d1d60d9"
 [1.7.x] Fixed #23455 -- Forced related_name to be a unicode string during
 deconstruction.

 Backport of 45bd7b3bd9 from master
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.f59cf40a1b3ce1cb2c3e146b0d2d49e5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-25 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45bd7b3bd9008941580c100b9fc7361e3ff3ff0d"]:
 {{{
 #!CommitTicketReference repository=""
 revision="45bd7b3bd9008941580c100b9fc7361e3ff3ff0d"
 Fixed #23455 -- Forced related_name to be a unicode string during
 deconstruction.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.21fcb951e4d0b7180be84d42e118283e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-25 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---
Changes (by Markush2010):

 * has_patch:  0 => 1


Comment:

 I added a pull-request: https://github.com/django/django/pull/3276

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.ad533523068261392e6a87e489471041%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-25 Thread Django
#23455: migrations created with python2 break with python3
-+---
 Reporter:  brian|Owner:  Markush2010
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---
Changes (by Markush2010):

 * status:  new => assigned
 * owner:  nobody => Markush2010


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.37ebd20870fb24fee7bb5e2d0b99bbc3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-09 Thread Django
#23455: migrations created with python2 break with python3
-+
 Reporter:  brian|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by claudep):

 Sure, for most of the fields, the binary prefix makes no sense. I think
 that the `unicode_literals` recommendation and the conversion of some
 fields are no antagonistic solutions.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.9d02ab62e8805691aa6b26a4a86f27d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-09 Thread Django
#23455: migrations created with python2 break with python3
-+
 Reporter:  brian|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by brian):

 Replying to [comment:3 timgraham]:

 It seems unfortunate that this means altering the previously working
 source code, however I very much agree with your reasoning.

 I would suggest that assertions be added to ensure that certain fields,
 e.g. 'related_name' are always unicode strings (u"" for Python2/3 or ""
 for Python3). i.e. ensure that broken code breaks for Python 2 as well as
 Python 3, and possibly with a more consistent and friendly message.

 Obviously this would break code that appears to be fine under Python 2.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.0b2549dbc82ed03496987068807f709b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-09 Thread Django
#23455: migrations created with python2 break with python3
-+
 Reporter:  brian|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by Markush2010):

 * cc: info+coding@… (added)


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.27221147a49611ff8e845a2c0b8be7ad%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-09 Thread Django
#23455: migrations created with python2 break with python3
-+
 Reporter:  brian|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by timgraham):

 I don't think it's a good idea to coerce field options. For example, you
 might have `models.BinaryField(default=b"")`. How about instead
 documenting this issue and recommending adding `unicode_literals` as
 appropriate. For example, I did this for `contrib/contenttypes/models.py`
 when adding migrations there in eb8600a65673649ea15ed18d17127f741807ac8b.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.c081cb8b5f86d30ac4d4e93bd6fe7d0b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-08 Thread Django
#23455: migrations created with python2 break with python3
-+
 Reporter:  brian|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by charettes):

 * version:  1.6 => 1.7
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Managed to reproduce with the latest 1.7 release.

 I guess a fix similar to 5257b85ab8a4a86b24005e3ca8c542ede44b0687 (#23226)
 applied to field options should do here.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.bfce9ca767ebe402c7fdfaf02bb8d994%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23455: migrations created with python2 break with python3

2014-09-08 Thread Django
#23455: migrations created with python2 break with python3
+--
 Reporter:  brian   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.6
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by brian):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Urgh. Missed out on ticket 23456 by one :-(.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.1fc7823f77fb836c1a707cb91e1cc125%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.