Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

build.py file is now compatible with both Python2 and Python3 - #313

Closed
opg7371 wants to merge 226 commits into
privly:masterfrom
opg7371:master
Closed

build.py file is now compatible with both Python2 and Python3#313
opg7371 wants to merge 226 commits into
privly:masterfrom
opg7371:master

Conversation

@opg7371

@opg7371 opg7371 commented Dec 29, 2015

Copy link
Copy Markdown

issue#312 can be closed now
This build.py file is now compatible with both python2 and python3

irdan and others added 30 commits March 2, 2015 13:14
Note that many of these functions were taken directly from the
Login/js/new.js file. Only the pendingRegistration and
registrationFailure functions were modified.
remove extra whitespaces
Improve first-run registration
…fferent browsers on SauceLabs using command line argument

Change the filesToTest variable based on basePath

Changed basePath to current working directory

Made similar changes to work on SauceLabs

Run SauceLabs tests on specific browsers based on command line argument

Default browser for Karma is Firefox. Additional browsers can be set

Improved whitespace

Use BROWSERS_TO_TEST environment variable only when it is set

Used === for string comparison and removed semicolon for var object
Conflicts:
	test/karma.conf-ci.js
	test/karma.conf.js
Switched coverage reporter to coveralls
broadcast option changed message to content scripts
provide read and write interface via chrome messages
@smcgregor

Copy link
Copy Markdown
Member
  • Pull requests shouldn't have the built HTML (this makes it easier for me)
  • The built HTML is not encoded properly. You can see the newline characters rendered as \n.
  • You should call the make_pretty function even if the HTML is encoded as bytes. You will need to convert the bytes for this to work, which should also solve your encoding issue.

@opg7371

opg7371 commented Dec 30, 2015

Copy link
Copy Markdown
Author

Hi sean please check it out.
I fixed the newline problem too...

Comment thread build.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some leftover code?

@opg7371

opg7371 commented Jan 3, 2016

Copy link
Copy Markdown
Author

can you tell me where exactly the work is needed..?

@smcgregor

Copy link
Copy Markdown
Member

Summarize the changes you made so I don't need to look through a diff to figure out what changed. I'll look through a diff again when you have addressed the earlier comments.

@opg7371

opg7371 commented Jan 3, 2016

Copy link
Copy Markdown
Author

To be clear.i need to summarize the changes i did in that build.py file itself as comments on top or some specfic position or some where else...?

@smcgregor

Copy link
Copy Markdown
Member

In the comment box of GitHub. It emails me and gives me more details about the changes.

@opg7371

opg7371 commented Jan 4, 2016

Copy link
Copy Markdown
Author

In the build.py file ,only the line number 70-80 are changed.
the same lines are
#The if statement is needed to maintain support for both python2 and python3
if(type(prettyHTML)==str):
#For python2 the type is String
return re.sub(r'[\ \n]{2,}</textarea>',
"</textarea>",
prettyHTML)
else:
#For python3 the type is bytes
return re.sub(r'[\ \n]{2,}</textarea>',
"</textarea>",
prettyHTML.decode('utf-8'))

@smcgregor

Copy link
Copy Markdown
Member

I see why you were confused now. I am looking for a summary of the changes you made to the original pull request, not a summary of the pull request as it currently is. This makes it faster for me to re-review the pull request.

@opg7371

opg7371 commented Jan 10, 2016

Copy link
Copy Markdown
Author

The changes that i made in the build.py for privly applications is made in from line 70 to 72. The problem was that the type of prettyHTML came out to be different in python2(str) and python3(bytes).So i committed the changes can be seen in line number 71 to 81.The lines changed can be seen in the above commit.

Comment thread PlainPost/js/show.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove debugging console statements

@smcgregor

Copy link
Copy Markdown
Member

Your pull requests are getting mixed. You should be doing all your work on feature branches. Since you are working on two pull requests at the moment, the two branches should probably be feature-build-python-3 and feature-improve-footer. These branches should be current with the develop branch and should not share any commits between them that are not in develop. Also, your pull request should request to be merged into develop, not master.

@opg7371

opg7371 commented Feb 21, 2016

Copy link
Copy Markdown
Author

Closing this issue
This issue is reopened at #349

@opg7371 opg7371 closed this Feb 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants