Not to be a pain, but while that is accurate for federal purposes, for Quebec purposes, they do require the gain to be declared, even when the principal residence deduction will eliminate the entire gain. I had spoken to them last week and they confirmed that fact.
I spoke to them again today since it does not appear that UFile allows for the declaration and TP-274, and concluded with them that the easiest workaround was to file my taxes without the gain, and to file the TP-274 in paper format as an amendment. As long as the amendment is sent prior to April 30, there is no risk of undeclared income penalties. As for interest, the taxable amount is $0, so not-applicable anyways. I might be overly careful on this case, but I prefer to keep it clean, especially since my gain is 100% deductible.