Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19989 closed Bug (fixed)

Validating BinaryField against validators.EMPTY_VALUES raises UnicodeWarning

Reported by: Aymeric Augustin Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django/db/models/fields/__init__.py:160: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if value in validators.EMPTY_VALUES:

I don't know which test triggers this.

Attachments (1)

19989-1.diff (1.8 KB ) - added by Claude Paroz 12 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Claude Paroz, 12 years ago

Component: Python 3Core (Other)
Summary: Warning when running the tests under Python 3.3Validating BinaryField against validators.EMPTY_VALUES raises UnicodeWarning
Triage Stage: UnreviewedAccepted

by Claude Paroz, 12 years ago

Attachment: 19989-1.diff added

comment:2 by Claude Paroz, 12 years ago

Has patch: set

With this patch, the warning is gone.

comment:3 by Simon Charette, 12 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Claude Paroz <claude@…>, 12 years ago

Resolution: fixed
Status: newclosed

In 22be90dd171deebd0cf52bdd749f27b18e29a2f2:

Fixed #19989 -- Suppressed UnicodeWarning during BinaryField validation

Thanks Aymeric Augustin for the report and Simon Charette for the
review.

comment:5 by Claude Paroz <claude@…>, 12 years ago

In 2add24cc2c605a51695258d45d6d1b61556dec9f:

One more EMPTY_VALUES replacement following 22be90dd17

Thanks Loic Bistuer for catching this omission. Refs #19989.

Note: See TracTickets for help on using tickets.
Back to Top